Skip to content

Docs: Add error message guidance. - #81143

Merged
ramonjd merged 3 commits into
trunkfrom
add/error-message-guidance
Aug 11, 2026
Merged

Docs: Add error message guidance.#81143
ramonjd merged 3 commits into
trunkfrom
add/error-message-guidance

Conversation

@jasmussen

Copy link
Copy Markdown
Contributor

What?

Related to #81123 but also Defensive Data Design. Adds Storybook docs on how to write good error messages.

This is a first draft, I expect improvements in the future.

Testing Instructions

npm run storybook:dev

Use of AI Tools

Yes.

@ramonjd ramonjd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

just left some non-blocking observations... thanks!


<Meta title="Design System/Patterns/Error Messages" />

# Error Messages

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

docs/contributors/documentation/copy-guide.md already has a section titled "Error Messaging". Is story book separate or should it be canonical?

If the preference is to link off to the official GB docs, then I think there's scope to give principles 1–5 a hair cut then add the link off to docs/contributors/documentation/copy-guide.md

What do you think?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good question. Storybook is contextual to the design system in a way that those more formal docs are not, and more easy to maintain. I'd prefer keeping most of it here. For now I'll add a link.

Comment thread storybook/stories/design-system/patterns/error-messages.mdx Outdated
Comment thread storybook/stories/design-system/patterns/error-messages.mdx Outdated
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

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: jasmussen <joen@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>

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

@jasmussen

Copy link
Copy Markdown
Contributor Author

Thanks for all the feedback, agree with all of it. Just connecting a dot to a comment here: #81195 (comment)

@jasmussen
jasmussen force-pushed the add/error-message-guidance branch from 353a511 to e4c3fe3 Compare August 10, 2026 07:54
@jasmussen

Copy link
Copy Markdown
Contributor Author

Solid feedback, addressed all of it.

@ramonjd ramonjd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Thanks for the changes. I just pushed a small commit that escapes curly braces, the power of which took down the storybook build!! πŸ’£

@ramonjd
ramonjd force-pushed the add/error-message-guidance branch from b7a5fdf to 826c772 Compare August 11, 2026 00:17
@ramonjd
ramonjd enabled auto-merge (squash) August 11, 2026 00:30
@ramonjd
ramonjd merged commit 9cfdedd into trunk Aug 11, 2026
44 checks passed
@ramonjd
ramonjd deleted the add/error-message-guidance branch August 11, 2026 00:53
@github-actions github-actions Bot added this to the Gutenberg 23.8 milestone Aug 11, 2026
@jasmussen

Copy link
Copy Markdown
Contributor Author

Thanks for the help here!

shail-mehta pushed a commit that referenced this pull request Aug 12, 2026
Co-authored-by: jasmussen <joen@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Developer Documentation Documentation for developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants