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/website: clicking "share" on the playground reloads the entire page #49766

Closed
mvdan opened this issue Nov 23, 2021 · 4 comments
Closed

x/website: clicking "share" on the playground reloads the entire page #49766

mvdan opened this issue Nov 23, 2021 · 4 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@mvdan
Copy link
Member

mvdan commented Nov 23, 2021

I'm fairly sure this did not happen with the old play.golang.org - it would simply update the URL in the browser bar and in the "share" textbox, but it wouldn't reload the entire page.

I don't lose any code with the reload, but it's still slightly distracting. Particularly since the code takes nearly a second for me to fully render again, so the site becomes unusable while it's doing the presumably unnecessary reload.

@gopherbot gopherbot added this to the Unreleased milestone Nov 23, 2021
@mvdan
Copy link
Member Author

mvdan commented Nov 23, 2021

Switching between the built-in examples sort of has the opposite problem. The code does change without a full reload, but the URL doesn't change, so it remains on whatever URL I got from my last click of "share".

@nishanths
Copy link

nishanths commented Nov 24, 2021

Similar: #49742.

But that issue doesn't mention the problem described in the first comment here.

@zikaeroh
Copy link
Contributor

Yes, apparently I didn't notice that the whole page actually reloaded and assumed it was some sneaky history modification in my issue. It definitely reloads everything and removes the output.

@heschi heschi added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 24, 2021
@gopherbot
Copy link

Change https://golang.org/cl/368014 mentions this issue: _content: fix go.dev/play share not to reload page

passionSeven added a commit to passionSeven/website that referenced this issue Oct 18, 2022
Mainly the JS invocation was set up wrong.

Also add the display box for the share URL back,
and style the share URL box and the Go release box
the same as the example selector box.

Also hide the example box when sharing.
This used to happen somewhat accidentally
on play.golang.org. Make it intentional.

Fixes golang/go#49766.

Change-Id: Ib297feff123f6fdabebe24cf868a54874c5afc83
Reviewed-on: https://go-review.googlesource.com/c/website/+/368014
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
@golang golang locked and limited conversation to collaborators Nov 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants