-
-
Notifications
You must be signed in to change notification settings - Fork 338
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 frontend stores for table-data #651
Comments
While working on some things that used the stores namespace I too found it cluttered. I'm happy to see that the refactor isn't being put off. I'll share some ideas I had. I think semantically and modularly it would be nice to make the stores namespace thin, holding declarations of It's desirable that the structure of the stores and the modularity of logic follow the spirit of the API (which may require a refactor as well). Hope these thoughts are useful. |
@dmos62 Thanks. Your comments make a lot of sense.
This is a cleaner structure, and I did consider it while starting on the stores. But that would have been premature optimization. These were my reasons: The major issue with making modules thin on the frontend is that it eventually leads to a larger build size. The approach module bundlers use to bundle frontend code results in a set of boilerplate code for each file when it's built. The more the number of files, the higher the bundle size. The tradeoff here is between good user experience (with lower load time) and good developer experience(with thinner modules). As a team, we prioritize the user. It was a calculated decision to keep all the stores and their respective api calls in one place. We only refactor when it becomes essential, as in this case, where each of the stores are better managed separately. However, separating the api layer would still be premature at this juncture. We can get to it when we reach the point where it becomes essential. |
I'm so sorry, I don't know what I did. I was playing around. It says I modified the milestones: 06. 2021-09 Stability, 22. 22 Alpha Release. I fixed it :). |
@mr-gabe49 No worries. |
This issue has the following tasks:
PRs that handle these: Yet to handle:
|
@pavish It seems like there's one item left to do on your list, so I'm reopening this. Feel free to close if the URL sync is already done. |
@kgodey Thanks. I missed the fact that the issue got closed. It's not yet been handled, I will handle it in future PRs. |
@pavish What is the current state of URL sync? If there's broken functionality, I think it would be better to fix it sooner. |
@kgodey URL sync currently does not retain pagination, filters, groups and sort. Syncing for these parts need to be re-implemented based on the new stores. I was thinking it belongs more in the Sharing milestone, but now I agree that it's better to fix it sooner. |
@pavish I'll leave it in here then. |
Purpose of this refactor:
A better approach would be to split it into separate stores, and have a parent store which maintains the rest.
The text was updated successfully, but these errors were encountered: