chore(templs): remove legacy URL repair from QuickLinksWithSubpages - #866
Open
caugner wants to merge 1 commit into
Open
chore(templs): remove legacy URL repair from QuickLinksWithSubpages#866caugner wants to merge 1 commit into
QuickLinksWithSubpages#866caugner wants to merge 1 commit into
Conversation
`fix_broken_legacy_url` rewrote arguments missing a locale prefix or the `/docs/` segment into a canonical URL, emitting a "fixed legacy url" warning. `QuickLinksWithSubpages` was its only caller. Every remaining invocation across content and translated-content now passes either a canonical `/<locale>/docs/...` URL or no argument at all, so the repair is a no-op. A future non-canonical argument will fail page resolution and surface as a macro error instead of being silently repaired.
Contributor
|
b19a5ad was deployed to: https://rari-pr866.review.mdn.allizom.net/ |
QuickLinksWithSubpagesQuickLinksWithSubpages
caugner
marked this pull request as ready for review
September 4, 2026 11:31
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Remove
fix_broken_legacy_urland its only call site in theQuickLinksWithSubpagesmacro.crates/rari-doc/src/templ/legacy.rsand itspub mod legacy;declaration.QuickLinksWithSubpagesnow forwards itsurlargument tolistsubpagesunchanged.Motivation
The helper rewrote macro arguments that were missing a locale prefix or the
/docs/segment into a canonical URL, logging afixed legacy urlwarning. Once the remaining non-canonical arguments are fixed in translated-content, the repair is a no-op on every input, and removing it makes a future non-canonical argument fail page resolution and surface as a macro error rather than being silently repaired.Additional details
Across content and translated-content,
QuickLinksWithSubpagesis invoked with either a canonical/<locale>/docs/...URL or no argument at all, except for 21 occurrences of{{QuickLinksWithSubPages("Web/Performance")}}(es: 2, ko: 6, ru: 13). Those are exactly the 21 pages reported asfixed legacy urlin a full build, and they are addressed by the linked translated-content PRs.Arguments with a trailing slash (e.g.
/es/docs/Web/Progressive_web_apps/) already took the identity branch offix_broken_legacy_url, so nothing downstream relied on normalization happening here.Related issues and pull requests
Depends on:
QuickLinksWithSubPagesmacro paths in es translated-content#38218QuickLinksWithSubPagesmacro paths in ko translated-content#38219QuickLinksWithSubPagesmacro paths in ru translated-content#38220