WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.5k stars 4.2k forks source link

Improve Lock/Unlock Block Feature for Usability and Ensure Proper Functionality #65121

Open alexdeborba opened 2 months ago

alexdeborba commented 2 months ago

Description

The Lock/Unlock Block feature in the block editor seems unintuitive and may not function as expected. From a user perspective, clicking the lock icon should intuitively provide options to unlock the block. However, this is not the case. Instead, users must navigate to the three-dot menu and select the Unlock option, which opens a modal with the settings, requiring multiple clicks to unlock the block.

Additionally, the current locking mechanism does not seem to cover other crucial elements such as Typography, Margins, and other block settings. Even when locked, elements can still be moved, suggesting that the lock feature may not be functioning correctly or that it lacks expected functionality.

Expected Behavior: Clicking on the Lock icon should directly provide options to unlock the block. The lock feature should restrict changes to additional elements such as Typography, Margins, etc., and prevent moving elements when locked.

Actual Behavior: The Lock icon does not provide a direct way to unlock the block; additional clicks are required. The lock feature does not cover additional settings, and elements can still be moved when locked.

Step-by-step reproduction instructions

  1. Go to the WordPress block editor.
  2. Click on a block and select the Lock icon.
  3. Observe that clicking the lock icon does not provide the option to unlock directly.
  4. Click on the three dots in the block toolbar and select "Unlock."
  5. Notice that this action opens a modal with additional settings.
  6. Attempt to adjust Typography, Margins, or other settings even when the block is locked.

Screenshots, screen recording, code snippet

Screenshot 2024-09-06 at 06-36-04 Edit Page “Arts Cultures Events and Reviews” ‹ Atmostfear Entertainment — WordPress Screenshot 2024-09-06 at 06-36-20 Edit Page “Arts Cultures Events and Reviews” ‹ Atmostfear Entertainment — WordPress Screenshot 2024-09-06 at 06-36-40 Edit Page “Arts Cultures Events and Reviews” ‹ Atmostfear Entertainment — WordPress Screenshot 2024-09-06 at 06-37-09 Edit Page “Arts Cultures Events and Reviews” ‹ Atmostfear Entertainment — WordPress

Environment info

WordPress version: 6.6.1 Gutenberg version: 19.1.0 Active Theme: Aegis 1.0.0-beta.3 Browser(s): Firefox Developer Edition Device: Desktop

Please confirm that you have searched existing issues in the repo.

Please confirm that you have tested with all plugins deactivated except Gutenberg.

kspilarski commented 2 months ago

Hi @alexdeborba, thanks for your report.

I've includedEnhancement tag to this report for the feature request for these:

1)

  • The Lock icon does not provide a direct way to unlock the block; additional clicks are required.
    • Clicking on the Lock icon should directly provide options to unlock the block.

Currently, locking a block requires clicking the block first, then the 3 dots, and "lock".

To unlock a block, it takes 4 - 5 clicks.

2)

  • The lock feature should restrict changes to additional elements such as Typography, Margins, etc., and prevent moving elements when locked.

Changes to the typography, margins, colors, and backgrounds can be made to the block even if it's locked.

Screen recording to a locked block where style changes can be made: Screen Capture on 2024-09-09 at 13-34-08

Feature request: Add options in "Lock All" to disable style changes:

Screenshot 2024-09-09 at 13 37 10

The lock feature does not cover additional settings, and elements can still be moved when locked.

I tested this and can't replicate it. On my test site, when a block is selected to be locked and "disable movement" is enabled, the block cannot be moved or dragged (unlike unlocked blocks).

Gustavo-Hilario commented 1 month ago

Thank you all for reporting and testing this. I replicated the tests @kspilarski ran, and I got the same results. Those are two great feature requests that could enhance the block lock/unlock feature.

I also could not replicate the issue with moving locked blocks. On my tests, they could only be moved when the Disable movement option was disabled.

github-actions[bot] commented 1 month ago

Help us move this issue forward. This issue is being marked stale since it has no activity after 15 days of requesting more information. Please add info requested so we can help move the issue forward. Note: The triage policy is to close stale issues that need more info and no response after 2 weeks.