Project

General

Profile

Actions

Refactor #30724

closed

Remove console errors from ForemanModal

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

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

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

Actions #1

Updated by The Foreman Bot about 3 years ago

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

Updated by The Foreman Bot about 3 years ago

  • Fixed in Releases 2.5.0 added
Actions #3

Updated by Jeremy Lenz about 3 years ago

  • Status changed from Ready For Testing to Closed
Actions #4

Updated by The Foreman Bot about 3 years ago

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

Updated by Ondřej Ezr about 3 years ago

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

Also available in: Atom PDF