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

Block Settings Menu: Disable 'Move to' if there is only one block. #33135

Conversation

getsource
Copy link
Member

@getsource getsource commented Jul 1, 2021

Description

In the Block Settings Menu, disables "Move to" when there is only one block.

I set it to disabled due to the request in #33029, but while working on it, I noticed that other items in the Block Settings Dropdown aren't displayed when they aren't actionable. Happy to change to that behavior if it's desired.

Fixes: #33029

How has this been tested?

  • Check to confirm "Move to" is disabled with one block
  • Add another block
  • Check to confirm "Move to" is enabled and functions
  • Remove one block
  • Check to confirm "Move to" is disabled again.

Screenshots

Screen.Recording.2021-07-01.at.23.05.38.mov

Types of changes

Enhancement

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@getsource getsource requested a review from ellatrix as a code owner July 1, 2021 13:51
@getsource getsource added [Feature] Blocks Overall functionality of blocks [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Type] Enhancement A suggestion for improvement. labels Jul 1, 2021
Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Thank you for this fix @getsource!

@jorgefilipecosta jorgefilipecosta merged commit fe77cd3 into WordPress:trunk Jul 1, 2021
@mtias
Copy link
Member

mtias commented Jul 1, 2021

Indeed, might be fine to skip rendering it entirely.

@getsource getsource deleted the update/hide-move-to-with-one-block/33029 branch July 2, 2021 07:41
@getsource
Copy link
Member Author

getsource commented Jul 2, 2021

Thank you @jorgefilipecosta and @mtias !

Indeed, might be fine to skip rendering it entirely.

I like the idea of reducing noise and UI elements when possible, so I added a follow-up PR for consideration: #33158

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable "move to" if there is only one block
3 participants