-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Do not show the block settings menu if selected block is invalid #12209
Conversation
</Fragment> | ||
) } | ||
<BlockSettingsMenu clientIds={ blockClientIds } /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why it wasn't considered before to hide this if the block is invalid, so I'd want some perspective on the potential implications of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jasmussen - I'm wondering if this 3 dots menu makes sense when in the text mode. If we would update UI to show only the exit button, we wouldn't have to worry about many things which might not make sense in this mode. Similar issues may apply when you make your HTML invalid and duplicate it, etc. A similar question applies to the case when a block is invalid and we show alternative UI. Should we still show the menu in the unified toolbar? Or maybe we should move action controls from the block to the unified toolbar for consistency? I don't know answers but wanted to share some questions that this screencast raises :) |
To this PR specifically, I think it's important we don't hide the ellipsis menu just because the block is invalid. You want to be able to delete it. You want to be able to insert before or after. You want to be able to release a reusable invalid block, perhaps.
Just to be sure I'm understanding you, you're referring to the More menu in the top right corner of the screen, correct? If yes, I don't think this is a good idea. I understand that there are a number of menu options that don't make sense in that mode — I would rather we remove those items, or disable them. Or even look at alternatives, like making the HTML editor a modal, but I suspect that won't be popular as many use the text editor exclusively. |
I agree with Joen, this PR isn't a good idea. I was just exploring out of frustration with this bug. Prepared a different alternative at #12214 that solves the problem for every client that uses the |
It's a good PR! It's important to explore all avenues, and even if we decide it's not a good idea, that just means we cauterized an avenue and are smarter for it. |
Agreed! I meant I changed my mind (or rather, decided this wasn't a good avenue to walk after all) after learning how the |
Yes, this one looks promising 👍 |
Alternative to #12052
Fixes #12002
Please, consider this PR together with #12052 We only want to merge one of them.
The
blockSelection
mechanism doesn't get updated with theUNDO
/REDO
actions. I haven't found an easy approach to solve the root problem, so I originally proposed we merged #12052 that hides the plugin slot in the BlockSettingsMenu so the editor doesn't break.This PR is more holistic in that in hides the whole BlockSettingsMenu instead of only the plugin slot.