-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
recent projects: cleanup ui #7528
recent projects: cleanup ui #7528
Conversation
.child(h_flex().gap_2().child(highlighted_location.names).when( | ||
self.render_paths, | ||
|this| { | ||
this.children(highlighted_location.paths.into_iter().map(|path| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can there actually be multiple paths for an entry? I didn't find a case where that is happening. If it can actually happen this might look bad, because the paths are laid out horizontally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, you can have a Zed workspace that contains multiple folders in it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha thanks, I thought I was missing something there. I never used the "add folder to workspace" feature. I will try to make some improvements then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, though the multiple paths only show up if your most recent path (the top one) has multiple paths.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a beautiful font (Monocraft) that does horrendous things to Zed's layouts.
So, I quickly checked a few things with this branch and posting it here for visibility.
Original Zed is not much better, but my issue with this PR is that it changes those things so that they are broken different way now, without fixing them
Original Zed is much better here since the path below has enough space:
- Multi dir paths force single dir entries to get too tall and all other obvious layouting issues:
Original Zed is much worse but it's not like the new version is qualitatively better:
also, as it's shown on the other original Zed screenshot above, it is able to show multidir project entry normally, if the picker selection changes. So I think original Zed is somewhat closer to being normal than the new version.
I would disagree, this version at least shows all of the data without being completely broken. |
I would disagree: the new version does not show "all of the data", trimming the directories — that is my issue with both versions. |
Thanks @SomeoneToIgnore for testing. Here is a summary of the implementation so far:
@SomeoneToIgnore yes im aware of the scrolling issue and that's what im currently struggling with. The list should take all the available space inside the overlay, up to a maximum of what's passed into picker. However if i set the The only way I can force the list to display is to set a fixed width. Some other ideas which might be nice to have:
|
I wonder if it's the same as #6958 (comment) , where we need to wrap a list with canvas and set their size to full. |
I don't think that will help here, as we're trying to get the list to take as minimal space as possible, up to a maximum height specified by the However @ConradIrwin helped me to rework the layout behaviour of the list. However it's quite tricky as the items inside the list are loaded lazily and we might not know the actual size of them if they weren't rendered (and measured) before. |
Oh, sorry for putting you through all this, gpui can hurt sometimes. I think that overall, this is still an improvement, but fear that this bug is more noticeable than before. |
I fixed this, although the visuals are not quite the same as for uniform list. Uniform list will not show up at all, while List will still be rendered (only with the padding) but not show any items
I took me way too long to figure out that there is no need to include the padding size in the I believe the visual "bugs" are gone, however the one or two missing frames while typing really bother me (zed is always so fast and responsive, this doesn't fit in). I will look into it tomorrow. |
Thanks for the testing once again. This was happening because there was already a max_height on the picker itself, which I used as a workaround for specifying the max_height for the list as well (which is a little too small, because the search box takes some space, so the maximum height is not correct for the list). Therefore the scroll area "thinks" its larger then it actually is -> no scrolling/cut off items. By reworking the layout implementation I was able to fix the flickering issues, but im afraid I am now stuck on another problem: The new list implementation fixes the flickering by measuring items in the layout phase (this is cached so there is not much more overhead than before). Here is the layout "trace" for
My current understanding: I hope my explanation makes sense, im not sure what's the problem here. |
Well this seems to be again very similar to #6958 (comment) comment: at least with my "not scrolling" issue reported there, there was a very similar taffy behavior that did not have any max_height dimensions set. |
I managed to finally figure it out! Apparently there is a |
Of course that would have been to easy, my changes seem to break existing layouts using the |
Should be ready to review now, you can see a showcase of the current state below: Summary:
A few notes on the implementation: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe your approach is what it has to be, after all, so I'm fine with a separate codepath being used.
The recent file picker looks really polished now, thank you for coming up with all those.
Let's fix one big degradation with the rest of the pickers and we'll merge this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gave it another look and failed to find anything bad, nice! 🎉
Sorry for being a rather good filter but not a good source of help, at least now you seem to be pretty comfortable with gpui as a reward.
All good, thanks for all the testing you did, that was very helpful! |
As the ui for the file finder was recently changed in #7364, I think it makes sense to also update the ui of the recent projects overlay.
Before:
After:
Release Notes: