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

Text and Heading: improve docs around default values and truncation logic #56518

Merged
merged 3 commits into from
Nov 29, 2023

Conversation

ciampo
Copy link
Contributor

@ciampo ciampo commented Nov 24, 2023

What?

Improve the docs (both static and Storybook) for the Text and Heading components

Why?

  • Consumers of the components (especially Heading) may get confused to why truncation is not working as expected
  • Some default values are not documented correctly

How?

Improve docs, both README and JSDocs for prop types

Testing Instructions

  • Check the code changes
  • Check that Storybook examples for Heading and Text work as expected, and that the changes are reflected in Storybook generated docs

@ciampo ciampo added [Type] Developer Documentation Documentation for developers [Package] Components /packages/components labels Nov 24, 2023
@ciampo ciampo self-assigned this Nov 24, 2023
@ciampo ciampo requested review from jameskoster and a team November 24, 2023 18:33
Copy link

github-actions bot commented Nov 24, 2023

Flaky tests detected in a4eea45.
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/7034368380
📝 Reported issues:

Copy link
Contributor

@brookewp brookewp left a comment

Choose a reason for hiding this comment

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

Great idea to clarify truncate won't work if isBlock is true. 🎉

Curious if it would be helpful to note under truncate as well? I could see it being a bit redundant so will mark this as ✅

@ciampo ciampo force-pushed the fix/text-heading-truncate-docs branch from 5c46d45 to a4eea45 Compare November 29, 2023 14:55
@ciampo ciampo enabled auto-merge (squash) November 29, 2023 14:57
@ciampo ciampo merged commit 0c997f2 into trunk Nov 29, 2023
52 checks passed
@ciampo ciampo deleted the fix/text-heading-truncate-docs branch November 29, 2023 15:25
@github-actions github-actions bot added this to the Gutenberg 17.2 milestone Nov 29, 2023
derekblank pushed a commit that referenced this pull request Dec 7, 2023
…ogic (#56518)

* Text and Heading: improve docs around default values and truncation logic

* CHANGELOG

* Improve docs, fix typos
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
Status: Done 🎉
Development

Successfully merging this pull request may close these issues.

2 participants