Skip to content

Remove EditPostActivity companion object #22122

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

Merged
merged 1 commit into from
Aug 14, 2025

Conversation

oguzkocer
Copy link
Contributor

Motivation

Remove EditPostActivity companion object to eliminate activity-specific dependencies before GutenbergKitActivity duplication. Move shareable constants to EditorConstants and activity-specific constants to private fields.

Changes

  • Remove EditPostActivity companion object entirely
  • Move shareable constants to EditorConstants
  • Move checkToRestart() method to EditorLauncher
  • Move ViewPager constants to private fields with VIEW_PAGER_ prefix

No Functional Changes

This PR contains only code organization changes. No business logic, behavior, or functionality has been modified.

@oguzkocer oguzkocer added this to the 26.2 milestone Aug 12, 2025
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Aug 12, 2025

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr22122-8f91c58
Commit8f91c58
Direct Downloadwordpress-prototype-build-pr22122-8f91c58.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Aug 12, 2025

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr22122-8f91c58
Commit8f91c58
Direct Downloadjetpack-prototype-build-pr22122-8f91c58.apk
Note: Google Login is not supported on these builds.

Copy link

codecov bot commented Aug 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 39.43%. Comparing base (adad46b) to head (8f91c58).
⚠️ Report is 1 commits behind head on trunk.

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #22122   +/-   ##
=======================================
  Coverage   39.43%   39.43%           
=======================================
  Files        2149     2149           
  Lines      101872   101872           
  Branches    15604    15604           
=======================================
  Hits        40177    40177           
  Misses      58126    58126           
  Partials     3569     3569           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@oguzkocer oguzkocer requested a review from dcalhoun August 12, 2025 23:02
Copy link
Member

@dcalhoun dcalhoun left a comment

Choose a reason for hiding this comment

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

Changes look sound to me. Thank you for progressing this.

I did not experience any regressions while testing GutenbergKit, Gutenberg Mobile, and Aztec.

@oguzkocer oguzkocer force-pushed the rename-editpostactivity-types branch from 35df0af to 27c7104 Compare August 14, 2025 01:03
Base automatically changed from rename-editpostactivity-types to trunk August 14, 2025 01:27
Eliminate EditPostActivity companion object and reorganize constants
to prepare for GutenbergKitActivity duplication.

Changes:
- Move shareable constants to EditorConstants (NEW_MEDIA_POST family,
  timing constants, regex groups, RestartEditorOptions enum)
- Move checkToRestart() method to EditorLauncher companion object
- Add ViewPager constants back to EditPostActivity as private constants
  with VIEW_PAGER_ prefix (activity-specific implementation details)
- Update all external references to use EditorLauncher.checkToRestart()
- Update AnalyticsUtils to use EditorConstants.NEW_MEDIA_POST

This eliminates the EditPostActivity companion object while making
shareable constants available in EditorConstants. ViewPager configuration
remains private to each activity.
@oguzkocer oguzkocer force-pushed the remove-editpostactivity-companion branch from 9b8b798 to 8f91c58 Compare August 14, 2025 01:39
@oguzkocer oguzkocer marked this pull request as ready for review August 14, 2025 01:39
@oguzkocer oguzkocer enabled auto-merge (squash) August 14, 2025 01:39
Copy link

@oguzkocer oguzkocer merged commit b9ae2be into trunk Aug 14, 2025
24 of 27 checks passed
@oguzkocer oguzkocer deleted the remove-editpostactivity-companion branch August 14, 2025 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants