Repository navigation
Experiment: Put directives on <figure> element and insert lightbox as its child - #51089
Merged
artemiomorales merged 5 commits intoJun 1, 2023
Conversation
artemiomorales
marked this pull request as ready for review
May 30, 2023 10:12
SantosGuillamot
approved these changes
May 30, 2023
Member
I tested a few scenarios, and it resolved the listed issues. |
Contributor
Author
|
@gziolo Who else should we ping to move this fix forward? |
artemiomorales
force-pushed
the
fix/revise-lightbox-html-structure
branch
from
May 31, 2023 15:06
b28c011 to
b01fb40
Compare
Contributor
Author
|
I realized the directives were being unnecessarily duplicated in the |
dmsnell
reviewed
May 31, 2023
dmsnell
reviewed
May 31, 2023
ajlende
reviewed
May 31, 2023
Contributor
|
This tests well for me as a fix for the Gallery layout issue. |
The <figure> directives were rendering not only in the body content, but also the lightbox. This ensures the directives do not appear in the lightbox.
artemiomorales
force-pushed
the
fix/revise-lightbox-html-structure
branch
from
June 1, 2023 12:14
c81c27c to
8b67eb3
Compare
sethrubenstein
pushed a commit
to pewresearch/gutenberg
that referenced
this pull request
Jul 13, 2023
… its child (WordPress#51089) * Put directives on <figure> element and insert lightbox as its child * Fix PHP spacing * Ensure <figure> directives are only rendered in body content The <figure> directives were rendering not only in the body content, but also the lightbox. This ensures the directives do not appear in the lightbox. * Improve syntax * Change directives suffix and `data-wp-island` --------- Co-authored-by: Mario Santos <santosguillamot@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
This revises the HTML structure for the experimental image lightbox by ensuring there is no wrapping
<div>.Why?
Addresses #51068 and related issues as detailed in the following comment, namely that containing a wrapping
<div>causes existing styles and functionality to break.How?
Adds directives to the
<figure>element using the tag processor, and does a regex for the<figure>closing tag, adding the lightbox HTML as its child.Testing Instructions
data-wp-contextanddata-wp-islandattributes have been added to the<figure>element.Testing Instructions for Keyboard
N/A