Skip to content
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

Mdx : Theme fontCode not applied consistently when writing MDX #23110

Merged
merged 5 commits into from Nov 27, 2023

Conversation

gitstart-storybook
Copy link
Collaborator

@gitstart-storybook gitstart-storybook commented Jun 16, 2023

Issue: #21804

What I did

  • Added fontFamily: theme.typography.fonts.mono to fix the issue of
'Plain markdown code block' ❌
  • overrideTheme declared over here have the default fontCode. So we have passed the typography.fonts.mono to use the user defined fontCode in order to fix the issue related to Source

How to test

Ref

GitStart Ticket

Demo

Screen Shot 2023-06-09 at 02 18 09

@gitstart-storybook gitstart-storybook self-assigned this Jun 16, 2023
@gitstart-storybook gitstart-storybook marked this pull request as ready for review June 16, 2023 16:00
@gitstart-storybook gitstart-storybook changed the title fix : theme fontCode not applied consistently when writing MDX Mdx : theme fontCode not applied consistently when writing MDX Jun 16, 2023
@gitstart-storybook gitstart-storybook changed the title Mdx : theme fontCode not applied consistently when writing MDX Mdx : Theme fontCode not applied consistently when writing MDX Jun 16, 2023
@gitstart-storybook gitstart-storybook removed their assignment Jun 16, 2023
Comment on lines +129 to 140
return (
<ThemeProvider
theme={convert({
...overrideTheme,
fontCode: typography.fonts.mono,
fontBase: typography.fonts.base,
})}
>
{syntaxHighlighter}
</ThemeProvider>
);
};
Copy link
Member

Choose a reason for hiding this comment

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

Can you explain why this is required? I'd assume the fix code/ui/components/src/syntaxhighlighter/syntaxhighlighter.tsx would be enough on it's own?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks @ndelangen for the review. We have passed the content of code from here
Screen Shot 2023-06-23 at 00 00 52

which is not actually the Code defined over here

Screen Shot 2023-06-23 at 00 05 30

So fix over code/ui/components/src/syntaxhighlighter/syntaxhighlighter.tsx is not enough.

@ndelangen ndelangen changed the base branch from next to release-8-0 November 27, 2023 08:32
@ndelangen ndelangen merged commit ed656b8 into release-8-0 Nov 27, 2023
57 of 58 checks passed
@ndelangen ndelangen deleted the fix/theme-fontCode-mdx branch November 27, 2023 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: theme fontCode not applied consistently when writing MDX
2 participants