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

[Refactoring]: Consider moving the state_management system to a app_storage.tab based system #17

Closed
1 task done
ihsanKisi opened this issue May 16, 2024 · 2 comments
Closed
1 task done
Assignees
Labels
🚀refactoring Related to code improvements

Comments

@ihsanKisi
Copy link

✏️ Problem Description

Currently, the project handles its state management through the state.py module. The advantage is that it is flexible, but the current implementation does not protect the state of the tab after a page refresh, which might lead to a worsened user experience, so I am suggesting considering the app_storage.tab dictionary of the NiceGUI Framework for the state management.

💡 Feature Request

Evaluate the necessity and advantages of app_storage.tab

🌍 Context

No response

🔍 Additional Information

No response

👍 Code of Conduct

  • I agree to follow this project's Code of Conduct
@ihsanKisi ihsanKisi added the 🚀refactoring Related to code improvements label May 16, 2024
@ihsanKisi ihsanKisi self-assigned this May 16, 2024
@ihsanKisi
Copy link
Author

ihsanKisi commented May 16, 2024

The current implementation provides enums to keep track of the events and dicts. So a total deletion of the state.py module is not the point of the discussion. The storage.tab also uses the observable dictionary system to keep track of subscribers. I will further investigate the scope of the functionality of the storage.tab.

@ihsanKisi
Copy link
Author

Currently, it does not make much sense to the new system as it will not bring much convenience. It might be later investigated further in case we want to create persistant user sessions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀refactoring Related to code improvements
Projects
None yet
Development

No branches or pull requests

1 participant