-
Notifications
You must be signed in to change notification settings - Fork 800
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
Tiled gallery block: Add srcset to images in the editor #12061
Conversation
Caution: This PR has changes that must be merged to WordPress.com |
9817f92
to
dab6e2b
Compare
sirreal, Your synced wpcom patch D26982-code has been updated. |
dab6e2b
to
d3a2ffa
Compare
This is an automated check which relies on |
d3a2ffa
to
5f3bc6e
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.
5f3bc6e
to
e56b4c7
Compare
sirreal, Your synced wpcom patch D26982-code has been updated. |
Rebased and applied suggestion. Re-review please 🙂 |
const maxWidth = Math.min( PHOTON_MAX_RESIZE, width, height ); | ||
|
||
srcSet = range( minWidth, maxWidth, step ) | ||
.map( srcsetWidth => { |
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.
BTW you're using a mixture of srcset
and srcSet
in variable names. Not a biggie, just thought you ought to know. 😜
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.
😱 Yeah… I think I was mostly using srcset
, but React wants srcSet
so… 🤷♂️
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.
Still fabulous. 👍
FYI @MichaelArestad - we'd talked about this block's performance in the editor, I suspect you'll find this PR is a solid improvement. |
Wonderful! |
e56b4c7
to
4bafbe2
Compare
Rebased to fix conflict |
sirreal, Your synced wpcom patch D26982-code has been updated. |
I believe this is ready but needs @Automattic/jetpack-crew review. |
@kraftbj any thoughts on getting this merged? Would be nice to give it some time to get tested in |
Ahaha no worries, thanks! 😌
…On Tue, 14 May 2019, 22:30 Brandon Kraft, ***@***.***> wrote:
Merged #12061 <#12061> into
master.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12061?email_source=notifications&email_token=AAAVJAH5LS2FWVVUCZR76VTPVMHMFA5CNFSM4HGINTY2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOROF7FWY#event-2341204699>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAVJAGKFEOI2XCBQCCV37LPVMHMFANCNFSM4HGINTYQ>
.
|
Could y'all check out the wpcom merge. There were some test failures when actually trying to get it in so want to defer to y'all on if there's something bigger in play. |
r191914-wpcom |
* Kick off the changelog * Add 7.3.1 * Update date and post link * changelog: add #12219 * changelog: add #12170 * changelog: add #12184 * Changelog: add #12268 * Changelog: add #12081 * Changelog: add #12323 * Changelog: add #12204 * Changelog: add #12269 * Changelog: add #12332 * changelog: add #12339 * changelog: add #12209 * Changelog: add #12319 * Changelog: add #12357 * Changelog: add #12124 * Changelog: add #12373 * Changelog: add #12252 * Changelog: add #12383 * Changelog: add #12372 * changelog: add #12337 * Changelog: add #12290 * Changelog: add #12301 * Changelog: add #12061 * Testing list: add instructions for #12061 * Changelog: add #12393 * Update minimum supported version See #12287 * Changelog: add #12406 * Testing list: add #12406 * Changelog: add #12277 * Changelog: add #12412 * Changelog: add #11318 * Changelog: add #12328 * Changelog: add #12425 * Changelog: add #12380 * Changelog: add #12428 * Changelog: add #12414 * Changelog: add #12395 * Changelog & Testing list: add #12416, #12417, #12418, and #12348 * changelog: add #12379 * Changelog: add #12341 * changelog: add #12444 * Changelog: add #12434 * Changelog: add #12454 * Changelog: add #12460 * Changelog: add #12463 * Changelog: add #12457 * Changelog / testing list: add #10333 * Changelog: add #12467 Co-authored-by: Jeremy Herve <jeremy@jeremy.hu>
Independent companion to #11397
Implementation from Automattic/wp-calypso#30989
Add
srcset
to images in the Tiled Gallery block in the editor. This allows the browser to pick smaller assets when possible improving several aspects of performance.Testing
srcset
differently) you will likely see more requests fired for larger assets as the viewport width increases.For a block with a lot of large images, the editor should be more responsive.
Changelog
srcset
to Tiled Gallery block in the editor for an improved editing experience.