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
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. pkgsite

Comments

@julieqiu
Copy link
Member

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 this to the Unreleased milestone Jan 14, 2021
@julieqiu julieqiu added the NeedsFix The path to resolution is known, but the work has not been done. label Jan 14, 2021
@gopherbot
Copy link

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

@gopherbot
Copy link

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

@gopherbot
Copy link

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>
@golang golang locked and limited conversation to collaborators Jan 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. pkgsite
Projects
None yet
Development

No branches or pull requests

2 participants