Only suppress admin notices when JavaScript is enabled.#55403
Merged
hellofromtonya merged 1 commit intotrunkfrom Oct 17, 2023
Merged
Only suppress admin notices when JavaScript is enabled.#55403hellofromtonya merged 1 commit intotrunkfrom
hellofromtonya merged 1 commit intotrunkfrom
Conversation
|
Size Change: +7 B (0%) Total Size: 1.66 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 44bcd1e. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6542087269
|
draganescu
approved these changes
Oct 17, 2023
Contributor
draganescu
left a comment
There was a problem hiding this comment.
This looks correct to me.
hellofromtonya
approved these changes
Oct 17, 2023
Contributor
hellofromtonya
left a comment
There was a problem hiding this comment.
LGTM 👍
Thanks for fixing this Peter ⭐
Contributor
|
Marking this one with |
Contributor
|
Need to rebase to bring in 7cbf38f which resolves the failing unit tests. Will do shortly. |
44bcd1e to
e0286e3
Compare
SiobhyB
pushed a commit
that referenced
this pull request
Oct 17, 2023
Only suppresses the display of notices on the widget block editor screen if JavaScript is available.
SiobhyB
added a commit
that referenced
this pull request
Oct 17, 2023
* 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>
pento
pushed a commit
to WordPress/wordpress-develop
that referenced
this pull request
Oct 17, 2023
Updates for needed bugfixes in RC1: * [WordPress/gutenberg#55212 Image: Reimplement lightbox trigger as a minimal button in corner of image] * [WordPress/gutenberg#55403 [Edit Widgets] Only suppress admin notices when JS enabled.] Follow-up to [56849], [56818], [56816]. Props artemiosans, jameskoster, SantosGuillamot, aristath, czapla, joen, afercia, richtabor, peterwilsoncc, andraganescu, hellofromTonya, siobhyb. See #59411. git-svn-id: https://develop.svn.wordpress.org/trunk@56961 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith
pushed a commit
to markjaquith/WordPress
that referenced
this pull request
Oct 17, 2023
Updates for needed bugfixes in RC1: * [WordPress/gutenberg#55212 Image: Reimplement lightbox trigger as a minimal button in corner of image] * [WordPress/gutenberg#55403 [Edit Widgets] Only suppress admin notices when JS enabled.] Follow-up to [56849], [56818], [56816]. Props artemiosans, jameskoster, SantosGuillamot, aristath, czapla, joen, afercia, richtabor, peterwilsoncc, andraganescu, hellofromTonya, siobhyb. See #59411. Built from https://develop.svn.wordpress.org/trunk@56961 git-svn-id: http://core.svn.wordpress.org/trunk@56472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions bot
pushed a commit
to platformsh/wordpress-performance
that referenced
this pull request
Oct 17, 2023
Updates for needed bugfixes in RC1: * [WordPress/gutenberg#55212 Image: Reimplement lightbox trigger as a minimal button in corner of image] * [WordPress/gutenberg#55403 [Edit Widgets] Only suppress admin notices when JS enabled.] Follow-up to [56849], [56818], [56816]. Props artemiosans, jameskoster, SantosGuillamot, aristath, czapla, joen, afercia, richtabor, peterwilsoncc, andraganescu, hellofromTonya, siobhyb. See #59411. Built from https://develop.svn.wordpress.org/trunk@56961 git-svn-id: https://core.svn.wordpress.org/trunk@56472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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?
Only suppresses the display of notices on the widget block editor screen if JavaScript is available.
Fixes #55384
Note: The PHP Unit tests are failing in
WP_Directive_Processor_Test, it doesn't seem related so I am ignoring the problem for now.Why?
In WP-r56671 a notice was added to the widget screen indicating that JavaScript is required. This notice needs to be visible if JavaScript is unavailable.
How?
It adds
.jsas a parent selector to the CSS suppressing notices. WordPress adds the class to the body element if JS is available.https://github.com/WordPress/wordpress-develop/blob/6837a90e49e82192224472ac35fe2a9cc7a9e2ac/src/wp-admin/admin-header.php#L247
Testing Instructions
In Firefox and Chrome closing the dev tools should renable JavaScript.
Testing Instructions for Keyboard
Screenshots or screencast