-
Notifications
You must be signed in to change notification settings - Fork 847
Social Previews: Add Modal #16704
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: Add Modal #16704
Conversation
|
Caution: This PR has changes that must be merged to WordPress.com |
a6cb9e0 to
27989e0
Compare
27989e0 to
d6117f5
Compare
This is an automated check which relies on E2E results is available here (for debugging purposes): https://jetpack-e2e-dashboard.herokuapp.com/pr-16704 |
aba0223 to
1b86146
Compare
|
Design followup #16730 |
jeherve
left a comment
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 works nicely for me. 👍
retrofox
left a comment
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 works as expected. Left some suggestions. LGTM.
a430de1 to
d698c3b
Compare
|
Everything blocking has been addressed and this should be ready to get one more review! |
551b04a to
0f70853
Compare
|
Rebased and updated D47531-code for dotcom testing. |
getdave
left a comment
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.
Another pass at this following the updates and rebase. Tested by forcing available and unavailable cases and both instances look good.
frontdevde
left a comment
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.
Addressed @jeryj's a11y improvement suggestion via a minor commit and retested to ensure it's still working as expected.
LGTM 👍
| grid-gap: 3em; | ||
| grid-template-columns: 1fr 1fr; |
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.
I didn't realize we could use grid! 👍 I didn't know if support was there enough for it.
jeryj
left a comment
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 working really well! Nicely done 👍
jeherve
left a comment
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.
This looks good to me. 🚢
| description: getEditedPostAttribute( 'excerpt' ) || getEditedPostAttribute( 'content' ), | ||
| url: getEditedPostAttribute( 'link' ), | ||
| author: user?.name, | ||
| image: | ||
| !! featuredImageId && getMediaSourceUrl( getMedia( featuredImageId ), getCurrentPostId() ), |
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.
Not for this PR, but we'll probably need to adjust this to be more exact; Social Previews are generated from Open Graph Meta Tags and Twitter Meta Tags, and those are not always as simple as checking for a featured image or an excerpt. That depends on what plugin you're using to generate those tags.
In Jetpack and on WordPress.com for example, we go through different steps to find an image, and do not limit ourselves to featured images.
|
r212041-wpcom |
* master: (41 commits) use blog token to make the request (#16635) External Media: Add account disconnect button (#16759) CI: Try collect js coverage (#16786) Sync: Fix nonce action string in theme edit sync (#16702) Connect-in-place: hide new heading during connection process (#16703) Update dependency eslint-plugin-jsdoc to v30.2.1 (#16765) Theme Tools: Resolve PHP 7.4 array offset notice. (#16795) New shell command for easier access to the database. (#16761) My Plan: Add Offer Reset project new plans (Jetpack Security, Jetpack Complete) (#16739) Increase the `editor.MediaUpload` hook priority (#16669) External Media: Remove `speak` announcement when inserting media. Extensions: make `render_callback` optional when checking block registration against plan (#16746) Conditional check for wrapper before giving focus to new page (#16817) Docker: Add package testing shortcut (#16810) Settings: Recognize valid Akismet keys from wp-config and restrict input (#16542) Social Previews: Add Modal (#16704) Update dependency preact to v10.4.7 (#16768) Improve a11y of amp-social-share (#16737) Instant Search: Tweak expanded result path styling (#16762) Docker: Add phpmyadmin to the docker-composer.yml (#16806) ...
* update social-previews dependency * add basic modal functionality * add prop overrides for individual previews * connect modal to post data * rewrite upgrade nudge placeholder * remove unused select * upgrade nudge compat * Update extensions/blocks/social-previews/modal.js Co-authored-by: Damián Suárez <[email protected]> * [not verified] extracted the upgrade component to avoid future conflicts * extracted featured image url logic * use optional chaining * Update/social preview modal styles (#16745) * Social Previews: update modal styles * Social Previews: add icons to modal * Social Previews: make icon gray * Social Previews: updates styles for mobile * Social Previews: refactor modal to inject the icon Co-authored-by: cpap <[email protected]> * Use Gutenberg breakpoints * Remove color-studio dependency in favor of Gutenberg colors * Remove atoms colors dependency in favor of Gutenberg colors * Social Previews: Upgrade Nudge in Modal (#16744) * add ability for extensions to load images from the jetpack dir * add temporary override for availability check * add first iteration of the upgrade nudge * Update styles * fix typo Co-authored-by: Michael P. Pfeiffer <[email protected]> * change approach for including image * Restructure styles for improved maintainability * Fix upgrade nudge modal padding * removed debug code * Adjust font sizes in nudge modal * Change TabPanel orientation to vertical for correct arrow key navigation Co-authored-by: Damián Suárez <[email protected]> Co-authored-by: Harris Papazolgou <[email protected]> Co-authored-by: cpap <[email protected]> Co-authored-by: Michael P. Pfeiffer <[email protected]>

Fixes #16196
Fixes #16729
Fixes #16785
Fixes #16805
Changes proposed in this Pull Request:
Screenshots
Jetpack product discussion
Does this pull request change what data or activity we track or use?
no
Testing instructions:
falseagain as it did in 31cdc5dProposed changelog entry for your changes:
none yet