refactor: overwritable settings config #4854
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The last couple of refactors concerning the settings dialog (#4265) were a great upgrade allowing for configuration of settings items, including name, color etc. as well as when these are enabled (settings were only used on boards before, now they're also available for every other route).
While this is quite convenient, the menu items themselves are still constant, with the only possibility to toggle which ones are displayed, but not for the properties themselves.
Hence, with this PR it's now also possible to override settings at runtime by passing an
override
prop to theSettingsDialog
component.Example
Changelog
?overwrite
of new typeMenuItemConfigOverride
toSettingsDialog
MENU_ITEM_CONFIG
SettingsDialog
where the merged config is used as state in order to render the settingsChecklist