-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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: Directive processor failing on updated HTML API #55404
Conversation
This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress. If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged. If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack. Thank you! ❤️ View changed files❔ lib/experimental/interactivity-api/class-wp-directive-processor.php ❔ lib/load.php |
55c9c6a
to
0fb331a
Compare
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.
Thanks for helping to track this down!
I've tested against the latest WordPress version (WordPress 6.4-beta4-20231017.160904 ) and, with this PR's changes the WP_Directive_Processor
unit tests pass again.
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.
This is testing nicely for me, too! Thanks again for the quick fix @dmsnell ✨
Thank you for handling this! |
Flaky tests detected in e562e192171a159fbc299a23d219fa87247ef521. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6543288911
|
8202011
to
e562e19
Compare
Temporary fix to resolve breaking tests in `trunk` after the WordPress 6.4 backport.
e562e19
to
7661b21
Compare
…5404) Temporary fix to resolve breaking tests in `trunk` after the WordPress 6.4 backport.
* Unconditionally load the Gutenberg copy of the HTML Tag Processor (#55404) Temporary fix to resolve breaking tests in `trunk` after the WordPress 6.4 backport. * Revert "Unconditionally load the Gutenberg copy of the HTML Tag Processor (#55404)" This reverts commit 271587a. * Image: Reimplement lightbox trigger as a minimal button in corner of image (#55212) * Reimplement lightbox trigger as a minimal button in corner of image * Remove obsolete directives * Update directives to fire logic properly via image or button click * Ensure lightbox button only appears when hovering over image, not whole figure * Ensure close button does not receive focus when opening lightbox via mouse * Ensure button only receives focus when lightbox is closed via keyboard * Add comments * Prevent unnecessary focus being shown on mobile * Add dynamic positioning for button when image uses 'contain' setting * WORK IN PROGRESS - Begin accounting for various edge cases We need to account for the fact that an image can have custom dimensions, aspect ratio, cover or contain, captions, thumbnail dimensions, and potentially other scenarios. This commit begins to address those issues but notably fails in cases where one uses a horizontal image, at full scale, with custom aspect ratio, using 'contain'. It seems to work in all other cases that I've checked but needs more thorough testing and the code can probably be cleaner, and may contain some unnecessary items. * Simplify and improve button placement logic * Simplify logic to show button on hover * Fix styles * Simplify calls to showLightbox * Fix style inconsistency between browsers * Change button position slightly * Reduce button offset * Add style override for better consistency across themes * Fix logic so lightbox animates as intended; remove extraneous code * Update comment * [Edit Widgets] Only suppress admin notices when JS enabled. (#55403) Only suppresses the display of notices on the widget block editor screen if JavaScript is available. --------- Co-authored-by: Dennis Snell <dennis.snell@automattic.com> Co-authored-by: Artemio Morales <artemio.morales@a8c.com> Co-authored-by: Peter Wilson <519727+peterwilsoncc@users.noreply.github.com>
To follow up, I think this "workaround" is the more permanent fix on the Gutenberg side. Updates and other backports in #55703 |
Discovered after backporting the WordPress 6.4 release into Gutenberg.
https://wordpress.slack.com/archives/C02QB2JS7/p1697471144510409
Identified broken with the merge of WordPress/wordpress-develop#5475, which hadn't yet been backported into Gutenberg, and which wouldn't have been noticed because of the Directive Processor using
WP_HTML_Tag_Processor()
directly.