Repository navigation
match old devhub urls; add Coming soon for unimplemented views #25708
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
Merged
eviljeff
merged 7 commits into
mozilla:master
from
eviljeff:16477-use-devhub-compatible-urls-in-pinguino
Nov 4, 2026
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
25eeaa3
match old devhub urls; add Coming soon for unimplemented views
eviljeff bc3152d
Add switching back magic for redirected urls
eviljeff 1f128c2
Merge branch 'master' into 16477-use-devhub-compatible-urls-in-pinguino
eviljeff 748baed
linting fix
eviljeff 343cc70
Merge branch 'master' into 16477-use-devhub-compatible-urls-in-pinguino
eviljeff e2d9eb1
fix test fails after merge
eviljeff eed2862
Merge remote-tracking branch 'refs/remotes/upstream/master' into 1647…
eviljeff File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import { html, LitElement } from 'lit'; | ||
| import { customElement } from 'lit/decorators.js'; | ||
|
|
||
| // Placeholder for devhub pages that exist in the Django app but haven't been | ||
| // reimplemented in Pinguino yet, so old bookmarks land somewhere sensible | ||
| // instead of a "Not found" page. | ||
| @customElement('coming-soon') | ||
| export class ComingSoon extends LitElement { | ||
| render() { | ||
| return html`<p>Coming soon.</p>`; | ||
| } | ||
| } | ||
|
|
||
| declare global { | ||
| interface HTMLElementTagNameMap { | ||
| 'coming-soon': ComingSoon; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| // Tracks which URL the "switch back to the classic DevHub" link should restore. | ||
| // | ||
| // When we first load we may redirect (e.g. /developers/themes -> /developers). | ||
| // We want switching back to return to the *original* incoming URL, not the | ||
| // redirected one — while the user is still on the page that redirect landed on. | ||
|
|
||
| function currentUrl(): string { | ||
| return location.pathname + location.search; | ||
| } | ||
|
|
||
| // Capture the first load url at module-eval time, before client-side redirects. | ||
| const initialUrl = currentUrl(); | ||
|
|
||
| // The URL the initial redirect(s) settled on, recorded once the app has mounted. | ||
| let landingUrl: string | null = null; | ||
|
|
||
| export function recordLanding(): void { | ||
| landingUrl = currentUrl(); | ||
| } | ||
|
|
||
| export function pickSwitchBackPath( | ||
| initial: string, | ||
| landing: string | null, | ||
| current: string, | ||
| ): string { | ||
| return landing !== null && current === landing ? initial : current; | ||
| } | ||
|
|
||
| export function switchBackPath(): string { | ||
| return pickSwitchBackPath(initialUrl, landingUrl, currentUrl()); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.