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

Social Previews | Update Mastodon and Tumblr previews #89483

Merged

Conversation

manzoorwanijk
Copy link
Member

@manzoorwanijk manzoorwanijk commented Apr 12, 2024

Fixes https://github.com/Automattic/jetpack-reach/issues/228

Proposed Changes

  • Updates Mastadon preview to the latest version
  • Fixes Post preview for Mastodon preview when no media is supplied
  • Fixes Post preview for Tumblr preview when no media is supplied

Testing Instructions

  • For a Jetpack site with Jetpack Advanced plan, create a post.
  • Open Jetpack or Social sidebar and add custom media (photo/video)
  • Enable "Share as a social post"
  • Publish the post
  • Boot up this PR via the quick links below
  • Select the site and goto posts
  • For the above published post, click on options (3 dots) and select "Share"
  • Click on Preview
  • Goto Mastodon section
  • Confirm that the "Your post" is displayed as a media post and not as link preview
  • Now uncheck "Share as a social post" for the above post and update
  • Open Social Previews again as above
  • Goto Mastodon section
  • Confirm that the "Your post" is displayed as link preview
  • Test these changes in Jetpack via Update social previews package jetpack#36874

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • https://wpcalypso.wordpress.com/devdocs/docs/testing/index.md for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?
Header Header
Screenshot 2024-04-12 at 5 10 15 PM Screenshot 2024-04-12 at 5 10 24 PM
Screenshot 2024-04-12 at 5 10 43 PM Screenshot 2024-04-12 at 5 11 01 PM
Screenshot 2024-04-12 at 5 11 19 PM Screenshot 2024-04-12 at 5 12 03 PM

@matticbot
Copy link
Contributor

matticbot commented Apr 12, 2024

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

App Entrypoints (~13 bytes added 📈 [gzipped])

name           parsed_size           gzip_size
entry-stepper        +96 B  (+0.0%)      +13 B  (+0.0%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~4343 bytes added 📈 [gzipped])

name          parsed_size           gzip_size
posts-custom      +6587 B  (+1.0%)    +4343 B  (+2.0%)
posts             +6587 B  (+1.0%)    +4343 B  (+2.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Async-loaded Components (~4343 bytes added 📈 [gzipped])

name                                                 parsed_size           gzip_size
async-load-design-blocks                                 +6587 B  (+0.3%)    +4343 B  (+0.7%)
async-load-calypso-components-web-preview-component        +96 B  (+0.0%)      +16 B  (+0.0%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@manzoorwanijk manzoorwanijk requested a review from a team April 12, 2024 11:44
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Apr 12, 2024
@manzoorwanijk manzoorwanijk self-assigned this Apr 12, 2024
@manzoorwanijk manzoorwanijk marked this pull request as ready for review April 12, 2024 11:44
Copy link
Contributor

@gmjuhasz gmjuhasz left a comment

Choose a reason for hiding this comment

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

This works as described!

@manzoorwanijk manzoorwanijk merged commit d2ec65a into trunk Apr 18, 2024
13 checks passed
@manzoorwanijk manzoorwanijk deleted the update/social-previews/mastodon-and-tumblr-preview branch April 18, 2024 08:41
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants