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

FSE: Contextual Tips issues with Block Directory #44397

Closed
WunderBart opened this issue Jul 23, 2020 · 8 comments
Closed

FSE: Contextual Tips issues with Block Directory #44397

WunderBart opened this issue Jul 23, 2020 · 8 comments
Labels
[Pri] High Address as soon as possible after BLOCKER issues [Size] S Small sized issue

Comments

@WunderBart
Copy link
Member

FSE’s Contextual Tips seem to be working differently since the v8.4.0 introduced the Block Directory. I noticed two things:

1. Inline inserter doesn't show the Contextual Tips anymore

This happens on both, Simple and Atomic sites.

image

2. Main inserter shows the tips at the bottom, instead of the top

This happens on Simple sites only where we had to disable the Block Directory. On Atomic sites, they’re rendered at the top.

Simple site, Contextual Tip at the bottom:
image

Atomic site, Contextual Tip at the top:
image

Context: p7DVsv-8X4-p2#comment-30041
Related: r210682-wpcom

@davemart-in davemart-in added [Pri] High Address as soon as possible after BLOCKER issues [Size] S Small sized issue labels Jul 23, 2020
@jeryj
Copy link
Contributor

jeryj commented Jul 28, 2020

Main inserter shows the tips at the bottom, instead of the top

This is due to WPcom adding a fill on the same __experimentalInserterMenuExtension slot. Work in progress at D47125-code.

@jeryj
Copy link
Contributor

jeryj commented Jul 28, 2020

Inline inserter doesn't show the Contextual Tips anymore

The inline inserter is a new component called the <QuickInserter />, added in this PR: WordPress/gutenberg#22789

The Contextual Tips uses the <__experimentalInserterMenuExtension.Slot />. This Slot isn't present on the <QuickInserter />, and I don't see any slots available on it.

More context: p7DVsv-8X4-p2#comment-30101

@jeryj jeryj removed their assignment Jul 28, 2020
@davemart-in
Copy link
Contributor

@WunderBart I'm sending this one back to your team. @jeryj did some investigation and it looks like we'll need to create a new Slot in Gutenberg core to fix this.

@sirreal
Copy link
Member

sirreal commented Jul 31, 2020

We could give our empty results handler a lower priority so it's enqueued first, but we have to go into negative values because the current contextual enqueuing action has the extremely low value of 0 as opposed to the default 10:

add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\enqueue_block_inserter_modifications', 0 );

@jeryj Do you know if there's a reason for that to have such a low priority?

See D47395-code (sets priority -1) for an alternative to D47125-code.

@sirreal
Copy link
Member

sirreal commented Aug 3, 2020

See D47395-code (sets priority -1) for an alternative to D47125-code.

I got this backwards and have updated D47395-code accordingly.

@sirreal
Copy link
Member

sirreal commented Aug 3, 2020

Fixed by r211559-wpcom

@sirreal sirreal closed this as completed Aug 3, 2020
@sirreal
Copy link
Member

sirreal commented Aug 3, 2020

@davemart-in @jeryj I closed this based on contextual tips positioning in the main inserter (fixed by r211559-wpcom). Did this need to stay open to track missing contextual tips in the quick inserter?

@davemart-in
Copy link
Contributor

Nope, happy to close this out if it's fixed. Thanks @sirreal!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Pri] High Address as soon as possible after BLOCKER issues [Size] S Small sized issue
Projects
None yet
Development

No branches or pull requests

4 participants