Skip to content

Stories removal#20016

Merged
antonis merged 37 commits intotrunkfrom
issue/stories-removal
Mar 4, 2024
Merged

Stories removal#20016
antonis merged 37 commits intotrunkfrom
issue/stories-removal

Conversation

@jarvislin
Copy link
Copy Markdown
Contributor

@jarvislin jarvislin commented Jan 24, 2024

See: p1706056464986299/1705928714.429819-slack-C0436E5L5V1

This is a follow-up PR for #20014 which removes Stories from the codebase.


To Test:

Please smoke test following areas:

  1. Main screen
  2. Create a new post
    • with Video blocks
    • with Image blocks

The behavior should be the same as the trunk branch.


Regression Notes

  1. Potential unintended areas of impact

    • Creating post screen
    • Main screen
  2. What I did to test those areas of impact (or what existing automated tests I relied on)

    • Manual
  3. What automated tests I added (or what prevented me from doing so)

    • None, I only update some outdated unit tests

PR Submission Checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

UI Changes Testing Checklist:

  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • Talkback.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • Large and small screen sizes. (Tablet and smaller phones)
  • Multi-tasking: Split screen and Pop-up view. (Android 10 or higher)

@dangermattic
Copy link
Copy Markdown
Collaborator

dangermattic commented Jan 24, 2024

4 Warnings
⚠️ strings.xml files should only be updated on release branches, when the translations are downloaded by our automation.
⚠️ View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.
⚠️ This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
⚠️ This PR is assigned to the milestone 24.4. The due date for this milestone has already passed.
Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Jan 24, 2024

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
Versionpr20016-0bd3e14
Commit0bd3e14
Direct Downloadwordpress-prototype-build-pr20016-0bd3e14.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Jan 24, 2024

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
Versionpr20016-0bd3e14
Commit0bd3e14
Direct Downloadjetpack-prototype-build-pr20016-0bd3e14.apk
Note: Google Login is not supported on these builds.

@peril-wordpress-mobile
Copy link
Copy Markdown

Warnings
⚠️ PR has more than 300 lines of code changing. Consider splitting into smaller PRs if possible.

Generated by 🚫 dangerJS

Jarvis Lin added 2 commits February 27, 2024 11:51
# Conflicts:
#	WordPress/build.gradle
#	WordPress/src/main/java/org/wordpress/android/ui/jetpackoverlay/JetpackFeatureRemovalPhaseHelper.kt
#	WordPress/src/main/java/org/wordpress/android/ui/main/WPMainActivity.java
#	WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.java
#	WordPress/src/main/java/org/wordpress/android/ui/stories/StoryComposerActivity.kt
#	WordPress/src/main/java/org/wordpress/android/ui/stories/media/StoryEditorMedia.kt
#	WordPress/src/main/java/org/wordpress/android/ui/stories/media/StoryMediaSaveUploadBridge.kt
#	WordPress/src/main/java/org/wordpress/android/util/SiteUtils.java
#	WordPress/src/main/res/values-gl/strings.xml
#	WordPress/src/main/res/values-lv/strings.xml
#	build.gradle
@wpmobilebot
Copy link
Copy Markdown
Contributor

Found 1 violations:

The PR caused some dependency changes (expand to see details)

++--- androidx.lifecycle:lifecycle-livedata-ktx:2.6.2
+|    +--- androidx.lifecycle:lifecycle-livedata:2.6.2 (*)
+|    +--- androidx.lifecycle:lifecycle-livedata-core-ktx:2.6.2 (*)
+|    +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.20 (*)
+|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4 -> 1.7.3 (*)
+|    +--- androidx.lifecycle:lifecycle-common:2.6.2 (c)
+|    +--- androidx.lifecycle:lifecycle-livedata:2.6.2 (c)
+|    +--- androidx.lifecycle:lifecycle-livedata-core:2.6.2 (c)
+|    +--- androidx.lifecycle:lifecycle-livedata-core-ktx:2.6.2 (c)
+|    +--- androidx.lifecycle:lifecycle-process:2.6.2 (c)
+|    +--- androidx.lifecycle:lifecycle-runtime:2.6.2 (c)
+|    +--- androidx.lifecycle:lifecycle-runtime-ktx:2.6.2 (c)
+|    +--- androidx.lifecycle:lifecycle-service:2.6.2 (c)
+|    +--- androidx.lifecycle:lifecycle-viewmodel:2.6.2 (c)
+|    +--- androidx.lifecycle:lifecycle-viewmodel-compose:2.6.2 (c)
+|    +--- androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2 (c)
+|    +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.2 (c)
+|    \--- androidx.lifecycle:lifecycle-common-java8:2.6.2 (c)
++--- androidx.camera:camera-camera2:1.2.3
+|    +--- androidx.annotation:annotation:1.2.0 -> 1.6.0 (*)
+|    +--- androidx.camera:camera-core:1.2.3
+|    |    +--- androidx.annotation:annotation:1.2.0 -> 1.6.0 (*)
+|    |    +--- androidx.annotation:annotation-experimental:1.1.0 -> 1.3.1 (*)
+|    |    +--- androidx.concurrent:concurrent-futures:1.0.0 -> 1.1.0 (*)
+|    |    +--- androidx.core:core:1.1.0 -> 1.12.0 (*)
+|    |    +--- androidx.exifinterface:exifinterface:1.3.2 -> 1.3.6 (*)
+|    |    +--- androidx.lifecycle:lifecycle-common:2.1.0 -> 2.6.2 (*)
+|    |    +--- androidx.lifecycle:lifecycle-livedata:2.1.0 -> 2.6.2 (*)
+|    |    +--- com.google.auto.value:auto-value-annotations:1.6.3
+|    |    +--- com.google.guava:listenablefuture:1.0 -> 9999.0-empty-to-avoid-conflict-with-guava
+|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.20 -> 1.9.20 (*)
+|    +--- androidx.concurrent:concurrent-futures:1.0.0 -> 1.1.0 (*)
+|    +--- androidx.core:core:1.1.0 -> 1.12.0 (*)
+|    +--- com.google.auto.value:auto-value-annotations:1.6.3
+|    \--- com.google.guava:listenablefuture:1.0 -> 9999.0-empty-to-avoid-conflict-with-guava
-+--- com.automattic:stories:2.4.0
-|    +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.6.10 -> 1.9.10 (*)
-|    +--- androidx.databinding:viewbinding:8.1.0 (*)
-|    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.9.10 (*)
-|    +--- org.jetbrains.kotlinx:kotlinx-serialization-runtime:1.0-M1-1.4.0-rc
-|    |    \--- org.jetbrains.kotlinx:kotlinx-serialization-runtime-jvm:1.0-M1-1.4.0-rc
-|    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.4.0-rc -> 1.9.20 (*)
-|    |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.4.0-rc -> 1.9.20 (*)
-|    +--- org.jetbrains.kotlin:kotlin-reflect:1.6.10
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.9.20 (*)
-|    +--- androidx.appcompat:appcompat:1.0.2 -> 1.6.1 (*)
-|    +--- androidx.constraintlayout:constraintlayout:1.1.3 -> 2.1.4 (*)
-|    +--- androidx.core:core-ktx:1.2.0 -> 1.12.0 (*)
-|    +--- androidx.emoji:emoji:1.0.0
-|    |    \--- androidx.core:core:1.0.0 -> 1.12.0 (*)
-|    +--- androidx.recyclerview:recyclerview:1.1.0 -> 1.3.0 (*)
-|    +--- com.google.android.material:material:1.2.1 -> 1.9.0 (*)
-|    +--- com.github.bumptech.glide:glide:4.10.0 -> 4.16.0 (*)
-|    +--- jp.wasabeef:glide-transformations:4.3.0
-|    |    \--- com.github.bumptech.glide:glide:4.11.0 -> 4.16.0 (*)
-|    +--- org.greenrobot:eventbus:3.3.1 (*)
-|    +--- com.automattic.stories:photoeditor:2.4.0
-|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.9.10 (*)
-|    |    +--- org.jetbrains.kotlinx:kotlinx-serialization-runtime:1.0-M1-1.4.0-rc (*)
-|    |    +--- androidx.appcompat:appcompat:1.0.2 -> 1.6.1 (*)
-|    |    +--- androidx.core:core-ktx:1.2.0 -> 1.12.0 (*)
-|    |    +--- androidx.camera:camera-core:1.0.0-alpha06 -> 1.2.3
-|    |    |    +--- androidx.annotation:annotation:1.2.0 -> 1.6.0 (*)
-|    |    |    +--- androidx.annotation:annotation-experimental:1.1.0 -> 1.3.1 (*)
-|    |    |    +--- androidx.concurrent:concurrent-futures:1.0.0 -> 1.1.0 (*)
-|    |    |    +--- androidx.core:core:1.1.0 -> 1.12.0 (*)
-|    |    |    +--- androidx.exifinterface:exifinterface:1.3.2 -> 1.3.6 (*)
-|    |    |    +--- androidx.lifecycle:lifecycle-common:2.1.0 -> 2.6.2 (*)
-|    |    |    +--- androidx.lifecycle:lifecycle-livedata:2.1.0 -> 2.6.2 (*)
-|    |    |    +--- com.google.auto.value:auto-value-annotations:1.6.3
-|    |    |    +--- com.google.guava:listenablefuture:1.0 -> 9999.0-empty-to-avoid-conflict-with-guava
-|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.20 -> 1.9.20 (*)
-|    |    +--- androidx.camera:camera-camera2:1.0.0-alpha06 -> 1.2.3
-|    |    |    +--- androidx.annotation:annotation:1.2.0 -> 1.6.0 (*)
-|    |    |    +--- androidx.camera:camera-core:1.2.3 (*)
-|    |    |    +--- androidx.concurrent:concurrent-futures:1.0.0 -> 1.1.0 (*)
-|    |    |    +--- androidx.core:core:1.1.0 -> 1.12.0 (*)
-|    |    |    +--- com.google.auto.value:auto-value-annotations:1.6.3
-|    |    |    \--- com.google.guava:listenablefuture:1.0 -> 9999.0-empty-to-avoid-conflict-with-guava
-|    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9 -> 1.7.3 (*)
-|    |    +--- com.google.android.material:material:1.2.1 -> 1.9.0 (*)
-|    |    +--- com.github.bumptech.glide:glide:4.10.0 -> 4.16.0 (*)
-|    |    +--- jp.wasabeef:glide-transformations:4.3.0 (*)
-|    |    +--- com.github.chrisbanes:PhotoView:2.3.0
-|    |    |    \--- androidx.appcompat:appcompat:1.0.0 -> 1.6.1 (*)
-|    |    +--- com.automattic.stories:mp4compose:2.4.0
-|    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.9.10 (*)
-|    |    |    \--- com.github.bumptech.glide:glide:4.10.0 -> 4.16.0 (*)
-|    |    \--- androidx.emoji:emoji:1.0.0 (*)
-|    +--- androidx.lifecycle:lifecycle-common-java8:2.2.0 -> 2.6.2 (*)
-|    +--- androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0 -> 2.6.2 (*)
-|    +--- androidx.lifecycle:lifecycle-livedata-ktx:2.2.0 -> 2.6.2
-|    |    +--- androidx.lifecycle:lifecycle-livedata:2.6.2 (*)
-|    |    +--- androidx.lifecycle:lifecycle-livedata-core-ktx:2.6.2 (*)
-|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.20 (*)
-|    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4 -> 1.7.3 (*)
-|    |    +--- androidx.lifecycle:lifecycle-common:2.6.2 (c)
-|    |    +--- androidx.lifecycle:lifecycle-common-java8:2.6.2 (c)
-|    |    +--- androidx.lifecycle:lifecycle-livedata:2.6.2 (c)
-|    |    +--- androidx.lifecycle:lifecycle-livedata-core:2.6.2 (c)
-|    |    +--- androidx.lifecycle:lifecycle-livedata-core-ktx:2.6.2 (c)
-|    |    +--- androidx.lifecycle:lifecycle-process:2.6.2 (c)
-|    |    +--- androidx.lifecycle:lifecycle-runtime:2.6.2 (c)
-|    |    +--- androidx.lifecycle:lifecycle-runtime-ktx:2.6.2 (c)
-|    |    +--- androidx.lifecycle:lifecycle-service:2.6.2 (c)
-|    |    +--- androidx.lifecycle:lifecycle-viewmodel:2.6.2 (c)
-|    |    +--- androidx.lifecycle:lifecycle-viewmodel-compose:2.6.2 (c)
-|    |    +--- androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2 (c)
-|    |    \--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.2 (c)
-|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9 -> 1.7.3 (*)
-|    \--- com.github.chrisbanes:PhotoView:2.3.0 (*)
-+--- com.automattic.stories:mp4compose:2.4.0 (*)
-+--- androidx.lifecycle:lifecycle-livedata-ktx:2.6.2 (*)
-+--- androidx.camera:camera-camera2:1.2.3 (*)
-\--- com.github.chrisbanes:PhotoView:2.3.0 (*)
+\--- com.github.chrisbanes:PhotoView:2.3.0
+     \--- androidx.appcompat:appcompat:1.0.0 -> 1.6.1 (*)

Please review and act accordingly

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 27, 2024

Codecov Report

Attention: Patch coverage is 42.85714% with 16 lines in your changes are missing coverage. Please review.

Project coverage is 40.39%. Comparing base (50f27a4) to head (0bd3e14).

Files Patch % Lines
...ress/android/ui/photopicker/MediaPickerLauncher.kt 0.00% 4 Missing ⚠️
...ess/android/ui/photopicker/PhotoPickerViewModel.kt 25.00% 3 Missing ⚠️
...java/org/wordpress/android/ui/posts/PostUtils.java 0.00% 3 Missing ⚠️
...ordpress/android/ui/uploads/PostUploadHandler.java 0.00% 2 Missing ⚠️
...ess/android/ui/mediapicker/MediaPickerViewModel.kt 0.00% 0 Missing and 1 partial ⚠️
...g/wordpress/android/ui/mysite/menu/MenuActivity.kt 0.00% 1 Missing ⚠️
...rdpress/android/ui/uploads/MediaUploadHandler.java 0.00% 1 Missing ⚠️
.../android/ui/uploads/MediaUploadReadyProcessor.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk   #20016      +/-   ##
==========================================
+ Coverage   40.17%   40.39%   +0.21%     
==========================================
  Files        1476     1459      -17     
  Lines       68248    67161    -1087     
  Branches    11331    11146     -185     
==========================================
- Hits        27418    27129     -289     
+ Misses      38320    37550     -770     
+ Partials     2510     2482      -28     

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

@antonis antonis mentioned this pull request Feb 29, 2024
13 tasks
@antonis
Copy link
Copy Markdown
Contributor

antonis commented Feb 29, 2024

Thank you for cleaning up the code @jarvislin 🙇
I did a 1st pass of the PR today and the code changes look consistent to me. I also didn't encounter any errors or inconsistencies while testing.
I opened a PR with some additional suggestions for removals at #20341 feel free to merge on top of your PR if you agree with the changes.
I plan to take a 2nd pass tomorrow or Monday since the changes are extensive and I might have missed something.

Copy link
Copy Markdown
Contributor

@antonis antonis left a comment

Choose a reason for hiding this comment

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

I plan to take a 2nd pass tomorrow or Monday since the changes are extensive and I might have missed something.

I made another pass today and I have noticed any issues on the code or comparing the functionality with a build from trunk 🎉

I would suggest removing the unneeded string resource changes #20016 (comment), adding the missing icons you detected (though unrelated with this PR) and proceeding with a merge.

antonis and others added 6 commits March 1, 2024 11:36
# Conflicts:
#	WordPress/src/main/java/org/wordpress/android/ui/prefs/AppPrefs.java
#	WordPress/src/main/java/org/wordpress/android/ui/prefs/AppPrefsWrapper.kt
#	WordPress/src/main/res/values-gl/strings.xml
@jarvislin
Copy link
Copy Markdown
Contributor Author

@antonis Thank you so much for reviewing this PR.
I've update the missing icons and reverted all changes to strings except for the main strings resource.

@jarvislin jarvislin requested a review from antonis March 4, 2024 08:29
Copy link
Copy Markdown
Contributor

@antonis antonis left a comment

Choose a reason for hiding this comment

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

Awesome work @jarvislin 🏅
The code changes look consistent to me and the app behaved as expected in my tests. I've tested both the Jetpack app and the WordPress app for any side effects and didn't notice any issues.
It feels great cleaning up the code (6.3K loc 😮) along with the feature :)

@antonis antonis merged commit 0cecd32 into trunk Mar 4, 2024
@antonis antonis deleted the issue/stories-removal branch March 4, 2024 09:14
@jarvislin
Copy link
Copy Markdown
Contributor Author

jarvislin commented Mar 4, 2024

Awesome work @jarvislin 🏅 The code changes look consistent to me and the app behaved as expected in my tests. I've tested both the Jetpack app and the WordPress app for any side effects and didn't notice any issues. It feels great cleaning up the code (6.3K loc 😮) along with the feature :)

I am so happy for this. I've finally completed my onboarding project 🥹
Thanks again!

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.

6 participants