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

Edit content mode (select mode): Ellipsis menu button in list view is empty #65504

Open
2 tasks done
Tracked by #60021
andrewserong opened this issue Sep 20, 2024 · 7 comments
Open
2 tasks done
Tracked by #60021
Assignees
Labels
[Feature] List View Menu item in the top toolbar to select blocks from a list of links. [Type] Bug An existing feature does not function as intended

Comments

@andrewserong
Copy link
Contributor

Description

Following #65204, blocks in the list view still show an ellipsis menu, and it's clickable, however the menu is empty.

In this case, where the menu will be empty, shall we skip the ellipsis menu button from rendering?

Step-by-step reproduction instructions

  1. Open the site editor
  2. At the top left, click the pointer icon and switch from Design mode to Edit mode (formerly known as Select mode)
  3. Open the list view, and see that there is still an ellipsis menu button for each item in the list view

Screenshots, screen recording, code snippet

image

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
@andrewserong andrewserong added [Type] Bug An existing feature does not function as intended [Feature] List View Menu item in the top toolbar to select blocks from a list of links. labels Sep 20, 2024
@youknowriad
Copy link
Contributor

I think this is most likely fixed by #65485

@youknowriad youknowriad self-assigned this Sep 23, 2024
@andrewserong
Copy link
Contributor Author

Just re-tested on trunk, and it's close now, but we still expose the block settings menu in some circumstances. Mostly it's hidden (e.g. with headings and paragraphs), however Button blocks still appear to show the settings menu:

2024-09-25.10.45.22.mp4

@richtabor
Copy link
Member

Confirmed, this is still happening for the button block at least. I'm not following the conditions why this block is treated differently, even from List Item block.

@youknowriad
Copy link
Contributor

Can't reproduce this at the moment. I see a "duplicate" menu item for buttons.

@andrewserong
Copy link
Contributor Author

Can't reproduce this at the moment. I see a "duplicate" menu item for buttons.

I just re-tested and I think it's largely gone now. Since we now allow duplication, I think that's largely hidden the issue as we only rarely see a situation where the settings menu is empty. This is pretty edge-casey, but I can now reproduce the issue if I lock a button block (i.e. as might be the case within a pattern), and then switch to content only mode, as in that case Duplicate will not be available:

2024-10-24.13.50.12.mp4

IMO this makes it much lower priority to fix, as in most cases users likely won't encounter this? Still, it could be good to polish it at some point.

@youknowriad
Copy link
Contributor

My guess is that it's not really fixable with how our extensibility APIs work. We have slots that inject menu elements to these dropdown, and I believe there's no way to know whether there will be something rendered on these slots or not without actually opening the block settings menu.

That said, we could be "more conservative" and say: just hide the whole dropdown if "content only" or something regardless of whether there are fills or not.

@draganescu
Copy link
Contributor

just hide the whole dropdown if "content only"

I think we just expanded the list of available optopns in this dropdown, right? Maybe the dropdown should say it's empty if it's empty with some disabled state ... although that never fares well 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] List View Menu item in the top toolbar to select blocks from a list of links. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants