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

docs: convert forms section component docs to MDX #7440

Merged
merged 10 commits into from
Jan 17, 2024

Conversation

tkajtoch
Copy link
Member

@tkajtoch tkajtoch commented Dec 29, 2023

Summary

This PR converts component docs from the forms section to MDX and is a part of #7404. It also configures EUI to be used in the docusaurus theme and creates a Badge alias for the EuiBadge component that's now available globally in the MDX document scope.

QA

  • Ensure the docs pages render correctly on the PR preview (please ignore missing examples, stories, and guidelines for now; these will be added separately)

@tkajtoch tkajtoch self-assigned this Dec 29, 2023
@tkajtoch tkajtoch requested a review from a team as a code owner December 29, 2023 14:39
Copy link
Contributor

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

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

Mostly minor whitespace/callout title comments here

"prism-react-renderer": "^2.1.0",
"prop-types": "^15.8.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

[not related to this PR, just thinking out loud] It feels kinda weird that EUI has prop-types as a peer dependency. Might be something to look into streamlining in the future 🤨


## Form control layout delimited

<Badge color="warning">Building block only</Badge>
Copy link
Contributor

Choose a reason for hiding this comment

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

🎉 The badge looks great!

Just curious, is there any specific reason we want to export the name for this as <Badge> vs <EuiBadge>?

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought it may become handy when we provide docs-specific defaults, wrappers, or just decide to use a different component down the road. Badge is fairly simple, so that's not the best example, but I wanted to create similar wrapper components for other components exposed in the MDX context to give us more control in general.

Copy link
Contributor

Choose a reason for hiding this comment

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

That makes sense - thanks for explaining!

website/docs/02_components/forms/date_picker/overview.mdx Outdated Show resolved Hide resolved
website/docs/02_components/forms/search_bar/overview.mdx Outdated Show resolved Hide resolved
website/docs/02_components/forms/selectable/overview.mdx Outdated Show resolved Hide resolved
Comment on lines +21 to +23
:::note

Selected options are based on the checked = on property
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
:::note
Selected options are based on the checked = on property
:::note Selected options are based on the `checked = on` property

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd vote to leave this one as is until we add support for markdown formatting to callout titles. Right now the inline code would be rendered as plain text. WDYT?

website/docs/02_components/forms/super_select/overview.mdx Outdated Show resolved Hide resolved
@kibanamachine
Copy link

Preview staging links for this PR:

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @tkajtoch

@tkajtoch tkajtoch merged commit c918703 into elastic:feat/new-docs Jan 17, 2024
6 checks passed
tkajtoch added a commit that referenced this pull request Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants