Skip to content

feat: callouts - #841

Merged
kellyjosephprice merged 10 commits into
betafrom
feat/callouts
Mar 21, 2024
Merged

kellyjosephprice merged 10 commits into
betafrom
feat/callouts

Conversation

@kellyjosephprice

@kellyjosephprice kellyjosephprice commented Mar 19, 2024 •

Copy link
Copy Markdown
Contributor
PR App Fix RM-9011

🧰 Changes

Gets markdown callouts working!

For testing, I did a big refactor on the demo(?) app. I replaced all the changing params stuff with react-router-dom, and updated it to use typescript!

🧬 QA & Testing

@kellyjosephprice
kellyjosephprice changed the base branch from next to beta March 19, 2024 22:14
Comment thread index.tsx Outdated
Comment on lines +36 to +48
const useMDXComponents = () => ({
...Components,
});

export const reactProcessor = (opts = {}) => {
return createProcessor(opts);
return createProcessor({ remarkPlugins: [calloutTransformer], ...opts });
};

export const react = (text: string, opts = {}) => {
const code = compileSync(text, {
development: true,
outputFormat: 'function-body',
providerImportSource: '@mdx-js/react',
remarkPlugins: [calloutTransformer],

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.

These are the only changes required for getting callouts to work!

@kellyjosephprice
kellyjosephprice marked this pull request as ready for review March 20, 2024 19:02

@trishaprile trishaprile left a comment

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.

yay love the demo refactor and mdx callouts!
although when I try to manually type one out with < the page crashes

@kellyjosephprice

Copy link
Copy Markdown
Contributor Author

although when I try to manually type one out with < the page crashes

Hey, nobodies perfect, ok. I added some error boundaries.

@trishaprile trishaprile left a comment

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.

beautiful

@kellyjosephprice
kellyjosephprice merged commit 02803ea into beta Mar 21, 2024
@kellyjosephprice
kellyjosephprice deleted the feat/callouts branch March 21, 2024 22:32
rafegoldberg pushed a commit that referenced this pull request Mar 21, 2024
## Version 6.75.0-beta.13

### ✨ New & Improved

* callouts ([#841](#841)) ([02803ea](02803ea))

<!--SKIP CI-->
@rafegoldberg

Copy link
Copy Markdown
Collaborator

This PR was released!

🚀 Changes included in v6.75.0-beta.13

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.

3 participants