-
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
Mobile Stories block #12939
Mobile Stories block #12939
Conversation
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
You can test the changes on this Pull Request by downloading the APK here. |
…s and clientId from Gutenberg when block editing is requested
…an be retrieved and edited later Gutenberg
…composer after tapping on a Story block for editing
…aning, plus using a differentiated prefix when buildng keys to avoid the chance of local/remote overlapping ids
…ORY_EDIT_MODE so we can show discard dialog messaging properly
…ng the limited editing dialog when a Story slide to be eidted hasnt been found in StoriesPrefs
…se/LoadStoryFromStoriesPrefsUseCase.kt Co-authored-by: Joel Dean <[email protected]>
Thanks a lot for your very insightful review @jd-alexander ! Addressed all your comments, ready for another round 🙇 .
I think what the dialog says is still true: a) the story has been created on another device (well, not entirely true if you re-installed, but most likely), and b) we can't allow editing at this moment. I understand the case for ambiguity you're pointing out; so I wouldn't tie this to connectivity issues because it could be something else as well. What about |
If I understand the situation, the 'created on a different device' part seems not important here - we can't let the user edit the story because we aren't able to download the media. (If it had been created on the device, we'd have the media, but that's probably not a connection the user will/should make.) So what about just:
You did mention that
What else could cause this state? Unless this is often flat wrong, I think pointing to the connection is a good hint at what would have to change before this screen actually works, and we can add more specific messaging if we later have other cases that lead to this state. WDYT? |
When this situation is reached (media indicated by the story block can't be found), they will only be able to successfully retrieve the media if both these conditions are met: a) they go out of the Editor and back in, with proper connectivity to their site So I would be extra cautious (that's why I said I wouldn't tie this to connectivity issues only because it could be something else as well and we'd be asking them to refresh forever when it may actually be an unrecoverable state). What about this: Title: This is still long I know 😅 , if you can come up with something shorter that still conveys the message politely that'd be great 👍 🙏 EDIT
We could also for example catch the |
Thanks for expounding in more detail here @aforcier @mzorz
I totally get this 🙏 As you described further in your comment, what we can do is show the dialog with errors we are sure of, and then for the "something else" case we just have a default dialog. I agree with @aforcier about adding more specific messages about what leads to a particular state. Just to further the discussion some more, can we do any type of logging to figure out the other cases that would cause this to fail? Also, we want to track how many failures are taking place here as well versus successes so we can make incremental improvements to have all cases covered.
This would be good for a "More Info" action but not for the dialog itself as you have stated it's too long 😅 but yes, this is helpful. As a user using the story functionality I wouldn't want to go to the media of the site and refresh the list there. Is there anything we can do from within the
This approach sounds like a good one because one thing I know for sure is that once it comes to media downloads and syncing there can be several issues and we wouldn't want any of them to cause the user too much frustration when they have created their story. So optimizing the error handling and it's communication as much as possible will definitely save us in the long term. To summarize my thoughts, we can utilize short & specific error messages based on the error that led to a particular state eg.
Doing this will allow us to have good fallback mechanisms and context so users can figure out what's going wrong with the story they are created so it can be resolved and lead them to successful edits in the future. |
…enbergBlockUseCase
…for a given story slide so to make it editable
Alright! Thank you for all the brainstorming @jd-alexander @aforcier 🙇 I implemented the following logic in 62fec15:
To test: For point 1 above (potentially retriable error):
For point 2 above (permanent error) - after doing the above:
Should be ready for another round, and let me know your thoughts 🙇 @jd-alexander @aforcier |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the solution for the messaging is great, nicely done 👏
I tried out the new changes and re-tested the overall flow, everything seems to be working smoothly 🎉 Just made one wording suggestion.
I'll defer to @jd-alexander for the final
Co-authored-by: Alex <[email protected]>
WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.java
Outdated
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/ui/stories/prefs/StoriesPrefs.kt
Show resolved
Hide resolved
@mzorz I am giving this a test now. I just saw the hash update so I will pull that down to ensure I have the latest changes 🙏 |
@mzorz I was trying to do the final review here but for some reason, the content of my post is of the initial HTML so I am wondering if I did something is off with the way how I approached this. I will revisit. |
Thanks for spotting that one - that's fixed in wordpress-mobile/gutenberg-mobile#2705 - will cherry pick and update this branch here so you can continue reviewing 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for these changes @mzorz tested both paths and they work as expected. This is a great improvement. LGTM 🚢
This PR adds support for the jetpack Story block to be rendered on gutenberg-mobile, and provides the bridge implementation on the WPAndroid side of things to connect the block actions to the Story composer.
Related Jetpack PR: Automattic/jetpack#17140
Related Gutenberg PR: WordPress/gutenberg#25242
Related Gutenberg-mobile PR: wordpress-mobile/gutenberg-mobile#2611
test block rendering
Test block editing
CASE A: the story is in memory (no prefs are used)
CASE B: the story has been created on this device, not in memory
CASE C: the story has not been created on this device
CASE C1: story created on another device, media not present on current device
CASE C2: story created on another device, media not present on current device, NO NETWORK
PR submission checklist:
RELEASE-NOTES.txt
if necessary.