docs(components): Update Menu documentation#3146
Open
taylorvnoj wants to merge 4 commits into
Open
Conversation
Deploying atlantis with
|
| Latest commit: |
44a0e5e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9931e0ed.atlantis.pages.dev |
| Branch Preview URL: | https://job-164255-menu-eng-docs.atlantis.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why Is This Changing?
Menudocs were out of sync with the current composable API. The docs page still surfaced deprecateditemsAPI examples in some places.We also want
Menuto follow the newer colocatedpackages/components/src/<Component>/docsexample pattern already used by other components.What Is Changing?
Updated
Menudocumentation to center the composable API and clarify current guidance aroundMenu.Trigger,Menu.Content, grouping, deprecated wrappers, and legacy items usage.Moved
Menuexample components intopackages/components/src/Menu/docs/, updatedMenustories to render those extracted examples, and wired the docs page to explicitCanvas code={...}examples.Also updated the site-level quick example in
packages/site/src/content/Menu/index.tsxso it uses the composable API instead of the deprecated items API.Consumer Impact
Validation
Make sure the Docs page renders actual code examples:
Before
After
NOTE: I know it's referencing
ForwardRefin a few places. It's a Storybook source-generation issue. There is currently not a fix (that I'm aware of) that won't impact runtime behaviour. ThisForwardRefissue also impacts the props page (not displayingMenu.Itemin the list of subcomponents) and will also be an issue for components likeAutocomplete,Tabs, etc. There is planned follow up here in general for our documentation.Docs site Canvas uses composable
Menu:Implement tab has up to date documentation for composable
Menu:Reviewer Notes
Changes can be
tested via Pre-release
In Atlantis we use Github's built in pull request reviews.