Display content information metrics #2380
Conversation
|
Wanna run full suite of Android and iOS UI tests? Click here and 'Approve' CI job! |
|
Based on some discussion on Slack, I whipped up some options to discuss. For reference, here are the items that the web editor provides:
We have character and word count on Aztec (the "classic" editor) but not on mobile Gutenberg, so we are looking at some or all of the following:
Here are the options, based on the above:
To keep things simple and build upon what already exists for users on Aztec, I think the best approach is to start with Option 1 (blocks, words, characters). Option 3 makes sense if we want to fully align with core and Option 2 feels stuck in-between. // cc @SergioEstevao @hypest |
|
@iamthomasbishop I implemented option 1 above and just updated the screenshot of the description. |
|
@SergioEstevao Is it possible to only add the plural ("s") when the given type's value > 1? In other words "1 block" vs. "2 blocks", etc. |
|
👋 @SergioEstevao , I've opened this gb-mobile PR and this WPAndroid PR (targeting your PRs) to complete the Android side support of the feature. Feel free to merge to your PRs before or after they get reviewed. Notice, I've targeted the 15.2 WP apps milestone as I don't think the feature can be merged in time for the 15.1. You might want to adjust the milestone and the related RELEASE-NOTES.txt mention on your PRs too. |
@iamthomasbishop so at the moment in Aztec we everything in the plural always: Ex: This is because of a problem with WordPress translating tools (Glotpress) that don't support plurality as you can read here: wordpress-mobile/WordPress-iOS#6327 I was trying to go around the issue by introducing the |
etoledom
left a comment
There was a problem hiding this comment.
Looks great! 🎉
I added a small suggestion as code comment but nothing blocking.
Great job @SergioEstevao 🙏
react-native-gutenberg-bridge/ios/RNReactNativeGutenbergBridge.swift
Outdated
Show resolved
Hide resolved
etoledom
left a comment
There was a problem hiding this comment.
Thank you for the update, looks great 🎉
iOS ✅
Glue code to get content info metrics
mchowning
left a comment
There was a problem hiding this comment.
Looks good. I had one question about the timeout we're using for the countdown latch, but it's certainly not a blocking issue.
...nberg-bridge/android/src/main/java/org/wordpress/mobile/WPAndroidGlue/WPAndroidGlueCode.java
Show resolved
Hide resolved
# Conflicts: # gutenberg


Fixes #506
This PR changes the bridge method to display the content information metrics about the content being edited:
To test:
Notes:
I considered implementing this in the main apps only, but in the end, I thought it was better to use a single source of the metrics for all three implementations: web, iOS, Android.
If we implemented in the main apps we will need to replicate the code in three places, and the only marginal advantage could be some performance, wich I don't think it's worth the maintenance costs.
PR submission checklist:
RELEASE-NOTES.txtif necessary.