feat: Add dynamic side panel width #5177
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Description
Introduced a new configuration option
dynamicSidePanelWidththat allows the GUI to automatically adjust the width of side panels based on which panel has focus. When a side panel is focused, the left section expands, and when the main panel is focused, the right section expands. This feature is only applicable in normal screen mode.The feature includes two new configuration options:
sidePanelFocusedRatio: Defines the ratio of the side panel's width when a side panel has focus.mainPanelFocusedRatio: Defines the ratio of the main panel's width when the main panel has focus.The idea comes from emacs's golden-ratio.el
https://github.com/roman/golden-ratio.el
Demo
recording-20260105-14h29.mp4
Please check if the PR fulfills these requirements
go generate ./...)