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: example links do not open examples #37520

Closed
rsc opened this issue Feb 27, 2020 · 3 comments
Closed

x/pkgsite: example links do not open examples #37520

rsc opened this issue Feb 27, 2020 · 3 comments
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. pkgsite

Comments

@rsc
Copy link
Contributor

rsc commented Feb 27, 2020

Start at https://pkg.go.dev/strings?tab=doc#pkg-examples
and click on Fields, or jump straight to
https://pkg.go.dev/strings?tab=doc#example-Fields

Either way, the page ends up positioned on the “> Example” for Fields,
but it doesn't open the example. It's not obvious at first what has happened.

At the least, the example should be opened.

I also wonder if the page can be adjusted to display the Fields definition
and docs, assuming they fit onto the same screen as the example.

@julieqiu
Copy link
Member

Thanks for the feedback! I'll work with our UX team on improving this.

/cc @fflewddur

@julieqiu julieqiu added NeedsFix The path to resolution is known, but the work has not been done. UX Issues that involve UXD/UXR input labels Feb 28, 2020
@julieqiu julieqiu changed the title pkg.go.dev: example links do not open examples x/pkgsite: example links do not open examples Jun 15, 2020
@gopherbot gopherbot added this to the Unreleased milestone Jun 15, 2020
@gopherbot
Copy link

Change https://golang.org/cl/250467 mentions this issue: content/static: expand examples automatically when clicked or navigated

@julieqiu julieqiu removed the UX Issues that involve UXD/UXR input label Aug 25, 2020
gopherbot pushed a commit to golang/pkgsite that referenced this issue Aug 25, 2020
This change includes auto expand functionality for examples in
playground.js which is included with the executable-examples feature
flag. This includes:

When users click on an example href that links to an example, the
example will be auto expanded as such:
before example link: https://i.imgur.com/7fSa3E9.gif
after example link: https://i.imgur.com/4dQ4UWO.gif

When a user navigates to a pkg.go.dev url with an example hash (i.e:
?tab=doc#example-AtomicLevel), the example is auto exapnded.
before hash change: https://i.imgur.com/luKw5uo.gif
after hash change: https://i.imgur.com/mzUl33F.gif

Updates golang/go#37520

Change-Id: I6cba5ea979ed516bcdb753eee92eecec7839c2f4
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/250467
Reviewed-by: Julie Qiu <julie@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
@julieqiu
Copy link
Member

Fixed.

@golang golang locked and limited conversation to collaborators Aug 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. pkgsite
Projects
None yet
Development

No branches or pull requests

4 participants