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: display banner when user is redirected to a canonical import path #43693

Closed
julieqiu opened this issue Jan 14, 2021 · 3 comments
Closed

Comments

@julieqiu
Copy link
Contributor

@julieqiu julieqiu commented Jan 14, 2021

Why a user is redirected to a vanity import path (for example, https://pkg.go.dev/github.com/rsc/rf, which redirects to https://pkg.go.dev/rsc.io/rf), a banner will be displayed to indicate where they were redirected from:

Screen Shot 2021-01-14 at 9 31 46 AM

@gopherbot gopherbot added the pkgsite label Jan 14, 2021
@gopherbot gopherbot added this to the Unreleased milestone Jan 14, 2021
@julieqiu julieqiu added the NeedsFix label Jan 14, 2021
@gopherbot
Copy link

@gopherbot gopherbot commented Jan 14, 2021

Change https://golang.org/cl/283622 mentions this issue: internal/frontend: set cookie on alternative mod redirect

@gopherbot
Copy link

@gopherbot gopherbot commented Jan 14, 2021

Change https://golang.org/cl/283619 mentions this issue: internal/cookie: add logic for flashCookie

@gopherbot
Copy link

@gopherbot gopherbot commented Jan 14, 2021

Change https://golang.org/cl/283716 mentions this issue: content,internal: add redirected from banner

gopherbot pushed a commit to golang/pkgsite that referenced this issue Jan 14, 2021
Logic for getting and setting a flash cookie is added. This will be used
for the redirected from banner.

For golang/go#43693

Change-Id: I7d07eb1ee4beeefe33e9b20a10ce3581504ade57
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/283619
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
gopherbot pushed a commit to golang/pkgsite that referenced this issue Jan 14, 2021
When a request to /<path> is redirected because it is an alternative
module path, a cookie is now set with the originating path. This will be
used to set the value of a banner in a future CL.

For golang/go#43693

Change-Id: I92bf674c927ecd3bd00148f893c3cb12984dce6c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/283622
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
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
2 participants