Skip to content
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

WPCOM Misc Sync #6900

Merged
merged 10 commits into from Apr 7, 2017
Merged

WPCOM Misc Sync #6900

merged 10 commits into from Apr 7, 2017

Conversation

georgestephanis
Copy link
Member

Just a sync of some random files from WPCOM that weren't much out of sync. Minor tidying.

georgestephanis and others added 9 commits April 4, 2017 18:42
Merges r134065-wpcom.
Props wpcom user @optimizerbot.
As part of Premium in Premium project, unlimited premium themes will
now be offered to all sites that have a Premium plan too. It was decided
to implement this by adding unlimited-premium-themes sticker to those
sites. That means that we can no longer use this sticker to reliably determine
the presence of the business plan. Because of that we are switching to a new
one that was introduced as a replacement (business-plan).

Differential Revision: https://[private link]

Merges r152594-wpcom.
…size resulted in bad things.

Switching back to the original params, albeit passing it through `jetpack_photon_url()` now as the newer Jetpack code did.

Context: #3680

See: https://[private link]

Merges r152553-wpcom.
Summary:
About a week ago, some users report image stretching in https://[private link]

This bug was introduced in r152512 and subsequently partially reverted in r152553. This week, we had [reports](https://[private link]) of a different image distortion issue that's most evident on smaller screen sizes. The fix for the one issues seems to cause the other issue to occur, and vice versa. I think square galleries may be the problem here. The original change didn't specify a crop, so uncropped items in a square gallery were being squeezed into a square. Forcing the crop fixed that issue, but I think it fixed it too aggressively.

I played around with a few fixes to try to fix this up for both reported cases, but nothing worked until I decided to try making the assumption that we should crop only if image width and height were the same. This fix seems to solve the problem for both cases that've been reported, but I'm sure there must be other cases I don't know to check, and this isn't code I know well at all.

Test Plan:
Original issue repro:
1. Get tiled-gallery/tiled-gallery-item.php into the state given here: https://[private link].php
2. Sandbox [private link] and mathildedl.com.
3. View https://mathildedl.com/photos/#jp-carousel-312
4. Observe that the square image in the gallery looks fine but the expanded image is distorted

Second issue repro:
1. Update to get trunk on wpcom.
2. Sandbox [private link] and janicednelson.com
3. View https://janicednelson.com/galleries-2/portrait-gallery/?concat_js=no
4. In the browser dev tools, switch to a mobile view (a simple browser resize may also work).
5. Observe that the images become distorted.

To verify the fix, apply this patch and re-test both scenarios above.

Reviewers: georgestephanis, dbtlr, panoskountanis

Differential Revision: https://[private link]

Merges r153049-wpcom.
…mber of columns can't be less then 1.

Merges r144549-wpcom.
* Remove debounce function and use setTimeout() instead
* Rename function responsive_videos() to responsiveVideos()
* Rename variables

Merges r134991-wpcom.
* Remove debounce function and use setTimeout() instead
* Rename function responsive_videos() to responsiveVideos()
* Rename variables

Merges r134991-wpcom.
If link is present in options but the connection is no longer available or invalid (e.g. app-scoped token), the user will not be presented with the option to unselect a connected service.

These changes iterate over all available services and checks for presence of link option. While we can't show the display name, we can still allow them to unselect the option.

See: https://[private link]

Merges r138651-wpcom.
Previously it was not possible to have a SoundCloud embed in non-"Visual" style (second variant on Share Embed modal) because
plugin logic would try to find option which we don't expose, defaulting to "Visual". Here, we skip consideration of options
and instead test param directly.

Also removes redundant oEmbed registration (now in core, avoid potential conflict).

See: https://[private link]
See: https://[private link]
See: https://[private link]

Merges r153115-wpcom.
@georgestephanis
Copy link
Member Author

Friendly reminder: DO NOT SQUASH THIS PR WHEN MERGING.

Thank you!

@georgestephanis georgestephanis added [Type] Dotcom Merge [Feature] SEO Tools Tools for improving a site's search engine optimization. [Feature] Sharing Post sharing, sharing buttons [Feature] Shortcodes / Embeds [Feature] Theme Tools [Feature] Tiled Gallery A different way to display image galleries on your site, in different organizations and shapes. labels Apr 4, 2017
'width' => soundcloud_get_option( 'player_width' ),
'height' => soundcloud_url_has_tracklist( $shortcode_options['url'] ) ? soundcloud_get_option( 'player_height_multi' ) : soundcloud_get_option( 'player_height' ),
'params' => array_filter(
array(
'auto_play' => soundcloud_get_option( 'auto_play' ),
'show_comments' => soundcloud_get_option( 'show_comments' ),
'color' => soundcloud_get_option( 'color' ),
'visual' => ( $isVisual ? 'true' : 'false' ),
'visual' => ( $shortcode_options['visual'] ? 'true' : 'false' ), // A8C: See above comment; always test visual from parameters
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is trying to rely on on a parameter that may not be set.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed by @aduth in ae3a795

Copy link
Member

@vindl vindl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SEO related changes look good to me.

$shortcode_options is not the correct variable reference to parsed params anyways ($shortcode_params), and this acts more as a default overriden later at $options assignment.

Replace with default of "false", overridden in case that "visual" param is explicitly true.

See: r153115

Merges r154007-wpcom.
@dereksmart
Copy link
Member

This looks fine to me

Copy link
Contributor

@eliorivero eliorivero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

clearTimeout( resizeTimer );
resizeTimer = setTimeout( responsiveVideos, 500 );
} )
.on( 'post-load.jetpack', responsiveVideos )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kudos for adding the namespace 👍

@georgestephanis
Copy link
Member Author

As this has two reviews, I'll merge it myself.

@georgestephanis georgestephanis merged commit 4071171 into master Apr 7, 2017
@dereksmart dereksmart deleted the wpcom/misc-sync-4april2017 branch April 7, 2017 14:35
jeherve added a commit that referenced this pull request Apr 24, 2017
eliorivero pushed a commit that referenced this pull request Apr 25, 2017
* Changelog: initial commit for 4.9 release.

* Changelog: add #6929

* Changelog: move old changelogs to changelog.txt

* Readme: restore deleted release post link.

The post is now live.

* Changelog: add #6853

* Changelog: add #6856

* Changelog: add #6857

* Changelog: add #6884

* Changelog: add #6885

* Changelog: add #6892

* Changelog: add #6894

* Changelog: add #6898

* Changelog: add #6899

* Changelog: add #6900

* Changelog: add #6909

* Changelog: add #6927

* Changelog: add #6947

* Chagelog: add #6958

* Changelog: add #6961

* Changelog: add #6963

* Changelog: add #6965

* Changelog: add #6986

* Changelog: add #7000

* Changelog: add #7013

* Changelog: add #7015

* Changelog: add #7019

* Changelog: add #7028

* Changelog: add #6998

* Changelog: add #6999

* Changelog: add #7044

* Changelog: add #6881

* Changelog: add #6922

* Changelog: add #6940

* Changelog: add #6962

* Changelog: add #6942

* Changelog: add #6959

* Changelog: add #7018

* Changelog: add #6948

* Changelog: add #6657

* Changelog: add #7030

* Changelog: add #7048

* Changelog: add #7031

* Changelog: add #6990

* Changelog: add #6957

* Changelog: add #7027
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] SEO Tools Tools for improving a site's search engine optimization. [Feature] Sharing Post sharing, sharing buttons [Feature] Shortcodes / Embeds [Feature] Theme Tools [Feature] Tiled Gallery A different way to display image galleries on your site, in different organizations and shapes. Touches WP.com Files [Type] Dotcom Merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants