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

projects::OpenRecent list is empty and flashing #8364

Closed
1 task done
d1y opened this issue Feb 25, 2024 · 8 comments
Closed
1 task done

projects::OpenRecent list is empty and flashing #8364

d1y opened this issue Feb 25, 2024 · 8 comments
Labels
bug [core label] workspace Feedback for workspace management, layout, interactions, etc

Comments

@d1y
Copy link
Contributor

d1y commented Feb 25, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

I can clearly see that it had content at first, but then it was cleared.
https://github.com/zed-industries/zed/assets/45585937/c2fe6b33-a909-4d91-8581-f1a32f31af12

Environment

Zed: v0.124.4 (Zed Preview)
OS: macOS 14.3.1
Memory: 16 GiB
Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.

No response

@d1y d1y added admin read bug [core label] labels Feb 25, 2024
@d1y d1y changed the title projects::OpenRecent List is empty and flashing projects::OpenRecent list is empty and flashing Feb 25, 2024
@SomeoneToIgnore
Copy link
Contributor

I fear this is another case of #7528 (comment) but that did not appear for me, I wonder if Vim mode has to do something with it.
cc @bennetbo

@bennetbo
Copy link
Contributor

bennetbo commented Feb 25, 2024

There was an oversight in the layout code when there are a lot of projects in the list. Should be fixed by #8376. Would be great if @d1y could test this, although running from source will not use the same recent projects list as the one shown above.

By the way, what's the name of your theme? It looks great.

@d1y
Copy link
Contributor Author

d1y commented Feb 25, 2024

lot of projects in the list fixed by #8376

I have opened many projects and this PR seems to be working @bennetbo
But I think the rendering part of the list is now overflowing and not fully displayed, which makes me feel abrupt.
image.png

what's the name of your theme?

image.png

@bennetbo
Copy link
Contributor

bennetbo commented Feb 25, 2024

But I think the rendering part of the list is now overflowing and not fully displayed, which makes me feel abrupt.

What would you expect to happen if there are more projects in the list? Cutting them off seems like a bad idea cause it looks like they are missing.

Edit: Just making sure you can see the items when you scroll down/use the arrow keys to navigate, right?

Thanks for the theme name!

@d1y
Copy link
Contributor Author

d1y commented Feb 25, 2024

But I think the rendering part of the list is now overflowing and not fully displayed, which makes me feel abrupt.

What would you expect to happen if there are more projects in the list? Cutting them off seems like a bad idea cause it looks like they are missing.

Thanks for the theme name!

Rewrite to telescope-style lol :) <#8279>

refer: https://github.com/nvim-telescope/telescope-project.nvim/tree/master

In my impression, @iamnbutler has developed a concept UI for extension-ui, which is very similar to telescope.

@d1y
Copy link
Contributor Author

d1y commented Feb 25, 2024

But I think the rendering part of the list is now overflowing and not fully displayed, which makes me feel abrupt.

What would you expect to happen if there are more projects in the list? Cutting them off seems like a bad idea cause it looks like they are missing.

Edit: Just making sure you can see the items when you scroll down/use the arrow keys to navigate, right?

Thanks for the theme name!

I think the path can be displayed on the right side instead of the bottom, which is not displayed by default. Otherwise, I think there are too many placeholders. When a button is triggered (such as alt), the path on the right side can be displayed, or it should not be displayed because I think the hover-tooltip-msg is sufficient

@bennetbo
Copy link
Contributor

I tried to display the path on the right earlier in my PR but there is not enough space to render long paths and long project names side by side. Personally, I feel like the path should always be displayed, because there might be projects with the same name in different folders.

@SomeoneToIgnore
Copy link
Contributor

In fact, there was an issue asking exactly that (showing the path always), so trimming seems reasonable atm.

SomeoneToIgnore pushed a commit that referenced this issue Feb 25, 2024
If the list is large (size > overdraw + available height) the
`all_rendered` check was preventing the list from returning an inferred
size. Theoretically we can now report heights which are actually too
small (because not all items were affected during layout), this can be
manually adjusted using the overdraw parameter. In this case its fine
because the picker is inside a max_height which should never be more
then the overdraw we specify (1000 px), and the list will shrink down
either way when the request_measured_layout callback is called again.

Release Notes:

- Fixed flashing of recent projects list when there were a lot of
projects in the list
([#8364](#8364 (comment))).
@JosephTLyons JosephTLyons added workspace Feedback for workspace management, layout, interactions, etc and removed triage labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] workspace Feedback for workspace management, layout, interactions, etc
Projects
None yet
Development

No branches or pull requests

4 participants