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 deploy-web clients for network/network id to depend on store only #297

Open
3 tasks
ygrishajev opened this issue Aug 12, 2024 · 3 comments
Open
3 tasks
Assignees
Labels
good first issue Good for newcomers tech-debt Technical debt

Comments

@ygrishajev
Copy link
Collaborator

This PR introduces a possibility to access network/networkId value uniformly. It also changes how store value is persisted into local storage relying on the jotai native functionality. At this point nowhere else in the app should persistence should be managed or exposed. There are still a bunch of places where components or other entities are reading the value from local storage making it less maintainable. It also affects UX as we're forced to reload the page after network change. We need to refactor all the clients relying on the same store and also make sure we rely on proper functionality depending on whether we're in or out react context.

  • refactor all the client code to rely on the network store interface
  • refactor client code to use react hooks if used in react context, remove direct "out of react" accessor method if not used
  • remove custom storage implementation from the network store once the above is done
@ygrishajev
Copy link
Collaborator Author

The refactoring is required to be delivered one piece at a time to avoid huge disturbance to the code base and ease code reviews.

The first PR should be just replacing local storage direct access with jotai store.

The following should be replacing non-react usages with react usages where needed. This should be done 1 usage per PR as it will require changing several functions in a call stack, so we need to make sure we can properly review and make sure we're on the same page with the contribution.

@ygrishajev ygrishajev added the tech-debt Technical debt label Aug 13, 2024
@anilmurty
Copy link
Collaborator

hey @hiroyukikumazawa - is this something you'd like to take on? (cc @brewsterdrinkwater to figure out bounty)

@anilmurty anilmurty added the good first issue Good for newcomers label Aug 13, 2024
@hiroyukikumazawa
Copy link
Contributor

yes, I will take this, @anilmurty

@ygrishajev ygrishajev self-assigned this Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers tech-debt Technical debt
Projects
Status: Up Next (prioritized)
Development

No branches or pull requests

3 participants