-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
StartPageOptionsModal should not render if content was added to a page #54227
Comments
You can test the above using https://github.com/WordPress/twentytwentyfour. The theme will have a starter patterns added; so this will become more prevalent than it is today (where hardly any themes are leveraging this flow). Related: WordPress/twentytwentyfour#209 |
Can you reproduce the bug without the Gutenberg plugin? This is probably a regression after #53673. The modal state is now local to a I can also see a modal flash when updating an existing page without the content. Here's the Replay link: https://app.replay.io/recording/the-start-page-options-modal-flashes-when-updating-page--c1d0ebdb-4d57-41ef-8a88-41e433e9b52f cc @jsnajdr |
I can reproduce this even with #53673 reverted, the bug must have been there for a very long time. The bug manifests in two ways:
We'll need to improve the condition to really match only pages that are brand new and empty. |
Fixing in #54227 🙂 I'm looking forward to trying out the starter patterns in Twenty Twenty-Four 👍 |
Currently the
StartPageOptionsModal
renders when you add a new post/page, but also when you remove all the content on a page. This makes for a disorienting experience, as a modal pops up out unexpectedly.I think the modal should only render when creating a new page.
If any content has been added to the page, then removed, the
StartPageOptionsModal
should not render again.If we want to still provide a mechanism for users to view the modal, we can add a snackbar notification
"Choose a starter pattern."
that renders in this scenario (after content has been added and the content is removed) which provides an action"View patterns"
for viewing the starter patterns.Current experience
I delete the last top-level block on my page and the modal pops up unexpectedly.
CleanShot.2023-09-06.at.14.01.26.mp4
The text was updated successfully, but these errors were encountered: