Skip to content

refactor(site): migrate <Markdown /> and <InlineMarkdown /> off MUI - #27724

Merged
jakehwll merged 2 commits into
mainfrom
jakehwll/demui-markdown-inlinemarkdown
Aug 3, 2026
Merged

refactor(site): migrate <Markdown /> and <InlineMarkdown /> off MUI#27724
jakehwll merged 2 commits into
mainfrom
jakehwll/demui-markdown-inlinemarkdown

Conversation

@jakehwll

Copy link
Copy Markdown
Contributor

Replace Emotion css / MUI theme tokens in Markdown with Tailwind semantic classes, and swap InlineMarkdown's MUI Link for the shared Link component.

Code block colors now use theme tokens (surface-secondary, syntax-key, content-destructive) instead of hardcoded zinc/teal and theme.palette. Also adds a WithLink story for the full Markdown component.

… MUI

Replace Emotion `css` / MUI theme tokens in `Markdown` with Tailwind semantic classes, and swap `InlineMarkdown`'s MUI `Link` for the shared `Link` component.

Code block colors now use theme tokens (`surface-secondary`, `syntax-key`, `content-destructive`) instead of hardcoded zinc/teal and `theme.palette`. Also adds a `WithLink` story for the full Markdown component.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 99782b7b97

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

return (
<Link
href={href}
target={isExternal ? "_blank" : undefined}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add interaction coverage for the new link behavior

For external links rendered through InlineMarkdown, this now sets target="_blank" and changes the rendered link primitive, but the existing WithLink story only supplies args and has no play assertion. Add Storybook interaction coverage that locates the link semantically and verifies the external and internal target behavior, as FE1 requires user-visible behavior changes to be exercised by a story's play function.

AGENTS.md reference: site/AGENTS.md:L9-L10

Useful? React with 👍 / 👎.

Comment on lines +333 to +347
const markdownClassName = cn(
"text-base",
"[&_:is(h1,h2,h3,h4,h5,h6)]:mt-8",
"[&_:is(h1,h2,h3,h4,h5,h6)]:mb-4",
"[&_:is(h1,h2,h3,h4,h5,h6)]:leading-tight",
"[&_p]:mt-0 [&_p]:mb-4 [&_p:only-child]:my-0",
"[&_ul]:mb-4 [&_ul]:flex [&_ul]:flex-col [&_ul]:gap-2",
"[&_ol]:mb-4 [&_ol]:flex [&_ol]:flex-col [&_ol]:gap-2",
"[&_li>ul]:mt-4 [&_li>ol]:mt-4 [&_li>p]:mb-0",
"[&_.prismjs]:overflow-x-auto [&_.prismjs]:rounded-lg [&_.prismjs]:bg-surface-secondary [&_.prismjs]:px-6 [&_.prismjs]:py-4",
"[&_.prismjs_code]:text-content-secondary",
"[&_.prismjs_.key]:text-syntax-key [&_.prismjs_.property]:text-syntax-key",
"[&_.prismjs_.inserted]:text-syntax-key [&_.prismjs_.keyword]:text-syntax-key",
"[&_.prismjs_.deleted]:text-content-destructive",
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

holy tailwind selectors. Can we inline this at usage? Non-blocking just not sure we need it to be defined here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I agreedly hate this, but the alternative is to import a CSS file (gross? idk), I will come back to this post-MUI 🙏🏻

@jakehwll
jakehwll merged commit fba9f0d into main Aug 3, 2026
26 checks passed
@jakehwll
jakehwll deleted the jakehwll/demui-markdown-inlinemarkdown branch August 3, 2026 09:27
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants