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

Fullstack: refactor config storage and processing #480

Open
webecke opened this issue Nov 14, 2024 · 3 comments
Open

Fullstack: refactor config storage and processing #480

webecke opened this issue Nov 14, 2024 · 3 comments
Assignees
Labels
clean-up Something in the code is a mess and needs refactoring

Comments

@webecke
Copy link
Contributor

webecke commented Nov 14, 2024

As we keep adding more and more config options, the management of config state on the front end is getting more and more difficult to manage. This needs to be refactored into something thats easier to manage and more expandable.

This could involve a restructuring into different config systems, or just a simplification of how config values are processed and stored. I'll figure it out once I get started on it.

@webecke webecke added the clean-up Something in the code is a mess and needs refactoring label Nov 14, 2024
@webecke webecke self-assigned this Nov 14, 2024
@webecke
Copy link
Contributor Author

webecke commented Nov 15, 2024

Potential idea: We make a ConfigDataTransferClass, and that just gets serialized when we ask for it on the front end. That way we can structure config things and nest them for sensible organization. Then, as long as we mirror it in the Config type on the front end, we can do minimal processing when we ask for the config. And it means we can have simpler additions to the config system.

@ThanGerlek
Copy link
Contributor

ThanGerlek commented Nov 16, 2024

I'm not sure I understand the problem--is this a backend change, or a frontend refactor? The backend Config system certainly feels a bit messy (at least to me), but the frontend actually looks fairly well centralized. Especially given what we talked about in 340, about how a DTO and its corresponding Model class (the Config type and the config data store) should be separate--one is purely data, and the other has validation and logic. That being said, obviously I'm not too familiar with the frontend--am I missing what you're proposing?

@webecke
Copy link
Contributor Author

webecke commented Nov 16, 2024

Currently, the way the front end storage is structured, to add a new config option, you have to set up three different things (all in the Config store, but its still a hassle, and as more and more things get added, it seems pretty messy).

This is really more of a full stack change, I want to make some changes to how the back end processes config and also how it sends it to the front end.

@webecke webecke changed the title Frontend: refactor config storage Fullstack: refactor config storage Nov 16, 2024
@webecke webecke changed the title Fullstack: refactor config storage Fullstack: refactor config storage and processing Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clean-up Something in the code is a mess and needs refactoring
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants