-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Validated form controls: Add stories for validation in popovers #71282
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
base: trunk
Are you sure you want to change the base?
Conversation
|
Flaky tests detected in 7d00d9b. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/20141444021
|
7bd9c69 to
e10072b
Compare
e10072b to
75dce41
Compare
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for the PR! I noticed two things while testing:
- Hitting Enter inside the popover submits the form and navigates away. That might not be the intended behavior for this example.
- Since the render here is a bit more complex, the code docs aren't generated automatically. It might be worth adding the code snippet manually so folks browsing the stories have the full context.
form-controls-modal-popover.mp4
# Conflicts: # packages/components/src/validated-form-controls/components/stories/overview.story.tsx
Fixed in 75281c6 ✅
Very valid point. In fact the auto-generated snippets are not great in general, but we also have the maintenance concern where we don't want to manually maintain all these snippets, as they're quite error-prone. We have future plans for a dedicated reference site (not Storybook-based) where we can have high-quality snippets that are more maintainable, and can also be reused in a code sandbox or a live render, for example. |
|
These are now rebased onto the latest changes, and ready for final review 🙏 |
What?
Adds stories to demonstrate how validation can work in popovers.
Why?
There have been questions about how to make validation behave in popovers.
Testing Instructions
In the Validated Form Controls ▸ Overview section, see the "Validate in modal" and "Validate on popover close" stories.
Screenshots or screencast
CleanShot.2025-11-21.at.02-56-14.mp4
CleanShot.2025-11-21.at.02-57-51.mp4