open by default custom store variables#649
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a mechanism to automatically open the variables panel upon initializing a remote store by adding a shouldOpenVariablesAfterInit flag to the global state. It also refactors LandingHome.tsx to improve metadata fetching with race condition checks and updated dependency arrays. Feedback indicates that including shouldOpenVariablesAfterInit in the useEffect dependency array causes redundant network requests, and it is recommended to access this state directly from the store within the promise callback to optimize performance.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a storeFromURL flag to the global state to automatically open the variables panel when a dataset is loaded via a URL parameter. The changes span the global store definition, the store initializer, and the main landing component. The review feedback identifies several opportunities to improve the robustness of this feature, specifically by ensuring the storeFromURL flag is reset after its initial consumption to prevent the panel from re-opening during re-renders. Additionally, the feedback points out a potential bug in how local stores are identified and suggests optimizing state access by using variables already available in the component scope rather than calling getState() inside effects.
this fixes EarthyScience/Browzarr.jl#10