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

Inconsistant behavior of the pattern block hamburger modal popup in site editor #67043

Open
2 of 6 tasks
cbravobernal opened this issue Nov 15, 2024 · 3 comments
Open
2 of 6 tasks
Labels
[Package] Patterns /pacakges/patterns [Type] Bug An existing feature does not function as intended

Comments

@cbravobernal
Copy link
Contributor

cbravobernal commented Nov 15, 2024

Description

Originally reported on trac by @rick2414
https://core.trac.wordpress.org/ticket/62431

It is my expectation that the "hamburger popup" would be dismissed when it is clicked (as it is doing "copy to json", regardless of whether or not the user cancelled the resulting action.
I can understand that some might think it better to leave the hamburger popup open after an in-action "cancel", but the current behavior is inconsistent.

In my opinion this is a bug and the correct action is to dismiss the hamburger modal when it is clicked. Thoughts?

Step-by-step reproduction instructions

Demonstration steps:

"appearance"->"editor"->"patterns"->"all patterns", pick an unlocked pattern's hamburger icon (to get more options in popup to demonstrate the inconsistancy)
behavior A:
    select popup action "export as json" and observe the modal has been closed in the background.
    click "cancel" in file select modal and observe hamburger popup remains closed. 
behavior B:
    select hamburger action "rename" and observe the modal is still open in the background
    click "cancel" on rename modal and observe the hambeurger popup remains visible 

Screenshots, screen recording, code snippet

No response

Environment info

WordPress: 6.8-alpha-59403
PHP: 8.1.29
Server: nginx/1.16.0
Database: mysqli (Server: 8.0.16 / Client: mysqlnd 8.1.29)
Browser: Chrome 130.0.0.0
OS: macOS
Theme: Twenty Twenty-Four 1.3
MU Plugins: None activated
Plugins: Test Reports 1.2.0 

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure
@cbravobernal cbravobernal added the [Type] Bug An existing feature does not function as intended label Nov 15, 2024
@cbravobernal
Copy link
Contributor Author

@SainathPoojary commented:

Reproduction Report
Description

This report validates that issue regarding inconsistent behavior of the hamburger popup in the Patterns screen can be reproduced. Specifically, the popup closes after selecting “Export as JSON” but remains open after selecting “Rename.”
Environment

WordPress: 6.8-alpha-59403
PHP: 8.1.29
Server: nginx/1.16.0
Database: mysqli (Server: 8.0.16 / Client: mysqlnd 8.1.29)
Browser: Chrome 130.0.0.0
OS: macOS
Theme: Twenty Twenty-Four 1.3
MU Plugins: None activated
Plugins: Test Reports 1.2.0 

Actual Results

✅ Error condition occurs (reproduced). 

Additional Notes

Steps to Reproduce

Go to Appearance > Editor > Patterns > All Patterns.
Click Add New Pattern to create a test pattern.
After saving the new pattern, click the hamburger icon on the new pattern to open the options popup.
Behavior A:
    Select “Export as JSON” from the popup.
    Observe that the hamburger popup closes immediately. 
Behavior B:
    Click the hamburger icon again on the same pattern, and select “Rename” from the popup.
    Observe that the hamburger popup remains open.
    In the rename modal, click “Cancel.”
    Observe that the hamburger popup remains visible. 

Supplemental Artifacts

Video: https://utfs.io/f/PL8E4NiPUWyOfWkSeN4ctlDHSkwfNGujMUIyo2W4P7rqvbXB

@cbravobernal
Copy link
Contributor Author

@yogeshbhutkar commented:

Thank you, @rickers, for raising the ticket.

From my perspective, this behavior appears to be intentional and consistent with the functionality of Duplicate, Rename, and Delete operations.

I’ll await further discussions on this topic to explore potential possibilities.

@cbravobernal
Copy link
Contributor Author

cbravobernal commented Nov 15, 2024

@rick2414 commented:

Thank you @yogeshbhutkar for your comments and @SainathPoojary for your additional information.

I make the case that the block-pattern's hamburger is a block-pattern nav-menu or action-menu. A nav-menu closes when you pick an item (think window menu bar). Additionally, in the case of a locked pattern, the only choice is duplicate, and if you cancel the "duplicate action" it's unlikely you will want to do it again, yet the nav-menu remains. If you do duplicate the block the menu remains, as if you might want to duplicate it again.

If I rename the block, the nav-menu remains so I can rename it again, I suppose, without re-selecting the hamburger. I don't call that convenience - rather annoyance. Only the "export as json" closes the hamburger nav-menu as it should IMHO.

@cbravobernal cbravobernal added the [Package] Patterns /pacakges/patterns label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Patterns /pacakges/patterns [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

1 participant