Open SlamaFR opened 1 year ago
Do we persist the open state in localstorage ? or does it get reset on every reload ? Do we autoclose/autoopen on viewport resize ?
Note that we'll also have a mobile version of the sidebar at some point, in which case the open state should not be used (always reset to not opened on reload)
At the moment, the state is stored in local storage, and should remain, in my opinion.
The plan should be to decide initial state on load based on the viewport if local storage is empty, and update the state when viewport become too small. If you have any suggestion, feel free to share them.
ok so tdlr :
We could use the screen size of the client to decide if the sidebar should be open or closed by default.
For example, if a client connects to the application with a small 4:3 screen (lol), the sidebar should be collapsed by default. We'll come up with a minimum size requirement to meet to have the sidebar opened by default.