Skip to content

Add variant/struct field search tab #58364

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Conversation

GuillaumeGomez
Copy link
Member

Fixes #58229.

screenshot 2019-02-10 at 00 05 27

I'm just wondering if it's really useful though. Any other opinions would be very appreciated!

r? @QuietMisdreavus

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 10, 2019
@oli-obk
Copy link
Contributor

oli-obk commented Feb 18, 2019

At some point (when we get many of these), we should probably not make it a tab, but a dropdown menu

@GuillaumeGomez
Copy link
Member Author

I'm open to any suggestions. :)

@QuietMisdreavus
Copy link
Member

Is this searching for types being used in structs/variants, or for the names of the field/variant? If it's the latter, this tab is not useful - it's duplicating a subset of the first tab. I'm not familiar with how the search code looks at the index, and your screenshot makes it look like it's searching through names.

@Dylan-DPC-zz
Copy link

ping from triage @GuillaumeGomez @QuietMisdreavus what's the update on this?

@QuietMisdreavus
Copy link
Member

I can't easily tell from reading the code whether this is searching for variants/fields by name or by type. If it's just a way to limit a name-based search to variants/fields (as the image in the PR description indicates), i don't think it's useful enough to include - they should already be included in the "In Names" tab.


It seems like the problem statement is something like this. Say you have the following crate:

pub struct SomeStruct;

pub struct OtherStruct {
  pub my_field: SomeStruct,
}

You should be able to search "SomeStruct" and get OtherStruct::my_field in the "In Variants/Fields" tab. That's a very useful feature that i would love to include.

@GuillaumeGomez
Copy link
Member Author

I'll change this PR to go this way then. It'll match more what I had in mind to being with.

@bors
Copy link
Collaborator

bors commented Mar 16, 2019

☔ The latest upstream changes (presumably #59226) made this pull request unmergeable. Please resolve the merge conflicts.

@Centril
Copy link
Contributor

Centril commented Mar 30, 2019

Ping from triage, @GuillaumeGomez, what's the status of this PR?

@GuillaumeGomez
Copy link
Member Author

Still requires to be done.

@GuillaumeGomez
Copy link
Member Author

I'll reopen once I'm done.

@GuillaumeGomez GuillaumeGomez deleted the variant-struct-field-search-tab branch August 19, 2024 12:25
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants