-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Image block: Use built-in directive for mouseover event in lightbox #52067
Conversation
Size Change: +500 B (0%) Total Size: 1.44 MB
ℹ️ View Unchanged
|
Flaky tests detected in 06f5e8f1a5c0d6fab5f7b4042942f6f771e08d6f. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5402548955
|
06f5e8f
to
5771638
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.
It's slightly better to use mouseenter
than mouseover
for this use case. But other than that, you can merge it 🙂
By the way, I rebased the code because GitHub was saying that there were conflicts and I wanted to take a look, but there are none, so 🤷♂️ |
What?
This changes the implementation of the preload image logic by moving it from a
data-wp-effect
directive to the built-indata-wp-on--mouseover
directive.Why?
Brought up in the following code review.
In order to simplify code, we should be using built-in directives wherever possible.
How?
It replaces the directive and moves the preload function definition to
actions
.Testing Instructions
Testing Instructions for Keyboard
N/A