We currently have a huge amount of code dedicated to the relatively simple act of opening and closing dialogs. For every dialog in Micromasters, we define an action to set the dialog's visibility to true, and a reducer to change the state accordingly. PR #2555 introduces the SHOW_DIALOG and HIDE_DIALOG actions, which can show and hide any number of dialogs without the boilerplate code. We should change our existing dialog actions/reducers to follow this new pattern. As an example, the invocation of the setLearnerPageDialogVisibility action would change from setLearnerPageDialogVisibility() to showDialog(LEARNER_PAGE_DIALOG).
We also have 3 actions which appear to be dead code: UPDATE_DIALOG_TEXT, UPDATE_DIALOG_TITLE, and SET_DIALOG_VISIBILITY in static/js/actions/ui.js.
We currently have a huge amount of code dedicated to the relatively simple act of opening and closing dialogs. For every dialog in Micromasters, we define an action to set the dialog's visibility to
true
, and a reducer to change the state accordingly. PR #2555 introduces theSHOW_DIALOG
andHIDE_DIALOG
actions, which can show and hide any number of dialogs without the boilerplate code. We should change our existing dialog actions/reducers to follow this new pattern. As an example, the invocation of thesetLearnerPageDialogVisibility
action would change fromsetLearnerPageDialogVisibility()
toshowDialog(LEARNER_PAGE_DIALOG)
.We also have 3 actions which appear to be dead code:
UPDATE_DIALOG_TEXT
,UPDATE_DIALOG_TITLE
, andSET_DIALOG_VISIBILITY
instatic/js/actions/ui.js
.