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

Show error and warning indicators in tabs #21383

Merged

Conversation

nilskch
Copy link
Contributor

@nilskch nilskch commented Dec 1, 2024

Closes #21179

Release Notes:

  • Add setting to display error and warning indicators in tabs.
demo_with_icons demo_without_icons

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

nilskch commented Dec 1, 2024

Even though I didn't get feedback on the related issue yet, I wanted to take a proactive approach and offer an implementation for consideration. This PR is intended as a starting point for discussion, not a push for immediate adoption. I think this would be a nice addition to #18182. Feedback is very welcome!

@nilskch nilskch marked this pull request as ready for review December 1, 2024 13:57
@@ -1841,23 +1886,6 @@ impl Pane {
}
}

pub fn git_aware_icon_color(
Copy link
Member

@mikayla-maki mikayla-maki Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this PR remove the implementation of tabs.git_status?

Copy link
Contributor Author

@nilskch nilskch Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it only removes the coloring of the icons depending on the git status. The text color still changes with the git status if tabs.git_status = true. #18182 did the same in the project_panel.

@mikayla-maki
Copy link
Member

Could you include a before image in your example?

@nilskch
Copy link
Contributor Author

nilskch commented Dec 4, 2024

Before After
before after

It is important to note that if you set tabs.show_diagnostics = off, we still do not change the icon color with the git_status after this PR:

off

I did this to make it consistent with the project panel after the changes in #18182:

project_panel.show_diagnostics = all project_panel.show_diagnostics = off
project_panel_all project_panel_off

@danilo-leal danilo-leal self-assigned this Dec 4, 2024
Copy link
Contributor

@danilo-leal danilo-leal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet, this looks great to me, thanks so much!

@danilo-leal danilo-leal merged commit 6ebd6c2 into zed-industries:main Dec 5, 2024
12 checks passed
@nilskch nilskch deleted the add-diagnostic-indicators-to-tabs branch December 5, 2024 14:55
danilo-leal added a commit that referenced this pull request Dec 6, 2024
Follow up to #21383

Mostly adjusting the alignment when there are no file icons.

<img width="800" alt="Screenshot 2024-12-06 at 08 35 48"
src="https://github.com/user-attachments/assets/6a4206cc-2af5-4317-a92e-49dffa37de99">

Release Notes:

- N/A
mgsloan pushed a commit that referenced this pull request Dec 10, 2024
Note that the git coloring of the icons got removed in
#21383

Closes #21772

Release Notes:

- N/A
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.

Show error and warning indicators in tabs
3 participants