Validated form controls: Add stories for validation in popovers
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
https://github.com/user-attachments/assets/4e640f92-cba6-46ff-b372-f2e6206e1f27
https://github.com/user-attachments/assets/0f37cc83-c68c-4fe0-b64e-e54db006b94d
Flaky tests detected in 7d00d9bcf374f7769c03f455eae3fcc21443e8df. 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/20141444021 📝 Reported issues:
- #73743 in
/test/e2e/specs/site-editor/template-id-format.spec.js
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: juanfra <[email protected]>
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.
- Hitting Enter inside the popover submits the form and navigates away.
Fixed in 75281c6 ✅
- 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.
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 🙏