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

x/pkgsite: Support symbol search within module #47843

Open
prattmic opened this issue Aug 20, 2021 · 3 comments
Open

x/pkgsite: Support symbol search within module #47843

prattmic opened this issue Aug 20, 2021 · 3 comments

Comments

@prattmic
Copy link
Member

@prattmic prattmic commented Aug 20, 2021

What is the URL of the page with the issue?

https://beta.pkg.go.dev/gvisor.dev/gvisor

https://beta.pkg.go.dev/search?m=symbol&q=CompareAndSwapUint32

What is your user agent?

Mozilla/5.0 (X11; CrOS x86_64 13982.69.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.130 Safari/537.36

Screenshot

N/A

What did you do?

I would like to a way to do symbol search within a single module, exposed in the UI.

As a concrete example, I know that the gvisor.dev/gvisor module has a function named CompareAndSwapUint32, but I may not remember where it is. This is a common name, so a global search is not useful.

(Bonus points if I could make a saved search to search multiple modules. Something like "baz (module:example.com/foo OR module:example.com/bar)").

What did you expect to see?

Some way to limit the search to the current module would be very helpful. Perhaps the search dropdown could have "Symbols" and "Symbols (this module only)".

Current package search is often desired too. This already exists via Ctrl+F, but if module search is added then package search should perhaps be surfaced in the same place in the UI as well.

What did you see instead?

Nothing.

@gopherbot gopherbot added this to the Unreleased milestone Aug 20, 2021
@julieqiu julieqiu removed this from the Unreleased milestone Aug 20, 2021
@julieqiu julieqiu added this to the pkgsite/search milestone Aug 20, 2021
@julieqiu
Copy link
Contributor

@julieqiu julieqiu commented Aug 20, 2021

Does https://beta.pkg.go.dev/search?m=symbol&q=CompareAndSwapUint32+gvisor.dev%2Fgvisor address this issue? (You can type any full module path or sub-path along with the symbol)

@prattmic
Copy link
Member Author

@prattmic prattmic commented Aug 20, 2021

Ah, nice! This does what I want, though I think it would be nice to surface "search within module" somewhere in the UI, since it is not obvious.

@julieqiu
Copy link
Contributor

@julieqiu julieqiu commented Aug 20, 2021

That is good feedback, thanks!

/cc @jinhongy @fflewddur

@julieqiu julieqiu added the UX label Aug 20, 2021
@julieqiu julieqiu removed this from the pkgsite/search milestone Sep 13, 2021
@julieqiu julieqiu added this to the pkgsite/2021 milestone Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants