Closed SeanCassiere closed 1 year ago
This would be cool, open to PRs
@iway1 Sounds good.
Got any preferences as to the design and where you'd want the toggle button to go? Because looking at the code, you've clearly thought about this functionality in your existing implementation and simply just added it in yet.
Currently, in dev, I'm simply reusing the Chevron in the TopBar
to toggle the state of the sidebar.
Note:
Branch: https://github.com/SeanCassiere/trpc-panel/tree/SeanCassiere/feat-add-sidebar-toggle-func
@SeanCassiere Nice yeah I think that looks good.
Persistence would be nice to have I think but not totally necessary. I'm wondering whether people are going to want to open and close it frequently, do you think you would or just leave it closed all the time?
@iway1 Personally for me (regarding persistence), as I like having descriptive procedure names in my routers, I'd probably always close the minimap on launch.
If you are fine with it, I could add a stripped-down version of this useLocalStorage hook for persistence, using a key like trpc-panel.show-minimap
. Therefore, default is still open, but once you click it starts using the persisted value.
Nothing too crazy, just want to toggle the sidebar/minimap shown on the left for two reasons: