Project

General

Profile

Refactor #30724

Remove console errors from ForemanModal

Added by Jeremy Lenz over 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
JavaScript stack
Target version:
-
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Currently ForemanModal has Redux reducers which behave in the following ways:

When you try to use ADD_MODAL for a modal that exists already: JS error thrown
When you try to SET_MODAL_OPEN for a modal that doesn't exist: JS error thrown
When you try to SET_MODAL_CLOSED for a modal that doesn't exist: JS error thrown

This causes a bad developer experience. At least one and possibly all three of the errors should be removed.

Suggested change:

When you try to use ADD_MODAL for a modal that exists already: No error; change is idempotent and Redux store is unchanged
When you try to SET_MODAL_OPEN for a modal that doesn't exist: Console warning; modal is created for you
When you try to SET_MODAL_CLOSED for a modal that doesn't exist: Console warning; modal is created for you

Associated revisions

Revision b47b27ce (diff)
Added by Jeremy Lenz about 2 years ago

Fixes #30724 - Remove console errors from ForemanModal

History

#1 Updated by The Foreman Bot about 2 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/8322 added

#2 Updated by The Foreman Bot about 2 years ago

  • Fixed in Releases 2.5.0 added

#3 Updated by Jeremy Lenz about 2 years ago

  • Status changed from Ready For Testing to Closed

#4 Updated by The Foreman Bot about 2 years ago

  • Pull request https://github.com/theforeman/foreman/pull/8338 added

#5 Updated by Ondřej Ezr about 2 years ago

  • Fixed in Releases 2.4.0 added
  • Fixed in Releases deleted (2.5.0)

Also available in: Atom PDF