zed icon indicating copy to clipboard operation
zed copied to clipboard

Allow hiding title and status bar

Open juicyarts opened this issue 1 year ago • 4 comments

This Pr tries to satisfy two of the requests in https://github.com/zed-industries/zed/issues/4382 and allows hiding the title and status bars.

I tried to adhere to the approach used for tab_bar settings (which is also being extended right now here) to allow extending more fine grained configuration for both elements in the future (e.g only hide project or branch name, user settings, etc.).

...
"title_bar": {
  "show": true
},
"status_bar": {
  "show": true
}
...
Screenshot 2024-04-28 at 19 29 53

This works really well on a full screen setup on Mac, but i can't say much about other Os's rn, would need to test further. When not in fullscreen, there is this odd behavior of the titlebar hanging inside the file explorer, which also blocks interacting with tabs (e.g moving them):

Screenshot 2024-04-28 at 17 11 44

I think a behavior like Iterm2 offers on Mac would be nice here, but that would mean that the Titlebar needs to be in a NsSplitView of some kind. Before further investigation i would like to know if these kind of changes go into the direction you folks intend as well. Based on https://github.com/zed-industries/zed/pull/7356#pullrequestreview-2025914678 you might not want to hide ui elements without the possibility of showing them easily if needed rather than needing to change configuration. Alternatively these settings could be part of the View Menu and mapped to keyboard shortcuts (?).

in iterm2 (when configured acordingly) the titelbar is only visible if you hover the top left area of the window. This is also the only area that allows dragging the window, and would prevent the issue not being able to interact with tabs.
Screenshot 2024-04-28 at 18 25 12

How it looks:

Screenshot 2024-04-28 at 18 52 45 Screenshot 2024-04-28 at 18 52 53 Screenshot 2024-04-28 at 18 53 02

Release Notes:

  • Added support to hide title and status bars (part of https://github.com/zed-industries/zed/issues/4382)

juicyarts avatar Apr 28 '24 17:04 juicyarts

We require contributors to sign our Contributor License Agreement, and we don't have @juicyarts on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

cla-bot[bot] avatar Apr 28 '24 17:04 cla-bot[bot]

@cla-bot check

juicyarts avatar Apr 28 '24 17:04 juicyarts

The cla-bot has been summoned, and re-checked this pull request!

cla-bot[bot] avatar Apr 28 '24 17:04 cla-bot[bot]

I think the title bar should be hidden with the traffic lights altogether. If you're hiding the title bar for screen real estate or to reduce visual noise the traffic lights should be gone in both cases.

On the discoverable note, I think the hidden functions should be discovered by another form of UI eg a drop-down menu. Or an icon on the tab bar to restore the original title bar. Moving it around looks messy and causes visual clutter, which is against the whole point of hiding it from the beginning.

iTerm style is also not good. How do you discover the top left area to show the mini title bar there? Also I dont think Johny Ives will approve that design 😛

Just my two cents

dangh avatar Apr 29 '24 00:04 dangh

Thank you for your work on this PR, @juicyarts.

While we may add support for hiding these bars in the future, it's not as simple as just exposing a setting to hide them.

Having the possibility of them being hidden makes the UI require additional affordances, and we would need to make sure that Zed is still usable in the absence of either of these bars.

For example, hiding the title bar today would totally break the collaboration experience in Zed.

With that said, I'm going to close this one out for now. We can revisit in the future.

maxdeviant avatar Apr 29 '24 14:04 maxdeviant

Thanks for your reply @maxdeviant! I can totally understand the emphasis on the collaboration experience and see that this kind of a change is a gamebraker for that situation!

Just to dump some thoughts that came up when diving into this:

  • instead of removing the elements completely, use hoverable areas that expand the particular element after a while (overlap, don't move content to avoid having an uneasy experience)
  • make this functionality toggle-able via keyboard shortcuts and via the view menu
  • Regarding the mac specific traffic lights/title bar, i had a hard time figuring out how to gain more control over it. Generally there seems to be the option to use NsTitlebarSeperatorStyle and NsSplitView* for a cleaner separation between the titlebar and the content but core-foundation-rs does not support it (or i failed at finding the proper way).

Thanks for the awesome work!

juicyarts avatar Apr 29 '24 14:04 juicyarts