-
Notifications
You must be signed in to change notification settings - Fork 3k
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 a Project Search button to the Status Bar #19238
Add a Project Search button to the Status Bar #19238
Conversation
cc @zed-industries/design |
Any issues with the PR? |
If this is added we'll want to be able to hide for people that don't like seeing things they'll never use ✋. The convention for hiding these is a |
Okay I added the setting "project_search": {
"button": false
} will hide it (hopefully, compiling right now) So where else do I need to document this setting? (schemas, docs etc) (Btw I just noticed that project search doesn't render file icons, maybe we can add those too!) |
Not against it and also not a designer, but throwing my hat in the ring by saying I think it should be hidden by default. (We do have a discoverability problem, but I think we should fix that in a way that's not adding buttons for features people don't know about.) |
Sure, that's just a matter of changing the default settings. Let me know if thats preferable I have implemented the settings already, i will push by tonight |
@danilo-leal I share some of the same thoughts. Also, for posterity, I'd note that there is an existing way to get at project search via the tab bar quick actions (which is another button group I'd like to be able to hide)... |
Thanks for the commits. I haven't fully discovered the gpui's apis yet, and my poor laptop can't handle rust intellisense for this big codebase 😓. I just tried to match existing implementations for the project panel button and diagnostics button and built upon that.
I completely agree with you, but again I just took the existing implementation for the diagnostics button and built upon that. The divider you added is honestly the best approach from my viewpoint. It does separate the left panels and the tabs 👍🏼. If agreed by others, you may push that divider too. I would rather add a similar divider to the right side (separating cursor info, bottom panels and right panels). And the current padding does that already, if you carefully notice. |
Yeah, I am aware of that option, and my initial plan was to add the search icon to the top bar, but then the bottom status bar seemed to be a better place for the diagnostics button, which is kind of similar. |
Might be nice though I tend to think some of this becomes moot if a telescope/helix-style live file and grep search/previewer is eventually introduced. |
Actually, this is causing me a small issue with implementing the hide the button setting. You are returning an IconButton, which has to have and visual representation, but I must not render it depending on the setting, which forces me to use a h_flex with and child of IconButton, which maybe None if setting instructs. Also, I am removing the file_icons setting since there is no support for file icons in the project search tab |
… which defaults to false
I think you can use the Empty element: zed/crates/gpui/src/element.rs Line 599 in da28091
Empty.into_any() |
Didn't work with Apart from that, I think is PR is ready for merging |
Yeah, I think GPUI doesn't take this into account yet. |
For the space that is wasted by this button, moving the search button next to the diagonistics button helps since the diagonistics text doesn't always stays visible. So space is not wasted |
Thank you for your work on this PR. After some internal discussion we've decided we don't want to move forward with adding this button. Given it's not something we want enabled by default, having it as a setting just means that it's something extra that we need to take into account when designing in this area. We're trying to keep the status bar as lightweight as possible. |
Closes #7836
Release Notes:
Note: The
ProjectSeachIndicator
I created has a lot of potential as showing the project search stats for a global search, just like diagnosticsitems.rs
(DiagnosticsIndicator
) does.EDIT: For Design issues, please let me know if search icon on the right side of status bar would be more pleasing