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

Fix Lightbox for Masonry block #2565

Merged
merged 4 commits into from
Aug 28, 2023
Merged

Fix Lightbox for Masonry block #2565

merged 4 commits into from
Aug 28, 2023

Conversation

AnthonyLedesma
Copy link
Member

@AnthonyLedesma AnthonyLedesma commented Aug 28, 2023

Description

Apparently, the V1 block.json was being loaded for the Masonry block instead of the v2 that it should be using. We keep some old code around for backward compat and conditionally load that old block. The new logic around globbing the paths and registering all blocks did not account for this. Added some new logic to ensure we do not register legacy blocks.

New tests added to catch if this issue ever reoccurs.

Screenshots

MasonryImages

Types of changes

Fixed logic around block registration, fixed block.json 'viewScript' property, registered the script to enqueue later, and added new e2e tests to catch if this ever happens again.

How has this been tested?

E2E and manually tested.

Acceptance criteria

Lightbox should be working with Masonry block.

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

@AnthonyLedesma AnthonyLedesma added the [Priority] Critical This issue/pull request needs resolving immediately, likely followed by a hot-fix label Aug 28, 2023
@AnthonyLedesma AnthonyLedesma added this to the 3.1.3 milestone Aug 28, 2023
@AnthonyLedesma AnthonyLedesma self-assigned this Aug 28, 2023
@AnthonyLedesma AnthonyLedesma merged commit 8e5701c into master Aug 28, 2023
@AnthonyLedesma AnthonyLedesma deleted the fix-masonry-lightbox branch August 28, 2023 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Priority] Critical This issue/pull request needs resolving immediately, likely followed by a hot-fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants