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

Convert multiple images into a Masonry Gallery block #1855

Merged
merged 27 commits into from
Apr 6, 2021
Merged

Conversation

jrtashjian
Copy link
Member

@jrtashjian jrtashjian commented Mar 16, 2021

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:

  • My code is tested
  • My code follows accessibility standards
  • My code has proper inline documentation
  • I've included any necessary tests
  • I've included developer documentation
  • I've added proper labels to this pull request

@jrtashjian jrtashjian self-assigned this Mar 16, 2021
@jrtashjian jrtashjian added the [Status] In Progress Tracking issues with work in progress label Mar 16, 2021
@cypress
Copy link

cypress bot commented Mar 16, 2021



Test summary

106 0 2 0


Run details

Project CoBlocks
Status Passed
Commit 3c33821
Started Apr 6, 2021 3:32 PM
Ended Apr 6, 2021 3:36 PM
Duration 04:03 💡
OS Linux Debian - 10.6
Browser Multiple

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

@jrtashjian jrtashjian marked this pull request as ready for review March 18, 2021 16:19
@jrtashjian jrtashjian added [Status] Needs Review Tracking pull requests that need another set of eyes and removed [Status] In Progress Tracking issues with work in progress labels Mar 18, 2021
@jrtashjian
Copy link
Member Author

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.

@jrtashjian jrtashjian requested review from richtabor and removed request for EvanHerman and AnthonyLedesma March 19, 2021 19:15
@jrtashjian jrtashjian added this to the Next Release milestone Mar 19, 2021
@snovosel snovosel modified the milestones: 2.9.1, Next Release Mar 23, 2021
@@ -140,7 +140,9 @@ export function addBlockToPost( blockName, clearEditor = false ) {
}

if ( clearEditor ) {
clearBlocks();
cy.wrap( null ).then( () =>
Copy link
Member

Choose a reason for hiding this comment

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

😨

Copy link
Member Author

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.

Copy link
Member

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.

@AnthonyLedesma
Copy link
Member

AnthonyLedesma commented Apr 6, 2021

I have a suspicion of what is going on. Going to make a change to some tests here.

@AnthonyLedesma AnthonyLedesma merged commit ef3c468 into master Apr 6, 2021
@AnthonyLedesma AnthonyLedesma deleted the issue-1753 branch April 6, 2021 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Needs Review Tracking pull requests that need another set of eyes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Converting individual images into a Masonry Gallery will return a broken block
3 participants