Style side panel buttons and toggle terminal#2369
Style side panel buttons and toggle terminal#2369laurensvalk wants to merge 3 commits intodoc-scrollfrom
Conversation
Allow adding several views to be opened and closed. Also make it easily discoverable by making them the same color as the main buttons.
Users sometimes hide the docs by dragging them to the side, in which case clicking on the docs icon should restore to the default size instead of unintuitively doing nothing.
|
Does clicking the "Close all panels" button again restore all panels the way they were before closing? As a user, this is the behavior I would expect. I would also expect "app: Preserve terminal state on hide." to be squashed with the previous commit. I was looking at each commit individually and almost made a comment about how the previous commit was broken. Then I saw the next commit that fixes it. And I would like to see if we can find something better than the |
| }; | ||
|
|
||
| const [terminalSplit, setTerminalSplit] = useLocalStorage('app-terminal-split', 30); | ||
| const [terminalVisible, setTerminalVisible] = useState(true); |
There was a problem hiding this comment.
This should use local storage so that it stays in the same state when the app is restarted.
There was a problem hiding this comment.
Users often lose it and then wonder why motors don't work. I think it's fine to have it open by default, perhaps at a smaller default size.
Unlike before, there is now a one-click way to close it, so it's very easy to hide it again if you really want to.
src/app/App.tsx
Outdated
| }; | ||
|
|
||
| const defaultTerminalSplit = 30; | ||
| const defaultTerminalSplit = 20; |
There was a problem hiding this comment.
I didn't see anything explaining why this value is changed.
This doesn't quite work for the file browser, so I've dropped this particular addition. We can consider it for a future round.
Will save this for a future generic defaults overhaul too and drop it here.
Done.
I spent some time at this and it doesn't seem trivial. Doing it the "right" way seems to break in numerous ways, like losing the scroll or destroying the editor. This dependency seems to be built to use only the initial state. |
Also preserve terminal state on hide.
I'm currently experimenting with |
reason 1: Generalize side panel
We'd like to use this for more than just docs, such as a camera view or telemetry.
reason 2:
This fixes some usability issues for beginning users:
new-2026-03-30_14.50.02.mp4