Skip to content

List crate features so they're readable #10540

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

Closed
wants to merge 1 commit into from

Conversation

NthMetal
Copy link

@NthMetal NthMetal commented Feb 9, 2025

fixes #465

Just a UI update to move the version feature list to a separate togglable panel.
Currently you can only view them on hover. Which isn't readable with long lists and doesn't allow you to easily select what you wanna see.
Before:
image

After:
image
image
image

Thoughts, suggestions, improvements, etc. appreciated!

@Turbo87 Turbo87 added C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works A-frontend 🐹 labels Feb 10, 2025
@Turbo87
Copy link
Member

Turbo87 commented Feb 10, 2025

Bildschirmfoto 2025-02-10 um 14 10 53

worth mentioning how it looks like for crates with fewer feature flags than bevy :D

@rust-lang/crates-io opinions on this?

@Turbo87
Copy link
Member

Turbo87 commented Mar 5, 2025

Sorry for the long radio silence! we discussed this PR in our team meeting, but we concluded that the version listing is not the right place for the feature list. we think it would be better to make it e.g. a dedicated route or tab per version, but we also think that it would be good to wait until https://rust-lang.github.io/rfcs/3416-feature-metadata.html is stabilized, so that we can also properly display feature metadata.

regarding the tooltips that you fixed: we agree that the long feature list of e.g. bevy is problematic, but we prefer a solution where we only display the first ~10 features and then display something like "and 300 other features".

regarding the z-index issue with the tooltip in your screenshot: this should be addressed by #10731

Thank you for getting the discussion started on how we can improve the feature listing, though unfortunately we are going to close this PR in favor of the solutions listed above.

@NthMetal
Copy link
Author

NthMetal commented Mar 7, 2025

Ok thanks for getting back to me @Turbo87

The intent with the pr was to make it more functional, not really pretty, that was just a bonus. The hover for features isn't readable and is hard to do things with. I can't open it and compare the list of features with my Cargo.toml. I can't select stuff and copy and paste if the list is too short. I can't open the list to even make sure i'm typing the right feature in my IDE. I can't ctrl+f and search for a feature.

Right now if I want more than just a quick glance at features I have to open up my chrome inspect menu and look at it there or search up the package on lib.rs. The data is there, it's just not usable because of the hover.

Having it in a separate tab sounds great, I contemplated doing that initially, but figured it would be easier to just make it expandable.

Were any of those other issues considered? They weren't really mentioned in this PR, but were brought up in the linked issue.

@Turbo87
Copy link
Member

Turbo87 commented Mar 13, 2025

Right now if I want more than just a quick glance at features I have to open up my chrome inspect menu and look at it there or search up the package on lib.rs.

there is also https://docs.rs/crate/bevy/latest/features, but admittedly lib.rs gives a bit more information

Were any of those other issues considered?

I'm not sure what "other issues" you mean. All of the points you brought up should be addressed if we move the features list to a dedicated tab, but as I mentioned in the comment above, this is at least partially blocked on https://rust-lang.github.io/rfcs/3416-feature-metadata.html.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend 🐹 C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Crate page should list the crate's Cargo "features"
2 participants