-
Notifications
You must be signed in to change notification settings - Fork 148
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
Convert multiple images into a Masonry Gallery block #1855
Conversation
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
Fixed all tests except the ones related to the settings modal. Fixes for that group of tests will be included in a new PR which refactors the modal store. |
.dev/tests/cypress/helpers.js
Outdated
@@ -140,7 +140,9 @@ export function addBlockToPost( blockName, clearEditor = false ) { | |||
} | |||
|
|||
if ( clearEditor ) { | |||
clearBlocks(); | |||
cy.wrap( null ).then( () => |
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.
😨
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 going to revert this. Looks like what you tried didn't work either. I'm going to try simply creating a new page.
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.
Reverting sounds good. This is strange. I am confused as to why this condition is able to occur. It almost seems like it happens just when clearing the blocks.
I have a suspicion of what is going on. Going to make a change to some tests here. |
Description
Resolves #1753. The ability to select multiple image blocks and tranform them into the Masonry gallery has been added. This has also been added to the Carousel and Stacked blocks.
I was unable to get this working on the Collage and Offset gallery blocks due to a separate issue with how we manage internal state and attributes when the component mounts. I believe we need to refactor this a bit to prevent mutating the attributes unless the user has actually made a change.
This is PR considered a bug fix because the ability was built into the transforms feature of blocks but our code was not handling it properly.
Types of changes
Bug fix (non-breaking change which fixes an issue)
How has this been tested?
Jest tests
Checklist: