Skip to content

Social: Get rid of the UNIFIED_UI_V1 feature flag uses#47759

Draft
manzoorwanijk wants to merge 8 commits intotrunkfrom
update/social/remove-unified-ui-feature-flag
Draft

Social: Get rid of the UNIFIED_UI_V1 feature flag uses#47759
manzoorwanijk wants to merge 8 commits intotrunkfrom
update/social/remove-unified-ui-feature-flag

Conversation

@manzoorwanijk
Copy link
Member

Completes SOCIAL-415

Proposed changes

Remove the UNIFIED_UI_V1 feature flag from the publicize package and make the unified UI the default. Since the UI changes have been in place for a while, the feature flag is no longer needed.

  • Remove all siteHasFeature( features.UNIFIED_UI_V1 ) checks, keeping the enabled (truthy) code paths
  • Remove the UNIFIED_UI_V1 constant from constants.ts
  • Delete components that were only used in the legacy (flag-disabled) code paths:
    • EnhancedFeaturesNudge, SocialPostModal, MediaSection (old), SocialImageGeneratorPanel (panel/), ShareStatusModal, ShareList, GeneratedImagePreview
  • Delete hooks that are no longer referenced: usePostCanUseSig, useSaveImageToLibrary
  • Clean up store actions (openSharePostModal, closeSharePostModal, toggleSharePostModal, openShareStatusModal, closeShareStatusModal, toggleShareStatusModal), selectors (isSharePostModalOpen, isShareStatusModalOpen), reducer cases, constants, and related types
  • Remove orphaned files from social-post-modal/ directory and move PostPreview to its only consumer (customize-and-preview/preview-section/)
  • Remove unused style rules

The SOCIAL_UNIFIED_UI_V1 constant in wpcomsh is intentionally kept to support older plugin versions.

43 files changed, -2,153 lines net

Other information

  • Generate changelog entries for this PR (using AI).

Related product discussion/links

Does this pull request change what data or activity we track or use?

No.

Testing instructions

  • Verify the Social sidebar panel in the block editor works correctly (connections list, message box, media section)
  • Verify the pre-publish panel shows the social preview
  • Verify the share status modal trigger opens the unified modal
  • Verify the SIG edit template button works in the unified modal
  • Verify scheduling a share shows the "View" action in the snackbar
  • Verify the admin page SIG settings modal (template picker) still works

…ault

The unified UI has been in place long enough to remove the feature flag.
This keeps the enabled code paths and removes the legacy fallbacks.
Remove components that are no longer imported after making the unified UI
the default: EnhancedFeaturesNudge, SocialPostModal, MediaSection (old),
SocialImageGeneratorPanel, ShareStatusModal, ShareList, and usePostCanUseSig.
…odals

Remove share post modal and share status modal store logic that is no
longer used: toggleSharePostModal, openSharePostModal, closeSharePostModal,
isSharePostModalOpen, openShareStatusModal, closeShareStatusModal,
toggleShareStatusModal, isShareStatusModalOpen, and related constants/types.
Remove PreviewSection, SettingsSection, ScheduledShares components and
their associated style files that were only used by the deleted modal.
Move post-preview.tsx from the now-empty social-post-modal directory
to customize-and-preview/preview-section where it is imported.
These were only used by the deleted SocialImageGeneratorPanel component.
@manzoorwanijk manzoorwanijk self-assigned this Mar 24, 2026
@manzoorwanijk manzoorwanijk added [Status] Needs Review This PR is ready for review. Code Quality labels Mar 24, 2026
@manzoorwanijk manzoorwanijk marked this pull request as draft March 24, 2026 18:04
@github-actions
Copy link
Contributor

github-actions bot commented Mar 24, 2026

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack), and enable the update/social/remove-unified-ui-feature-flag branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack update/social/remove-unified-ui-feature-flag

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions
Copy link
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

@jp-launch-control
Copy link

jp-launch-control bot commented Mar 24, 2026

Code Coverage Summary

Coverage changed in 10 files. Only the first 5 are listed here.

File Coverage Δ% Δ Uncovered
projects/packages/publicize/_inc/social-store/actions/constants.ts 24/24 (100.00%) 0.00% 0 💚
projects/packages/publicize/_inc/components/form/share-post-form.tsx 0/14 (0.00%) 0.00% -1 💚
projects/packages/publicize/_inc/social-store/reducer/share-post.ts 2/3 (66.67%) 16.67% -1 💚
projects/packages/publicize/_inc/social-store/reducer/share-status.ts 2/5 (40.00%) 6.67% -1 💚
projects/packages/publicize/_inc/social-store/selectors/share-post.ts 0/1 (0.00%) 0.00% -1 💚

1 file is newly checked for coverage.

File Coverage
projects/packages/publicize/_inc/components/customize-and-preview/preview-section/post-preview.tsx 0/64 (0.00%) 💔

Full summary · PHP report · JS report

Coverage check overridden by I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. .

@manzoorwanijk manzoorwanijk added the I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. label Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Code Quality [Feature] Publicize Now Jetpack Social, auto-sharing I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. [Package] Publicize [Status] In Progress [Status] Needs Review This PR is ready for review. [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant