Skip to content

chore(i18n, mdx): adopt strict MDX syntax and remove the transitional shims - #4717

Open
thetaPC wants to merge 1 commit into
translation/jpfrom
mdx-cleanup-jp
Open

chore(i18n, mdx): adopt strict MDX syntax and remove the transitional shims#4717
thetaPC wants to merge 1 commit into
translation/jpfrom
mdx-cleanup-jp

Conversation

@thetaPC

@thetaPC thetaPC commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Issue URL: internal

What is the current behavior?

Two transitional shims in plugins/docusaurus-plugin-ionic-component-api are still carrying the .md to .mdx rename: the component API plugin emits every partial twice, and an extensionAlias lets any .md import resolve to a .mdx file.

The items in Docusaurus 3.10's Strict MDX guidance are also outstanding, so future.v4.mdx1CompatDisabledByDefault cannot be turned on. Turning it on today fails the build:

Error: MDX compilation failed for file ".docusaurus/.../v5/action-sheet/methods.mdx"
Cause: Could not parse expression with acorn

What is the new behavior?

The jp companion to #4716. Both shims are gone, and the Strict MDX items are done:

  • 8 heading IDs in docs/updating/9-0.mdx, {#id} to {/* #id */}
  • 111 HTML comments to {/* */}, in archived v5 and v6
  • 4 admonition titles to :::tip[Title], in archived v6

A further 9 commented-out blocks were deleted rather than converted, matching #4716. Each is a placeholder that v7 onward already dropped and nothing else references: an --item-detail-push-show TODO, four TOC goes here, two TODO: image?, and a stubbed ## Customization.

That clears the last blocker on the v4 flag, which is deliberately not in this PR.

Does this introduce a breaking change?

  • Yes
  • No

Other information

This branch needed one fix that main did not. The plugin was still emitting classic heading IDs into every generated partial, ### dismiss {#method-dismiss}, where main had already moved to {/* #method-dismiss */}. That is a Strict MDX violation in generated output rather than in any source file, so no audit of the repo would surface it. It broke 544 generated partials under the flag until the two template lines were updated. Anchors are unchanged: all 359 api pages across v5 to v8 produce identical anchor lists before and after.

How to test

Archived versions are the risk here, since 44 of the 48 files are in v5 and v6, so verify them with the flag on:

  1. Set versions.json to ["v8", "v7", "v6", "v5"]
  2. Add mdx1CompatDisabledByDefault: true under future.v4 in docusaurus.config.js
  3. npx docusaurus clear (clearing only .docusaurus leaves the rspack cache, which replays the previous compile and reports a false green)
  4. npm run build
  5. Revert both files

All four versions build: 460 v5, 307 v6, 310 v7, 326 v8, with 852 warnings, the same set as before this change.

@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ionic-docs Ready Ready Preview Sep 8, 2026 11:48pm UTC

Request Review

@thetaPC
thetaPC marked this pull request as ready for review September 8, 2026 23:53
@thetaPC
thetaPC requested a review from a team as a code owner September 8, 2026 23:53
@thetaPC
thetaPC requested review from OS-jacobbell and removed request for a team September 8, 2026 23:53

@brandyscarney brandyscarney left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good as long as this gets the contributing guide update too.

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