Preview cards should not render Warnings or other interactive UIs that are not a preview #68131
Open
2 of 6 tasks
Labels
Needs Design Feedback
Needs general design feedback.
[Package] Editor
/packages/editor
[Type] Bug
An existing feature does not function as intended
Description
Reported by @t-hamano on #67433 (comment)
The editor uses 'preview cards' in a few places. For example the list of Patterns 9In the inserter and other places) shows a 'card' with the pattern preview.
These previews are the actual rendering of the patterns. As such, they also render warnings and potentially other UIs that aren't really part of the preview.
For example, when a Pattern contains a block with invalid markup, it makes perfectly sense to show the Warning in the editing view. Screenshot:
However, it doesn't make any sense showing the Warning in the card preview. Screenshot:
Such a warning rendered there is hardly usable and I guess it also breaks the accessibility and semantics of the preview card.
Step-by-step reproduction instructions
Block contains unexpected or invalid content.
warning.Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: