mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-12 01:08:39 +00:00
efb7b3d872
The save action has been implemented, and it is listened to by the canonical enabled state in the previews reducer, and by the settings reducer to perform UI changes. The enabled state of the application has been kept in the preview reducer as the canonical source of truth. See supporting changes for documentation about the decision. Actions: * Introduce new action SETTINGS_CHANGE with the enabled status * Trigger that action when clicking Save in the settings dialog Reducers: * Listen to SETTINGS_CHANGE in the preview reducer to update enabled status * On the settings reducer * Handle the SETTINGS_CHANGE action * Add showHelp flag to determine if the help should be showing Change listeners: * Switch to compare past vs present changes in the implementation * Handle showing and hiding the help Supporting changes: * On the rendered settings dialog: * Change #hide to actually just hide and remove legacy if statement * Add #toggleHelp method to show or hide the help dialog * Add doc/adr/0003-keep-enabled-state-only-in-preview-reducer.md to support the decision of making the saveSettings action creator return a Redux.Thunk and keeping the enabled state just in the preview reducer. * Add NB to actions#saveSettings explaining and linking to the document Follow commits soon: * Persist the settings change to local storage when it changes, and unify with the preview change listener Change-Id: I80dc5f29fbe6286f2e3e3b50d909894bc5041ccd |
||
---|---|---|
.. | ||
adr | ||
images/instrumentation | ||
change_listener.md | ||
instrumentation.md |