Add option to toggle the title bar #42540
Closed
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.
Closes #5120
Summary
Add a option in settings
"title_bar": { "show": true }to configure whether or not to show the title bar in the editor. Also add the actionzed::ToggleTitleBarto toggle the current display state of the title bar.Description
The previous PR #37428 got reverted because of macOS traffic lights issue was outstanding and there are new plans around redesign the title bar which makes it a must need from Zed team.
First, the macOS traffic light issue has been fixed in this PR which means they will be hidden/displayed with the state of title bar. Second, I believe the title bar is an essential to show when you are using collaboration features even for now. But on the other hand those features are never turned on for the solo mode or even offline mode. Therefore I think the better way is to have the Action with shortcut/keybinding to trigger toggling the title bar in the runtime. People can turn it on/off as needed. In the Zen mode, this feature enabling to hide title bar is also essential to achieve the minimal UI layout. I simplify the title bar setting
tittle_bar.showwith only containing two statestrue/falseto minimize the complexity.This PR will also part of addressing the problem in the issue #5066.
Here is a short demo
toggle.title.bar.demo.mov
Release Notes:
true/falsefor configuring whether or not to show the title bar in the editor with settingtitle_bar.show.zed::ToggleTitleBarto toggling the state (show/hide) of title bar in runtime.