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

Reusable block selection issues #19436

Closed
ellatrix opened this issue Jan 6, 2020 · 6 comments · Fixed by #27887
Closed

Reusable block selection issues #19436

ellatrix opened this issue Jan 6, 2020 · 6 comments · Fixed by #27887
Labels
[Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Type] Bug An existing feature does not function as intended

Comments

@ellatrix
Copy link
Member

ellatrix commented Jan 6, 2020

Describe the bug

I'm not sure if any of these issues have been reported before.

  • It's currently possible to have a block inside a reusable block selected while another outside of it is selected. This seems really confusing to me.
  • The rich text toolbar buttons are duplicated, probably because they're all going to the first slot. (The slot name is global.)

Screenshot 2020-01-06 at 17 46 57

  • Pressing Tab from a block inside a reusable block focusses the next block outside of the reusable block instead of the inspector. This seems to be caused by having WritingFlow inside reusable blocks. I'm not sure why this is needed.
  • Selection is not cleared after Cmd+A and then selecting a block inside a reusable block.
@0aveRyan
Copy link
Contributor

0aveRyan commented Jan 6, 2020

These are separate from the focus issues in #19373, but likely both need to be accommodated in a resolution.

@youknowriad youknowriad added the [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) label Jan 13, 2020
@chrisvanpatten
Copy link
Contributor

chrisvanpatten commented Feb 27, 2020

I can confirm this in WordPress 5.3 and the latest version of the Gutenberg plugin. Also just to confirm it's not necessarily specific to reusable blocks, but I think specific to nested BlockList components.

(I'm working on a proof of concept component which allows you to store a set of blocks to post meta or another store, which is how I discovered this.)

There's also some funky behavior where the inner block borders can actually fully disappear, but I haven't been able to determine if it's specifically related to this issue or not.

It's similar but here's a screenshot of what I've seen:

Screen Shot 2020-02-27 at 4 28 04 PM

@chrisvanpatten
Copy link
Contributor

This continues to be an issue in recent plugin versions. It seems like the nested provider is maintaining its own state around block selection, which means that events in the upper container don't impact the lower container (and vice versa).

As far as I can tell, this issue was observed on the PR which implemented the nested editor (#14367) but hasn't really been addressed since.

@jasmussen
Copy link
Contributor

Can confirm, still a bug. GIF:

multiple toolbar

Steps to reproduce:

  • Create a reusable block of some paragraphs.
  • Save, edit.
  • Select a paragraph inside.
  • Select a paragraph outside.

Might need to repeat steps 3 and 4 a couple of times.

@ZebulanStanphill ZebulanStanphill added the [Type] Bug An existing feature does not function as intended label Apr 16, 2020
@noisysocks
Copy link
Member

My guess is that it's because the selection state is contained in a different registry. Fixing this will likely also fix #18560.

@ZebulanStanphill
Copy link
Member

It's worth noting that the misplaced controls still act upon their original block; the controls simply appear in the wrong spot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants