Add dirty indicator to Breadcrumbs #22418
Open
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.
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:and here's what it looks after, whenever I make a change on the file and don't save:
Release Notes: