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

Central Command Area missing when Block with No Tools is Selected #57288

Closed
jeryj opened this issue Dec 20, 2023 · 2 comments · Fixed by #58979
Closed

Central Command Area missing when Block with No Tools is Selected #57288

jeryj opened this issue Dec 20, 2023 · 2 comments · Fixed by #58979
Assignees
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@jeryj
Copy link
Contributor

jeryj commented Dec 20, 2023

Description

When a block with no tools is selected, the top toolbar will show a collapse icon even though no block tools are there. I think we could put a hasAnyBlockControls check within the privately exported useCanBlockToolbarBeFocused.

Step-by-step reproduction instructions

  • Go to Site Editor
  • Turn on Top Toolbar
  • Edit Navigation Template Part
  • Click navigation item
  • Press Up Arrow until the block toolbar disappears and only a collapse icon shows in its place.

Screenshots, screen recording, code snippet

Navigation Template Part with No Block Tools available and central document command center missing
@jeryj jeryj added the [Type] Bug An existing feature does not function as intended label Dec 20, 2023
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Dec 20, 2023
jeryj added a commit that referenced this issue Feb 13, 2024
@Mamaduka
Copy link
Member

Related #40346.

So far, I can only reproduce the issue with the Navigation block. The getBlockSelectionStart points to a block that no longer exists in the store, at least with the same clientId.

I guess that the Navigation block recreates its controlled block without properly updating the selection. While #58979 will potentially resolve the issue, it would be nice to track down the cause for the Nav block as well.

@jeryj
Copy link
Contributor Author

jeryj commented Feb 14, 2024

@Mamaduka Ooooh that's a great find! I didn't check to see if it was a navigation block specific bug. I incorrectly assumed that there were blocks with no tools. I do think the idea of #58979 will be useful to have a centralized check of what block tools are showing, and you're right that there's some deeper issue going on with the navigation block here.

jeryj added a commit that referenced this issue Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
2 participants