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: add a 'y' keyboard shortcut to canonicalise URL with version #36807

Open
myitcv opened this issue Jan 27, 2020 · 3 comments
Open

x/pkgsite: add a 'y' keyboard shortcut to canonicalise URL with version #36807

myitcv opened this issue Jan 27, 2020 · 3 comments

Comments

@myitcv
Copy link
Member

@myitcv myitcv commented Jan 27, 2020

What is the URL of the page with the issue?

https://pkg.go.dev/github.com/govim/govim/cmd/govim/config?tab=doc

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.66 Safari/537.36

Screenshot

Screen Shot 2020-01-27 at 19 07 01

What did you do?

Navigated to said page.

What did you expect to see?

On GitHub, the y keyboard shortcut allows the viewer to canonicalise the URL for the version of a file you are viewing:

Screen Shot 2020-01-27 at 19 08 31

For example, at the time of writing, hitting y whilst on:

https://github.com/govim/govim/blob/master/cmd/govim/config/config.go

updates the address bar URL to be:

https://github.com/govim/govim/blob/013f992e25f23cbc4a778d1eb472e719d276de32/cmd/govim/config/config.go

I think a similar option should be offered on pkg.go.dev. For example, at the time of writing, hitting y whilst on:

https://pkg.go.dev/github.com/govim/govim/cmd/govim/config?tab=doc

would update the address bar URL to be:

https://pkg.go.dev/github.com/govim/govim@v0.0.27/cmd/govim/config?tab=doc

What did you see instead?

No option to do this.

@gopherbot gopherbot added this to the Unreleased milestone Feb 6, 2020
@julieqiu julieqiu added the UX label Feb 28, 2020
@julieqiu julieqiu changed the title go.dev: add a 'y' keyboard shortcut to canonicalise URL with version x/pkgsite: add a 'y' keyboard shortcut to canonicalise URL with version Jun 15, 2020
@julieqiu julieqiu added help wanted Suggested and removed UX labels Jun 15, 2020
@kush-patel-hs
Copy link
Contributor

@kush-patel-hs kush-patel-hs commented Jun 20, 2020

I'll like to take this on

@kush-patel-hs
Copy link
Contributor

@kush-patel-hs kush-patel-hs commented Jun 20, 2020

Ready for review https://go-review.googlesource.com/c/pkgsite/+/239179!. I used GIthub's behaviour of the URL update does not reload page (it simply replaces history).

@gopherbot
Copy link

@gopherbot gopherbot commented Jun 29, 2020

Change https://golang.org/cl/239179 mentions this issue: content/static,internal/frontend: add 'y' keyboard shortcut to canonicalise URL with version

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
4 participants
You can’t perform that action at this time.