akash-network / console

Deploy docker containers on the Akash Network
https://console.akash.network
Apache License 2.0
51 stars 44 forks source link

Refactor deploy-web clients for network/network id to depend on store only #297

Open ygrishajev opened 1 month ago

ygrishajev commented 1 month ago

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.

ygrishajev commented 1 month ago

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.

anilmurty commented 1 month ago

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

hiroyukikumazawa commented 4 weeks ago

yes, I will take this, @anilmurty