Skip to content
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

Modals: patterns selector appears over welcome guide modal #65104

Open
2 tasks done
ramonjd opened this issue Sep 6, 2024 · 1 comment
Open
2 tasks done

Modals: patterns selector appears over welcome guide modal #65104

ramonjd opened this issue Sep 6, 2024 · 1 comment
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Type] Bug An existing feature does not function as intended

Comments

@ramonjd
Copy link
Member

ramonjd commented Sep 6, 2024

Description

The pattern selector modal activates itself with few or no environmental checks when creating a new page.

For new users, the pattern selector will appear over the welcome guide.

The welcome guide is, I assume, a more fundamental introduction to the editor than the pattern selector and therefore should take precedence.

I would expect, rather, the welcome guide to show first. After dismissing the welcome guide only would the patterns selector show.

I'm not quite sure yet, but it might be worthwhile to register open modals through the interface store.

For this specific instance, something like:

// WelcomeGuide component
const { openModal, closeModal } = useDispatch( interfaceStore );
openModal( 'editor/welcome-guide' );
<WelcomeGuide onClose={ onClose } />
// Elsewhere
const welcomeGuideActive = select( interfaceStore ).isModalActive(
    'editor/welcome-guide'
);

Or relocate or remove the intrusive pattern selector modal.

Related

Step-by-step reproduction instructions

  1. Create a new users or better, a fresh WP install with GB trunk active
  2. Delete any preferences in localStorage
  3. Create a new page in the post or site editor
  4. Witness how the the modal compete for you attention

Screenshots, screen recording, code snippet

Site Editor

2024-09-06.12.12.13.mp4

Post Editor

2024-09-06.11.27.04.mp4

Environment info

  • Gutenberg trunk

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes
@ramonjd ramonjd added the [Type] Bug An existing feature does not function as intended label Sep 6, 2024
@ramonjd ramonjd changed the title Modals: centralize active modal registry to avoid collisions Modals: patterns selector appears over welcome guide modal Sep 6, 2024
@andrewserong andrewserong added the [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced label Sep 6, 2024
@annezazu
Copy link
Contributor

annezazu commented Sep 9, 2024

Somewhat related (or would be nice to improve alongside this): #63947

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants