Refactor #30724
closedRemove console errors from ForemanModal
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
Updated by The Foreman Bot almost 4 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/8322 added
Updated by Jeremy Lenz almost 4 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|b47b27ce9c68bd8350e67aa366077055519edae0.
Updated by The Foreman Bot almost 4 years ago
- Pull request https://github.com/theforeman/foreman/pull/8338 added
Updated by Ondřej Ezr almost 4 years ago
- Fixed in Releases 2.4.0 added
- Fixed in Releases deleted (
2.5.0)