-
Notifications
You must be signed in to change notification settings - Fork 843
Social: Integrate the unified modal for preview #46102
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
base: trunk
Are you sure you want to change the base?
Conversation
|
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! |
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
7537767 to
9c5ebc9
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.
Pull request overview
This PR integrates a unified modal for social post preview and editing capabilities, introducing a centralized navigation-based modal system powered by Redux state management. The modal supports multiple screens (social post preview and template editing) with configurable navigation and screen locking capabilities.
Key changes:
- Added Redux store state management for unified modal (actions, selectors, reducers)
- Created NavigatorModal-based UI with social post preview and edit template screens
- Refactored ConnectionsToggleList to support flexible interaction patterns (item click vs toggle click)
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 23 comments.
Show a summary per file
| File | Description |
|---|---|
src/social-store/types.ts |
Added UnifiedModalState type for modal state management |
src/social-store/actions/unified-modal.ts |
Created actions for opening/closing modal and managing navigation state |
src/social-store/actions/constants.ts |
Added action type constants for unified modal |
src/social-store/selectors/unified-modal.ts |
Added selectors to retrieve modal state (open status, path, screen lock) |
src/social-store/reducer/unified-modal.ts |
Implemented reducer for unified modal state updates |
src/components/unified-modal/index.tsx |
Main modal component integrating NavigatorModal with Redux store |
src/components/unified-modal/social-post-preview/use-modal-screen.tsx |
Hook providing screen configuration for social post preview |
src/components/unified-modal/social-post-preview/sidebar.tsx |
Sidebar with account list and customization options |
src/components/unified-modal/social-post-preview/content.tsx |
Content area displaying post preview for selected connection |
src/components/unified-modal/edit-template/use-modal-screen.tsx |
Hook providing screen configuration for template editor |
src/components/unified-modal/edit-template/sidebar.tsx |
Sidebar with template editing controls (font selector) |
src/components/unified-modal/edit-template/content.tsx |
Content area displaying generated image preview |
src/components/unified-modal/edit-template/types.ts |
TypeScript types for template editor local state |
src/components/unified-modal/edit-template/utils.ts |
Utility function for determining image type |
src/components/connections-toggle-list/index.tsx |
Refactored to support customizable click handlers and styling |
src/components/form/connections-list.tsx |
Updated to use new ConnectionsToggleList API with click handlers |
src/components/form/preview-posts-trigger.tsx |
Button component to open unified modal for post preview |
src/components/social-image-generator/panel/edit-template.tsx |
Button to open modal for template editing |
src/components/global-modals/index.tsx |
Integrated UnifiedModal into global modals renderer |
src/components/form/styles.module.scss |
Added styles for connections list and preview trigger button |
src/components/connections-toggle-list/styles.module.scss |
Moved border/margin styles to parent component |
changelog/add-social-unified-modal |
Added changelog entry for unified modal feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
projects/js-packages/publicize-components/src/components/connections-toggle-list/index.tsx
Show resolved
Hide resolved
projects/js-packages/publicize-components/src/components/unified-modal/index.tsx
Outdated
Show resolved
Hide resolved
...ects/js-packages/publicize-components/src/components/unified-modal/edit-template/content.tsx
Outdated
Show resolved
Hide resolved
...s-packages/publicize-components/src/components/unified-modal/social-post-preview/sidebar.tsx
Outdated
Show resolved
Hide resolved
...-packages/publicize-components/src/components/social-image-generator/panel/edit-template.tsx
Outdated
Show resolved
Hide resolved
projects/js-packages/publicize-components/src/components/unified-modal/edit-template/types.ts
Outdated
Show resolved
Hide resolved
...s-packages/publicize-components/src/components/unified-modal/social-post-preview/sidebar.tsx
Show resolved
Hide resolved
projects/js-packages/publicize-components/src/components/connections-toggle-list/index.tsx
Show resolved
Hide resolved
...ects/js-packages/publicize-components/src/components/unified-modal/edit-template/sidebar.tsx
Outdated
Show resolved
Hide resolved
projects/js-packages/publicize-components/src/components/social-image-generator/panel/index.js
Outdated
Show resolved
Hide resolved
Code Coverage SummaryCoverage changed in 3 files.
9 files are newly checked for coverage. Only the first 5 are listed here.
Full summary · PHP report · JS report Coverage check overridden by
Coverage tests to be added later
|
You can create a draft PR with the dummy button. It would be preferable not to merge the code for presentation purposes into trunk |
It’s behind a feature flag. |
1e4bfad to
fd288bc
Compare
fd288bc to
845233e
Compare
845233e to
d84b7e1
Compare
Thank you for the suggestion. I have extracted all the edit template related changes to #46120 |
Completes SOCIAL-242
Proposed changes:
It also renders the dummy button for edit template modal for demonstration purposes.Extracted to Social: Add edit template modal #46120Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
wpsh > add_blog_sticker( 'jetpack-social-unified-ui-v1', null, null, <your-blog-id> );Screen.Recording.2025-11-26.at.5.45.49.PM.mov