Skip to content

docs(button): specify danger is not supported for icon only buttons#14307

Merged
tay1orjones merged 5 commits into
carbon-design-system:mainfrom
tay1orjones:button-docs
Jul 27, 2023
Merged

docs(button): specify danger is not supported for icon only buttons#14307
tay1orjones merged 5 commits into
carbon-design-system:mainfrom
tay1orjones:button-docs

Conversation

@tay1orjones

@tay1orjones tay1orjones commented Jul 25, 2023

Copy link
Copy Markdown
Member

Part of #14300

Changelog

Changed

  • Clarify in Button and IconButton .mdx docs that danger is not a supported option for icon only buttons
  • Reformat doctoc comments to be compatible with MDX2

Testing / Reviewing

  • Proofread the docs changes

@tay1orjones tay1orjones requested a review from a team as a code owner July 25, 2023 20:05
@tay1orjones tay1orjones self-assigned this Jul 25, 2023
@tay1orjones

tay1orjones commented Jul 25, 2023

Copy link
Copy Markdown
Member Author

Huge thanks @jdharvey-ibm for figuring out placing the comment all onto a single line prevents prettier from malforming the .mdx file formatting! 🙏

@netlify

netlify Bot commented Jul 25, 2023

Copy link
Copy Markdown

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit fa3ce4f
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/64c11ea49c922e000859bc56
😎 Deploy Preview https://deploy-preview-14307--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Comment on lines +105 to +110
<CodeSnippet type="inline" hideCopyButton>
{'<Modal>'}
</CodeSnippet>
/<CodeSnippet type="inline" hideCopyButton>{`<ComposedModal>`}</CodeSnippet>{' '}
has to be put at the top level in a React tree. The easiest way to ensure
that is using React portal as shown in above example.

@tw15egan tw15egan Jul 26, 2023

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.

These CodeSnippet blocks seem to be causing crashes here and in ComposedModal

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks for pointing this out. It should be fixed now.

To find valid syntax for .mdx files w/ MDX2, I've been doing the following:

  1. Take the erroring portions (like this snippet here) and put it into the mdx playground
  2. Starting at the most-nested components, reduce these down to single-line entries
- <CodeSnippet type="inline" hideCopyButton>
-  {'<Modal>'}
- </CodeSnippet>
+ <CodeSnippet type="inline" hideCopyButton>{'<Modal>'}</CodeSnippet>
  1. Continue simplifying the formatting until the compiler is successful and doesn't report errors
  2. Put the valid code over into the .mdx file and surround it with prettier ignore comments. These look a bit different in mdx2 and are surrounded in curly braces: {/* <!-- prettier-ignore-start --> */}

@netlify

netlify Bot commented Jul 26, 2023

Copy link
Copy Markdown

Deploy Preview for carbon-components-react ready!

Name Link
🔨 Latest commit fa3ce4f
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/64c11ea4ed1e630008fee379
😎 Deploy Preview https://deploy-preview-14307--carbon-components-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@tw15egan tw15egan 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.

LGTM 👍 ✅

@github-actions github-actions Bot added this pull request to the merge queue Jul 27, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jul 27, 2023
@tay1orjones tay1orjones added this pull request to the merge queue Jul 27, 2023
Merged via the queue into carbon-design-system:main with commit 2ccf23b Jul 27, 2023
@tay1orjones tay1orjones deleted the button-docs branch July 27, 2023 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants