-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Feature/modularize editor #2434
Conversation
…modularize-editor
86805a0 Add 'libs/utils/' from commit '94d1dbb0f5220525759de83c60cba3e95ce95eff' cfc3ff0 use title/content params in the editor 9f26eb3 remove useless test in example 83ff559 fix appcompat and support-v4 dependencies 714eeb1 move new editor logic to a fragment 4a2f1ba back to 21.1.1 tools 279f2ee fix appcompat dependency d3985f0 new travis config ee42dda fix build for example project 66fb19b rename package name to org.wordpress.android b61040c rename package name to org.wordpress.android 4edc93f add signing to publish artifact 94d1dbb Merge branch 'release/3.7' into develop 8ff9413 fix AppLogViewerActivity when a log is message is null 7c208db Merge pull request #2264 from wordpress-mobile/issue/2222-theme-preview-title 9eb7273 new BlogUtils.getHostNameFromAccountMap function a80859d Theme live preview no longer changes the activity title 6186933 Photo viewer now uses low quality for the lo-res image 2eb9839 Simplified comments bfa7ecb Switched to quality enum which defaults to medium a2ce056 Added default quality param to photon 5a48a06 html encode log entries in AppLog.toHtml() c8a4d89 fix #103: retain menu drawer scroll position after switching activities c1e0778 Merge branch 'develop' into issue/985-make-sfactory-private fe1d125 fix build files for android studio 1.0 f7a2d48 Merge remote-tracking branch 'origin/develop' into issue/985-make-sfactory-private 72fe2b7 update support lib version for travis 0b03b71 Merge branch 'develop' of https://github.com/wordpress-mobile/WordPress-Android into feature/material-appcompat 0f5751d Merge branch 'develop' into release/3.4 b68f755 remove unused code (refresh button) cb8321b fix #985: maks sFactory private - force injection in test module faae1d3 Merge branch 'release/3.4' into issue/1982-simperium-concurrency Conflicts: WordPress/src/main/java/org/wordpress/android/models/Note.java a0982d1 Updated build.gradle to specify com.android.support:appcompat-v7:21.0.2 3a0c45e Removed unsuccessful fix for #1982. b967d59 first step at replacing PreferenceActivity by a PreferenceFragment + ActionBarActivity 92d4e15 Merge branch 'develop' into feature/material-appcompat 7c8d5ab Merge branch 'release/3.4' into develop 1e499a6 Merge branch 'hotfix/3.3.1' into release/3.4 7a4a364 Merge branch 'develop' of https://github.com/wordpress-mobile/WordPress-Android into feature/material-appcompat 5451df7 update subtrees to use build tools 21.1.1 4024637 rename PullToRefresh to SwipeToRefresh 0d8d414 remove unused viewClass in PTR constructor 2424201 fix circle spinner color style d392885 Return a copy of the JSONObject in getDiffableValue(). 106affa replace Chris Banes' PullToRefresh by the native SwipeToRefresh view 3108a36 Merge remote-tracking branch 'origin/develop' into feature/1961-add-mentions-to-commenting db25827 Merge branch 'develop' into issue/1958-round-avatars 2801610 Merge remote-tracking branch 'origin/develop' into feature/1961-add-mentions-to-commenting 6ac0248 Merge branch 'hotfix/3.3.1' into release/3.4 eb70e6f upgrade to android-gradle 0.14.0 9bc4ba6 Rounds all WPNetworkImageViews with `AVATAR` type. c2fd6c7 Initial commit adding mentions to notification comments 0a3da42 Added image spans directly instead of using Html.fromHtml(). 5b22440 Merge branch 'release/3.2' into develop 1a2a73f fix debug/release build propagation to sub projects d9eac2e Merge branch 'release/3.2' into develop 380ece6 Merge pull request #1861 from wordpress-mobile/feature/notifications-redesign c38f131 Merge pull request #1860 from wordpress-mobile/issue/1821-remove-istablet 4e92eaa Merge branch 'hotfix/3.1.2' into release/3.2 cbc7b24 fix #1821: remove DisplayUtis.isTablet() method 343771a Catch NPE in Bitmap.CreateBitmap and make sure the returned bitmap is not null c44a87a Merge branch 'release/3.2' into feature/notifications-redesign 97c557c Revert "Revert "Merge pull request #1799 from wordpress-mobile/feature/1795-reader-render-attachments"" 1cacaf2 Merge branch 'hotfix/3.1.1' into release/3.2 568782f Merge branch 'hotfix/3.1.1' into develop 96fd180 remove isTablet() check 870944d Merge branch 'release/3.2' into feature/notifications-redesign 3390393 Revert "Merge pull request #1799 from wordpress-mobile/feature/1795-reader-render-attachments" 03bbac0 Merge branch 'develop' into feature/notifications-redesign 8ec2915 Replaced String.format() with string concatenation in ReaderUtils and PhotonUtils after profiler showed String.format() to be hurting performance 1623d65 fix lint error in utils e273dd3 Merge branch 'develop' into feature/notifications-redesign 4bfc641 Removed aggressive `JSONUtil` logging f7f4556 update support-v13 library to version 19.1.0 fafcf67 Merge pull request #1781 from wordpress-mobile/issue/17760-reader-comment-full-images 1868cc5 disable refresh on the attacher 082c13f use the PTR library version 0.9.7 f21f5d3 set network refresh mode as default d262f8d remove unused code 9e592fd add a network mode in PullToRefreshHeaderTransformer to show a different message when network is disabled f85a003 move NetworkUtils to WPUtils subtree d19c080 Updated comment cabb8a7 TextView content is reset to itself to force it to correctly resize using cached image 48e4ed2 More cleanup 2426243 Cleanup WPImageGetter based on code analysis c955d26 Merge pull request #1764 from wordpress-mobile/issue/1713-send-version-code-to-mixpanel 3bc1080 Merge branch 'release/3.1' into develop f75a9e7 increment version number caa9db0 fix #1762: show blog url in the share blog spinner if the blog title is an empty string e1eecbf remove ProfilingUtils.getVersionName calls 075b989 remove unused method from ProfilingUtils b48cbda move BuildUtils to WPUtils subtree, rename BuildUtils to PackageUtils and add getPackageInfo and getVersionCode methods 44bb61e Rewrote the AppLog viewer to use a ListView+adapter 59f0bfa Merge branch 'develop' into issue/1690-track-last-seen-screen 9300d28 remove unused util file ActivityUtils b15cf64 Bump libs/utils version number. 0d89a80 generic way to track last seen activity - requires GET_TASKS permission 391276c Use the unicode version of the Horizontal ellipsis char. Restrict the visibility of some methods to private. c8dc1e8 Text view that auto adjusts text size to fit within the view.If the text size equals the minimum text size and still does not fit, append with an ellipsis. aa5b665 init utils readme 76df52f import libs/utis 449639d set defaultPublishConfig to debug - in case we had source dependencies to this module 5b1f8f1 remove gradle wrapper cd72102 Bump version number 90f9f22 Merge pull request #1 from wordpress-mobile/issue/move-ptr-to-utils c6b0ff9 showToast methods now return a Toast object 3e93210 Move pull to refresh to Utils b302b44 Move ToastUtils to Utils a0e973c document getPrimaryEmail method d68fb87 add getCircularBitmap and getRoundedEdgeBitmap from the main project merge in 80014b7 d2a76e2 avoid build failure when gradle.properties file is missing 5d683f6 use maven plugin to deploy maven artifact 70a91cb bump version number to 1.0.1 575579d gitignore tools/deploy-mvn-artifact.conf 50f2c80 maven deploying script cf85e19 ignore .idea and local.properties 7c6d4f4 add WPImageGetter and fix HtmlUtils b4baff8 remove crashlytics reference from Utils 32e98a9 merge from WordPress-Android@1a74364d0 79b7014 gitignore all build/ directories c9e6b52 Restores query separator period in `JSONUtils`. fddb5a0 Ignoring iml files 4263343 Initial commit of utils classes. 0228ac4 Fix package id name 826c265 Move java source to correct directory a528b8e Initial Project Structure git-subtree-dir: libs/editor git-subtree-split: 86805a0
…modularize-editor
571b0b7 add license file 48a14b0 add assets link 9dcfa23 Add 'libs/editor-common/' from commit '9d488d2a1c610380aa9446f8c9fea50d15354a84' 9d488d2 initial commit cdcc2a8 Initial commit 1b5d1fd add dependency on WordPressUtils and use AppLog instead of Log git-subtree-dir: libs/editor git-subtree-split: 571b0b7
…nces to WordPress.java
…ssCom-Analytics-Android into develop Conflicts: .gitignore README.md
4520f51 build.gradle fix to push the pom/aar to maven central c977755 update gradle wrapper to version 2.2 e0d1927 add central maven config 94d1dbb Merge branch 'release/3.7' into develop 8ff9413 fix AppLogViewerActivity when a log is message is null 7c208db Merge pull request #2264 from wordpress-mobile/issue/2222-theme-preview-title 9eb7273 new BlogUtils.getHostNameFromAccountMap function a80859d Theme live preview no longer changes the activity title 6186933 Photo viewer now uses low quality for the lo-res image 2eb9839 Simplified comments bfa7ecb Switched to quality enum which defaults to medium a2ce056 Added default quality param to photon 5a48a06 html encode log entries in AppLog.toHtml() c8a4d89 fix #103: retain menu drawer scroll position after switching activities c1e0778 Merge branch 'develop' into issue/985-make-sfactory-private fe1d125 fix build files for android studio 1.0 f7a2d48 Merge remote-tracking branch 'origin/develop' into issue/985-make-sfactory-private 72fe2b7 update support lib version for travis 0b03b71 Merge branch 'develop' of https://github.com/wordpress-mobile/WordPress-Android into feature/material-appcompat 0f5751d Merge branch 'develop' into release/3.4 b68f755 remove unused code (refresh button) cb8321b fix #985: maks sFactory private - force injection in test module faae1d3 Merge branch 'release/3.4' into issue/1982-simperium-concurrency Conflicts: WordPress/src/main/java/org/wordpress/android/models/Note.java a0982d1 Updated build.gradle to specify com.android.support:appcompat-v7:21.0.2 3a0c45e Removed unsuccessful fix for #1982. b967d59 first step at replacing PreferenceActivity by a PreferenceFragment + ActionBarActivity 92d4e15 Merge branch 'develop' into feature/material-appcompat 7c8d5ab Merge branch 'release/3.4' into develop 1e499a6 Merge branch 'hotfix/3.3.1' into release/3.4 7a4a364 Merge branch 'develop' of https://github.com/wordpress-mobile/WordPress-Android into feature/material-appcompat 5451df7 update subtrees to use build tools 21.1.1 4024637 rename PullToRefresh to SwipeToRefresh 0d8d414 remove unused viewClass in PTR constructor 2424201 fix circle spinner color style d392885 Return a copy of the JSONObject in getDiffableValue(). 106affa replace Chris Banes' PullToRefresh by the native SwipeToRefresh view 3108a36 Merge remote-tracking branch 'origin/develop' into feature/1961-add-mentions-to-commenting db25827 Merge branch 'develop' into issue/1958-round-avatars 2801610 Merge remote-tracking branch 'origin/develop' into feature/1961-add-mentions-to-commenting 6ac0248 Merge branch 'hotfix/3.3.1' into release/3.4 eb70e6f upgrade to android-gradle 0.14.0 9bc4ba6 Rounds all WPNetworkImageViews with `AVATAR` type. c2fd6c7 Initial commit adding mentions to notification comments 0a3da42 Added image spans directly instead of using Html.fromHtml(). git-subtree-dir: libs/utils git-subtree-split: 4520f51
…modularize-editor Conflicts: libs/utils/WordPressUtils/build.gradle
Tested all the scenarios you mentioned, on both a tablet and phone, and they're all working 👍 Gonna dig through the projects a bit now. |
Yep, moved the icon to the editor module and updated the constructor call in a5e6c39 |
Example project should look like this: |
Tested all the features both online and offline in the app as well as the example project and things seem to be working smoothly. 👍 for the interfaces and setting up the WebView. Reading through this I saw we can also override navigations. Maybe we could redirect WordPress.com sites to the app. I'm onboard with the merge. Do we want to wait on @bummytime to chime in before we push the button. |
@tonyr59h @maxme: I have been working with @aforcier for the past few days on a private copy of this branch and we have not encountered any issues. Since our focus was mainly porting portions of the iOS-Editor code over to Android, we did not test everything as well as @tonyr59h. However in our use case this PR provides a great starting point for the updated editor. So from our perspective, it's a |
367ebdc
to
e55baf9
Compare
This is a huge PR, because I had to extract
WordPressAnalytics
andWorPressEditor
in their own repo / subtree. The idea behind this modularization is to have aFragment
with a title + content editor. It also includes a format bar and a settings button because we don't want to have nested Fragments.I also made some changes in
WordPressUtils
(moved some code from the main project + renaming). That was a bad idea to include it in that PR, but it was also too late to change it back.Everything media related (upload, gallery creation, etc.) now lives in the
EditPostActivity
and could be reused for both the legacy and visual editor.The legacy editor supports wysiwyg edition for local drafts and html edition only for published posts/pages, so we have a dirty interface: here and here for instance, we will remove that when the legacy editor can be removed completly (or if we want to improve it and make some sort of
html2spanned
converter that would allow the wysiwyg edition of published posts).The visual editor is not usable yet, but everything is ready to make it work (lives in EditorFragment).
There is also a sample project that can be run without the main project. It should help to work on the hybrid editor and write new tests.
Warning: once this PR is merged, we must push
WordPressUtils
in its subtree (same forWordPressAnalytics
andWordPressEditor
, but this is not as important).Tested with: