Skip to content

chore(templs): remove legacy URL repair from QuickLinksWithSubpages - #866

Open
caugner wants to merge 1 commit into
mainfrom
remove-legacy-url-fixing
Open

chore(templs): remove legacy URL repair from QuickLinksWithSubpages#866
caugner wants to merge 1 commit into
mainfrom
remove-legacy-url-fixing

Conversation

@caugner

@caugner caugner commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Description

Remove fix_broken_legacy_url and its only call site in the QuickLinksWithSubpages macro.

  • Delete crates/rari-doc/src/templ/legacy.rs and its pub mod legacy; declaration.
  • QuickLinksWithSubpages now forwards its url argument to listsubpages unchanged.

Motivation

The helper rewrote macro arguments that were missing a locale prefix or the /docs/ segment into a canonical URL, logging a fixed legacy url warning. 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, QuickLinksWithSubpages is 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 as fixed legacy url in 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 of fix_broken_legacy_url, so nothing downstream relied on normalization happening here.

Related issues and pull requests

Depends on:

`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.
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

b19a5ad was deployed to: https://rari-pr866.review.mdn.allizom.net/

@caugner caugner changed the title Remove legacy URL repair from QuickLinksWithSubpages chore(templs): remove legacy URL repair from QuickLinksWithSubpages Sep 3, 2026
@caugner
caugner marked this pull request as ready for review September 4, 2026 11:31
@caugner
caugner requested a review from a team as a code owner September 4, 2026 11:31
@caugner
caugner requested a review from LeoMcA September 4, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants