-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Addon-docs: Fix newline handling in ArgsTable code blocks #12882
Addon-docs: Fix newline handling in ArgsTable code blocks #12882
Conversation
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Nx Cloud ReportCI ran the following commands for commit bd5889f. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch
Sent with 💌 from NxCloud. |
Thanks for the feedback, @MichaelArestad! Do you mean making the inline code (here in red) to become a single block when it breaks, like the block in the green area? |
@niklasmh Not quite. I'm referring for the differences in styles between this: It's somewhat tricky to spot, but you'll see they actually have different font and color styles. |
@MichaelArestad Nice spotted! I can attempt to do something about it. I assume the first style is preferred? As it is the default for inline code. |
@niklasmh That would be great. Yes. The styles for the inline code are preferred. Thank you! |
Setting smaller font-size on code blocks is also done at GitHub
@MichaelArestad As far I could find the only difference was the font-size which made the text appear darker. I also saw that setting a smaller font-size on inline code blocks is a normal practice (e.g. GitHub) - therefore it seems like a reasonable change to add. |
Now the font should be good too! Thanks for guiding me through my first PR here at storybook, @MichaelArestad :) |
I'm seeing some visual diffs of changes that are unrelated to this PR. I suspect a rebase or merging an updated |
c7b62fd
to
c7cd395
Compare
…11358-render-newlines-in-markdown-code-blocks-in-argtables
@shilman I think this one is ready to 🚢 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @niklasmh !!! 🙏
Issue: #11358 (propTypes) and #12848 (interface)
What I did
Added
white-space: pre-wrap;
on code blocks (specifically). This does not affect inline code.Before:
After:
How to test
cra-kitchen-sink\src\components\Container.js
together with an ArgsTable in the test story:cra-kitchen-sink\src\stories\test.stories.mdx
.cra-ts-kitchen-sink\src\components\Button.tsx
.If your answer is yes to any of these, please make sure to include it in your PR.