-
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
Implement Offline actions - posting/scheduling/deleting while offline #9555
Comments
This contradicts with #9565. That issue is saying that we don't see anything but this issue saying that we do. 🤔 |
It seems the description of #9565 has been updated. We are currently considering following this principle |
We still have to discuss whether we should schedule posting in the background or never publish if the user is offline. |
If there's no urgency in closing this one, maybe we can freeze it for the time being? I currently don't have the bandwidth to peek into this, but feel like I'd like to understand a bit more before reaching my own conclusions. PS: it's ok for me if we set it's priority to low, or assign it to a "Frozen" column in the project. |
I think we can just leave the priority as is and work on the high priority issues for now. We can continue discussions later. This is how things currently work right now:
I'm not sure which one is right but Android's behavior is scary for me as a user. |
Subscribing @wordpress-mobile/ravenclaw |
Labeled at "13" as it needs discussion |
This is one of the long-going discussions which is a bit difficult to close as all the solutions seem to have some downsides. When I click on Publish/Update I kind of expect the post will be published as soon as possible. Possible downsides a) The device can become online after a week - imho it doesn't really matter and it sounds like an edge case scenario. b) The user wants to cancel the upload - they can still open the post in the app and change its status from "publish" to "draft" in the Post Settings. However, I agree this option is quite hidden. We might want to consider adding it to the Post List. c) The user updates the post in Calypso before it gets published from the app. This can be a real issue as the app could override the remote (the most up to date) version. - for me this is the biggest deal and I think it won't be an edge case scenario. I think we could modify the api and start sending "remoteModifiedDate" in the "PushPost" request and if the post has been modified in the remote, the api could just return an error and we'd require a user interaction. Wdyt? |
I had an idea on 11420 which I believe is related Could we prompt the user with a toast or other message when they come online. Saying 'your post is now ready to publish do you want to go ahead'. We could also send a push notification to the device, as we can't assume the user is in our app, and they might not come back in the time they expected to publish. Then we get the benefit of showing the user we've followed up when connectivity returned. But without the fear of something happening unexpectedly. |
@osullivanchris, I like the idea of prompting the user before publishing when going back online or/and update the status to "ready to publish" though I think the latter should be split up from this especially since we're in talks of refactoring post activity. Imo, the bigger downside from @malinajirka's list is C (The user updates the post in Calypso before it gets published from the app) and I believe the prompt will solve this. @malinajirka , @diegoreymendez can you think of any foreseeable issues with taking this approach on both platforms and moving forward with its implementation? |
@yaelirub - I'd just be interested to see the actual UI/UX flow for this (I think it'd probably need some new screen?), but definitely no objections on my end. |
I have been thinking about this and I can see two potential issues
Both the issues above are solvable, but I just wanted to point out there will be some bumps on the road we'll need to fix. For me the ultimate question is whether it's worth the effort. Honestly, I'm not even sure it'll be an improvement for the users. The scenario that the user doesn't want to publish a post they wrote and tried to publish seems like an edge case to me - in which they can simply go back to the app and move the post back to draft. So if it were up to me, I'd make sure we publish only posts for which the user confirmed publishing + I'd fix the "bug" on the API which allows you to override changes in the remote with an older post. However, if you think showing the prompt is an improvement worth the effort, let's do it:). I think this is one of the cases where having a deadline makes sense. So if there are no objection against the approach Chris proposed till Wednesday (3rd of July 11:59pm), I'd move forward with the design proposal + implementation. |
Thanks for the feedback folks! I worked through the flow as @diegoreymendez suggested and it turned up some issues, also discussed with @malinajirka . Lets take a quick look
PROPOSAL When the user chooses to publish and we don't get an internet connection, a toast appears saying (placeholder) "Offline. Publishing when connection returns" with the action "Cancel".
On the post card, there is a label saying "Publishing when connection returns" and it stays in drafts for now (as it is not published) When the user returns online
Outstanding issues
|
That's awesome, @osullivanchris. On the last image, bottom right, I believe you wanted to say:
Or something along those lines. |
For "Post Published" and "Post Scheduled" it looks to me like the "View" button offers you a way to identify the relevant post, but when offline-deleting I wonder how that notice with the "Undo" button would give you context. I can see myself wondering what post the notice is referring to (as these notices can come up while you're in other sections of the App as well). Also, any thoughts on adding a timeout for these scheduled operations? If we're publishing a post that was last modified a month ago, that's probably a red flag and it's something we should be able to check rather easily. |
Thank you so much, @malinajirka ! I've updated the title to reflect the subtasks and the decision.
?? |
@yaelirub @diegoreymendez I think per the discussion on paCBwp-bF-p2 it makes sense to put a time limit on it. I will try capture what that would look like today. It might need to be a separate / sub-task. Something like 'timeout for offline actions'. We can start with a sensible assumption: cancel the task after 48 hours. I just want to take a look at what it looks like when the user comes back online after 49 hours. Just to make it clear to them what has happened/what state the thing is in. 48 hours might not be "perfect" but its sensible and once we put it in place we can get some feedback and learn if a different time period is more optimal. |
@osullivanchris As we discussed the design proposal doesn't cover all the statuses. Here is a list of all the statuses with some proposals. In the design proposal Publish draft in offline | Edit published post in offline Schedule post in offline | Edit scheduled post in offline Post trashed in offline (trashed post can't be edited) Not in design proposal Save draft in offline | Edit draft in offline Submit post for review in offline | Edit post submitted for review in offline Publish private post in offline | Edit published private post in offline Restore in offline Note: AFAIK we currently don't store the original (remote) status of the post. Therefore we can't differentiate between "first time publish vs edit of an already published post". However, we are probably going to start storing the original status in some other PR and as soon as it's merged we can start showing different messages if we want to 🤷♂. SideNote: |
100% agree @osullivanchris I'm a big fan of separating work into atomic tasks when possible. |
Brilliant!
Do these need copy review? @osullivanchris , @diegoreymendez , opened and issue for offline actions timeout |
Yes, but I wanted @osullivanchris to see them first. |
@malinajirka this is really great stuff. Thank you for capturing all those cases. I think the ones I worked through are ones which would create the most anxiety for users, so if its working for those cases, I'm confident we can carry the solution through to these. Do you think we need mocks? It seems like we've landed on the same UI for all cases, so capturing the content seems like all that we need to me. @yaelirub this copy approach originally came from the editorial team per this comment We've expanded the approach from just "Post will be scheduled next time your device is online" to "Post will be [outcome] next time you're offline". I like the consistency of the approach. If we're agreed on everything else but feel we need one more copy review for confidence please let me know or tag away! |
That's what I assumed, but I felt like that when we are touching this part of the code it makes sense to improve all the cases. Thanks for clarification.
I don't think we need mocks for these cases. Thank you for asking though!
|
Part of the problem I see with how we're moving forward with our discussions, is that we're sometimes not opening new issues when it would help make things clearer. In the case of this specific discussion, editing the initial ticket in place means:
I'm closing this issue now. I opened the final decision issue here: #10224 Any new conversation pertaining that issue should happen there. |
When you create a post and you hit “publish now” a toast “Device is offline, changes saved locally” is shown
Decision
Android
The text was updated successfully, but these errors were encountered: