-
Notifications
You must be signed in to change notification settings - Fork 384
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
Rework how and whether galleries are rendered as carousels #4775
Merged
Merged
Changes from 13 commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
7a2ca29
Rework how and whether galleries are rendered as carousels
westonruter 9fb2644
Merge branch 'develop' into fix/gallery-carousel-defaults
pierlon d186af5
Remove `loading` attribute from img tag since dimensions are not prov…
pierlon a078832
Merge branch 'develop' into fix/gallery-carousel-defaults
pierlon 2a7ace2
Fix display of HTML captions in AMP carousel
pierlon 6d055ad
Fix lightbox not showing images
pierlon 0f213bd
Merge branch 'develop' into fix/gallery-carousel-defaults
pierlon 38298f3
Merge branch 'develop' into fix/gallery-carousel-defaults
pierlon 19b45c9
Refactor logic handling gallery embed shortcodes and blocks
pierlon eba5869
Merge branch 'develop' into fix/gallery-carousel-defaults
pierlon 8e261da
Fix lint errors
pierlon fd3e9f2
Fix test errors
pierlon 03df2b2
Indicate `$caption_node` is an instance of DOMElement
pierlon 9467dcc
Use constants for tag names
pierlon b7df289
Merge branch 'develop' of github.com:ampproject/amp-wp into fix/galle…
westonruter bab1fc9
Prevent gallery_style filter from applying to other shortcodes
westonruter c097f62
Harden matching the class attribute
westonruter b64cc1e
Use __FUNCTION__ to refer to the current function
westonruter a6269b5
Improve means of preventing infinite recursion when calling gallery_s…
westonruter 9336e13
Reuse Tag::FIGCAPTION
westonruter 81a8004
Make insertion of `data` attributes more robust
pierlon 2421fb3
Remove re-importing of element
pierlon 7d9a41d
Use already retrieved attributes
pierlon 0bd44f9
Enforce `DOMElement` type for caption slide
pierlon 0ce7c51
Enforce slide node as being an element same as caption
westonruter adc609d
Ensure gallery caption is retained
pierlon 0c568e6
Fix failing tests
pierlon a4becff
Remove deprecated AMP props from blocks that may contain them
pierlon dc70071
Define deprecated array if not defined already
westonruter edbd630
Improve jsdoc for static analysis
westonruter f0e9d77
Fix ampLayout attribute name
westonruter d5fa797
Reset `deprecatedProps` object when done re-rendering block
pierlon 7b1b765
Fix propType for `ampNoLoading` toggle
pierlon 32f224e
Move `deprecatedProps` into `save` method
pierlon f7be98b
Escape block property value
pierlon 405359b
Simplify check for deprecated prop
pierlon b7de0f1
Use for/of loop; move mappedAttributes out of removeDeprecatedAmpProps
westonruter da088e0
Ensure PHP boolean is stringified as true/false
westonruter fd4f8b6
Eliminate gratuitous use of wp_json_encode()
westonruter 7d9b3ed
Fix issue with image captions not showing in amp-carousel when render…
pierlon 48343af
Supply missing attribute value for gallery shortcode output
westonruter bb85a02
Ensure data-amp-carousel=true attribute is present for proper styling…
westonruter 9aa0552
Prevent removal of data attributes in sanitize_raw_embeds and fix boo…
westonruter 4bc1439
Use DOMElement as return type for HasCaption::get_caption_element()
westonruter 6687931
Modify the block attributes during its deprecation
pierlon b2901f0
Introduce ObsoleteBlockAttributeRemover service
westonruter e3c7afb
Improve logic for obtaining obsolete attribute pattern
westonruter 48eb9d1
Improve phpdoc for ObsoleteBlockAttributeRemover
westonruter 1fa5923
Harden pattern to match block comment and start tag
westonruter 9745353
Revert block deprecation logic
pierlon 6eb20db
Skip adding data attributes for gallery shortcodes
westonruter 88d5ae9
Add tests for ObsoleteBlockAttributeRemover
westonruter 9d7260f
Fix test failure in WP 4.9
westonruter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
Let's revisit this…