Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Improve event data flow for restoring state #3092

Closed
Hall-Ma opened this issue Oct 14, 2022 · 0 comments · Fixed by #3093
Closed

Refactor Improve event data flow for restoring state #3092

Hall-Ma opened this issue Oct 14, 2022 · 0 comments · Fixed by #3093
Assignees

Comments

@Hall-Ma
Copy link
Contributor

Hall-Ma commented Oct 14, 2022

Feature request

Description

We should refactor the way we set the state of the store when a custom config is applied.
Currently the properties of appsettings, dynamicsettings, filesettings etc. are restored through their splitter functions.
This leads to redundant code and it's also easy to forget to create new splitter functions when the properties of the Custom Configs change. The consequence is that the Custom Config is not fully applied.

The solution is to write a new root reducer that takes care about the new state (comming from the Custom Config) and only the reducer has to know how the state is set. After that we can delete all splitter function. As additional advantage, only one action is fired instead of an action for every field in store

Acceptance criteria

  • All splitter related code is deleted
  • Everything works as before
Hall-Ma added a commit that referenced this issue Oct 14, 2022
Hall-Ma added a commit that referenced this issue Oct 14, 2022
shaman-apprentice added a commit that referenced this issue Oct 24, 2022
shaman-apprentice added a commit that referenced this issue Oct 24, 2022
LuisGuenther added a commit that referenced this issue Nov 2, 2022
* refactor: PoC SetState action in an single action

ref #2318

* Delete all splitter functions and tests, add tests for root reducer, do some little refactoring
#3092

* Implement restore state with dynamic keys
#3092

* Remove throwing error when key doesn't exist and adjust tests
#2489

* Remove customConfigFileStateConnector
#2489

* Remove assignedMaps and mapNames from custom config model and introduce mapNameByChecksum property, remove treemap size and attribute types from config model
#2489

* Replace customConfigFileStateConnector functions and implement workaround for new property mapNameByChecksum in custom config
#2489

* Adjust selector for getting visible files by selection mode, adjust  dependent functions
#2489

* Adjust all tests to new custom config model and replace CustomConfigFileStateConnector calls with new selector
#2489

* Change visibleFilesSelector with visibleFilesBySelectionMode for getting downloadable custom configs, adjust tests
#2489

* Change visibleFilesSelector with visibleFilesBySelectionMode for getting downloadable custom configs, adjust tests
#2489

* Adjust test for getDownloadableCustomConfigs
#2489

* Implement suggested changes of PR review
#2489

Co-authored-by: shaman-apprentice <Torsten.Knauf@gmx.de>
Co-authored-by: LuisGuenther <93578491+LuisGuenther@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants