Skip to content

Conversation

@mirka
Copy link
Member

@mirka mirka commented Dec 20, 2024

Stacked on #68208

What?

Convert the Tabs README to an auto-generated one.

Supplementary information that was in the existing README is moved to other appropriate locations (JSDocs, Storybook "Best Practices" page).

Why?

To decrease maintenance cost and consolidate the canonical docs for our audience.

Testing Instructions

  • In your IDE, check imports of Tabs.Tab for example, and see that the JSDoc includes the subcomponent description.
  • npm run docs:components to regenerate READMEs.
  • See Storybook docs for Tabs.

@mirka mirka added [Type] Developer Documentation Documentation for developers [Package] Components /packages/components labels Dec 20, 2024
@mirka mirka self-assigned this Dec 20, 2024
@mirka mirka requested a review from ajitbohra as a code owner December 20, 2024 17:43
@github-actions
Copy link

github-actions bot commented Dec 20, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: mirka <[email protected]>
Co-authored-by: ciampo <[email protected]>
Co-authored-by: tyxla <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

*
* @default true
*
* @see https://www.w3.org/WAI/ARIA/apg/patterns/tabpanel/
Copy link
Member Author

Choose a reason for hiding this comment

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

We should avoid @see tags as they are suppressed in Storybook props tables, and don't make sense when displayed unformatted in the auto-generated README.

@github-actions
Copy link

github-actions bot commented Dec 20, 2024

Flaky tests detected in 31a04e1.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12519111570
📝 Reported issues:

Base automatically changed from autogen-readme-spacing to trunk December 20, 2024 22:54
@mirka mirka requested review from nerrad and ntwb as code owners December 20, 2024 22:54

// TODO: consider prop name changes (tabId, selectedTabId)
// switch to auto-generated README
// compound technique
Copy link
Member Author

Choose a reason for hiding this comment

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

@ciampo Not sure if these TODOs were even meant to be committed 😂 Do you want me to remove the rest, too?

@mirka mirka requested review from ciampo and tyxla December 27, 2024 17:59
Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

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

Nothing further, looks great 🚀

@mirka mirka merged commit ab89b44 into trunk Jan 2, 2025
67 of 68 checks passed
@mirka mirka deleted the autogen-tabs-readme branch January 2, 2025 07:40
@github-actions github-actions bot added this to the Gutenberg 20.0 milestone Jan 2, 2025
bph pushed a commit to bph/gutenberg that referenced this pull request Jan 8, 2025
* Components: Normalize newlines

* Tabs: Auto-generate README

* Remove redundant JSDocs

* Add "Using `Tabs` with links" section

* Tweak wording

Co-authored-by: Marin Atanasov <[email protected]>

* Tweak wording

Co-authored-by: Marco Ciampini <[email protected]>

* Fix typo

* Regenerate readme

* Fix lists

* Convert code snippets back to tab indentation

* Update readme

* Remove todo item

---------

Co-authored-by: mirka <[email protected]>
Co-authored-by: ciampo <[email protected]>
Co-authored-by: tyxla <[email protected]>
Gulamdastgir-Momin pushed a commit to Gulamdastgir-Momin/gutenberg that referenced this pull request Jan 23, 2025
* Components: Normalize newlines

* Tabs: Auto-generate README

* Remove redundant JSDocs

* Add "Using `Tabs` with links" section

* Tweak wording

Co-authored-by: Marin Atanasov <[email protected]>

* Tweak wording

Co-authored-by: Marco Ciampini <[email protected]>

* Fix typo

* Regenerate readme

* Fix lists

* Convert code snippets back to tab indentation

* Update readme

* Remove todo item

---------

Co-authored-by: mirka <[email protected]>
Co-authored-by: ciampo <[email protected]>
Co-authored-by: tyxla <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Components /packages/components [Type] Developer Documentation Documentation for developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants