Conversation
Generated by 🚫 dangerJS |
|
You can test the changes on this Pull Request by downloading the APK here. |
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
There was a problem hiding this comment.
Thanks @zwarm! Since most of the classes were cloned and reviewed originally, I found everything fine overall. I just left one comment for PostRestoreUseCase.
Also few suggestions (not related to the PR):
- How about we show a warning on the "Restore" screen that "This will override and remove all content created after this point" (similar to web version) before we try restore. I know you just referred the mockups so cc'ing @osullivanchris. I think it's an important message to be displayed to the user.
- On unchecking all restore items on the "Restore" screen, we might want to disable "Restore site" action button. I'm not sure what will restore if all items are unchecked. The button gets disabled on the web, just fyi.
| if (!networkUtilsWrapper.isNetworkAvailable()) { | ||
| NetworkUnavailable | ||
| } | ||
|
|
||
| val result = activityLogStore.rewind(RewindPayload(site, rewindId, types)) |
There was a problem hiding this comment.
❓: After NetworkUnavailable is fired, control will go to the next line and RemoteRequestFailure will be fired and only this last state will be sent to the VM ignoring NetworkUnavailable. Can we re-confirm this behaviour? We might want to add unit tests for use case to check this.
There was a problem hiding this comment.
@ashiagr - this all goes back to "should warning be a step" or really a state in details because we show network error as a snackbar back on details view in backup. I left this as an issue to address outside of this PR - handling "back" with error in the wizard.
WordPress/src/test/java/org/wordpress/android/ui/jetpack/restore/RestoreWarningViewModelTest.kt
Outdated
Show resolved
Hide resolved
Hey thanks for the ping @ashiagr! I think we are having pretty much the same discussion over here? I hadn't seen this message on web. Seems like a good one to include. Similar to the iOS discussion did you mean to replace the warning message I had in there, or have this in addition? |
Yeah I meant the same warning. We can just reuse the one shown in the web version. |
I'm with you on this and I agree that we should closely match the language on the web.
I can definitely implement this. @osullivanchris - just say the word |
|
@ashiagr Thanks for the review, I pushed the minor comments. Leaving the UI message changes as a separate task. I'll merge this PR when CI completes |
Agree but still not 100% sure what we are proposing. Are we changing text, or adding an additional line of text? Can you show me what we're talking about, or need me to mock up? Just not exactly clear on this.
Yep making the restore action disabled when nothing is selected makes sense to me. Go for it. |
I was looking for the message on the screen with the checkboxes 🤦♀️ since it appeared on clicking checkboxes on the web, I think it's fine to use the existing warning message unless iOS wants any changes. |
|
Discussed with @ashiagr on slack and realised the word 'All' is the only thing causing conflict for me now. Its the same as web. But it seems wrong to tell people that we are doing "All" whether they select some, or all, boxes. Hope that makes sense :) Will revert with same on the iOS issue |

Parent #13328
This PR implements the "warning" wizard step/view for the restore request.
The basic architecture is a clone of BackupDownloadDetailsViewModel with regards to making the request. What differs is the handling of the onBackPressed and error events. I'm on the fence as to whether this should be an actual wizard step or just a different view in the Details step. I am going to leave it as it for this PR, as I can adjust how the errors are handled separately.
Merge Instructions
Cloned Classes
RestoreWarningAdapter
RestoreWarningFragment
RestoreRequestState
RestoreWarningStateListItemBuilder
restore_warning_fragment.xml
Notes:
To test:
Warning: The Restore site button is hooked up, so if you press it your site will be backed up!
PR submission checklist:
RELEASE-NOTES.txtif necessary.