From e623579fb2c83370fcc69d95fb539169bb394075 Mon Sep 17 00:00:00 2001 From: mzorz Date: Tue, 10 Nov 2020 16:30:45 -0300 Subject: [PATCH 1/4] Merge pull request #13130 from wordpress-mobile/feature/jetpack-stories-block-base Mobile stories block --- .idea/codeStyles/Project.xml | 11 +- WordPress/build.gradle | 1 + .../android/modules/AppComponent.java | 3 + .../android/ui/ActivityLauncher.java | 68 +++- .../wordpress/android/ui/RequestCodes.java | 1 + .../android/ui/posts/EditPostActivity.java | 128 ++++++- .../ui/posts/editor/StoriesEventListener.kt | 317 ++++++++++++++++++ .../media/AddLocalMediaToPostUseCase.kt | 8 + .../posts/editor/media/EditorMediaListener.kt | 3 + .../stories/SaveStoryGutenbergBlockUseCase.kt | 178 ++++++++-- .../ui/stories/StoryComposerActivity.kt | 219 +++++++++++- .../ui/stories/StoryComposerViewModel.kt | 8 +- .../ui/stories/StoryRepositoryWrapper.kt | 12 + .../media/StoryMediaSaveUploadBridge.kt | 183 +++++++--- .../android/ui/stories/prefs/StoriesPrefs.kt | 263 +++++++++++++++ .../LoadStoryFromStoriesPrefsUseCase.kt | 146 ++++++++ .../ui/uploads/MediaUploadReadyProcessor.java | 13 +- WordPress/src/main/res/values/strings.xml | 10 + .../TestContent.kt | 4 +- .../SaveStoryGutenbergBlockUseCaseTest.kt | 287 +++++++++++++++- .../ui/stories/StoryComposerViewModelTest.kt | 14 +- .../LoadStoryFromStoriesPrefsUseCaseTest.kt | 188 +++++++++++ .../editor/EditorFragmentAbstract.java | 4 + .../gutenberg/GutenbergContainerFragment.java | 39 ++- .../gutenberg/GutenbergEditorFragment.java | 174 +++++++++- .../editor/gutenberg/GutenbergPropsBuilder.kt | 2 + .../gutenberg/StorySaveMediaListener.java | 10 + .../src/main/res/values/strings.xml | 4 + libs/gutenberg-mobile | 2 +- libs/stories-android | 2 +- 30 files changed, 2157 insertions(+), 145 deletions(-) create mode 100644 WordPress/src/main/java/org/wordpress/android/ui/posts/editor/StoriesEventListener.kt create mode 100644 WordPress/src/main/java/org/wordpress/android/ui/stories/prefs/StoriesPrefs.kt create mode 100644 WordPress/src/main/java/org/wordpress/android/ui/stories/usecase/LoadStoryFromStoriesPrefsUseCase.kt create mode 100644 WordPress/src/test/java/org/wordpress/android/ui/stories/usecase/LoadStoryFromStoriesPrefsUseCaseTest.kt create mode 100644 libs/editor/WordPressEditor/src/main/java/org/wordpress/android/editor/gutenberg/StorySaveMediaListener.java diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index dd2e16ebd1ae..3bf04816d9bb 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -32,16 +32,7 @@ -