Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dirty indicator to Breadcrumbs #22418

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Qkessler
Copy link
Contributor

Change Summary

Users commonly remove the Tab Bar to remove noise while they write/code. I do it myself. Nevertheless, there's a gap in visibility over the current pane when one disables the tab bar: we miss the dirty indicator on the current pane. When I change something without saving, there's no visual indicator that the pane was changed, leading to potential mistakes.

With this PR, I propose using the Breadcrumbs for that. It commonly includes the buffer/file name, even if the outline doesn't show an inner element. By adding the indicator on the Breadcrumbs, we ensure people who choose to remove the tab bar still have the visibility while maintaining the display minimal.

I'm open to adding this behind a configuration flag. I'd even be good for both the tab bar and the breadcrumbs to share that configuration option, to avoid duplication.

Closes #22390

Risks associated with this change

This change introduces a different usage of the Breadcrumbs. I see little risk, considering using the left of the breadcrumbs is non-obstrusive.

Testing

To test it, I made the changes and spawn a Zed instance with RUST_LOG=debug scripts/zed-local -1. Here's what the pane looks like without the change:

image

and here's what it looks after, whenever I make a change on the file and don't save:

image

Release Notes:

  • Added file change Indicator on Breadcrumbs

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 25, 2024
@Qkessler
Copy link
Contributor Author

@danilo-leal , interested in your thoughts for this change. Let me know what you think coming from the UX perspective.

@0x2CA
Copy link
Contributor

0x2CA commented Dec 26, 2024

Thank you for your work, there is an indicator that is very good, but it will cause the original text to move to the right as a whole, is this appropriate? I think using color markers to mark the path would be better, wouldn't it?

@bonniesimon
Copy link

I have a few suggestions:

Have the marker on the right side (This is what VsCode does):

image

Have the marker at the end of the breadcrumbs:
image

@Qkessler
Copy link
Contributor Author

Thanks both for the suggestions, great ones. Interested in hearing from @danilo-leal , who has context on the direction for Zed's design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No indicator to show whether current file has unsaved content when tab_bar.show = "false"
3 participants