Social: Improve media picker UX — always-visible buttons, clearer menu options#47995
Social: Improve media picker UX — always-visible buttons, clearer menu options#47995
Conversation
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Code Coverage SummaryCannot generate coverage summary while tests are failing. 🤐 Please fix the tests, or re-run the Code coverage job if it was something being flaky. |
manzoorwanijk
left a comment
There was a problem hiding this comment.
This looks good, but I think the label "Select" when there is already something selected is confusing. Should we label it as "Select" only when nothing is selected, otherwise label it as "Change"? That also reads well with the options in the dropdown. What do you think?
There was a problem hiding this comment.
Pull request overview
This PR updates the Jetpack Social “Media” picker UI to make actions always visible, clarify menu wording, and align iconography across the sidebar and the SIG edit-template modal.
Changes:
- Moves selection/edit actions into a persistent button row below the preview and removes hover-only controls.
- Renames/re-groups media source menu options, hides “Featured image” when unavailable, and adds “No media” / “No image” clearing options.
- Updates icons (including a new sparkle SVG) and adjusts tests + styling to match the new UX.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| projects/packages/publicize/changelog/update-social-media-picker-ux-improvements | Adds changelog entry for the media picker UX update. |
| projects/packages/publicize/_inc/components/unified-modal/edit-template/background-image-picker.tsx | Updates edit-template modal background picker to use new dropdown + “No image” option and updated icons. |
| projects/packages/publicize/_inc/components/media-section-v2/utils/media-source-options.ts | Renames menu labels/groups and swaps icons (template/featured/AI sparkle). |
| projects/packages/publicize/_inc/components/media-section-v2/types.ts | Updates component prop types (adds onRemove, simplifies MediaPreviewProps). |
| projects/packages/publicize/_inc/components/media-section-v2/test/media-source-menu.test.tsx | Extends tests for new labels and “No media” / featured-image hiding behavior. |
| projects/packages/publicize/_inc/components/media-section-v2/test/media-preview.test.tsx | Updates tests to reflect MediaPreview no longer rendering action buttons. |
| projects/packages/publicize/_inc/components/media-section-v2/test/index.test.tsx | Updates integration tests to use “Select” and “No media” flows instead of “Replace/Remove”. |
| projects/packages/publicize/_inc/components/media-section-v2/styles.module.scss | Adds new layout styles for persistent action row and updated preview spacing. |
| projects/packages/publicize/_inc/components/media-section-v2/media-source-menu.tsx | Implements new group labels, hides featured option when absent, and adds “No media” item. |
| projects/packages/publicize/_inc/components/media-section-v2/media-preview.tsx | Simplifies preview to media-only rendering (spinner + image/video preview). |
| projects/packages/publicize/_inc/components/media-section-v2/index.tsx | Reworks layout to show preview + action row; wires onRemove through menu. |
| projects/packages/publicize/_inc/components/media-section-v2/icons/sparkle.tsx | Adds the custom sparkle SVG icon for the AI image option. |
| Significance: minor | ||
| Type: changed | ||
|
|
||
| Social: Move media section buttons below preiview to be more apparent. |
There was a problem hiding this comment.
Typo in changelog entry text: "preiview" should be "preview".
| Social: Move media section buttons below preiview to be more apparent. | |
| Social: Move media section buttons below preview to be more apparent. |
Fixes SOCIAL-430
Proposed changes
postFeaturedImagefor featured image,mediaAndTextfor template, custom sparkle SVG for AI generationMediaPreviewto image-only (buttons managed by parent)BackgroundImagePickerin the edit template modal to match new patternsOther information
Based on the latest iteration from the mockup discussion in the P2 comments.
Related product discussion/links
Does this pull request change what data or activity we track or use?
No
Testing instructions
Scenario 1: Featured image set, default state (featured image selected)
Scenario 2: SIG template selected (Select + Edit buttons)
Scenario 3: No featured image — dropdown menu
Scenario 4: Edit template modal — background image picker
postFeaturedImageicon