Jetpack Section: Update Activity Log Details UI and Add Backup Download Button/Flow#14117
Jetpack Section: Update Activity Log Details UI and Add Backup Download Button/Flow#14117
Conversation
This will still produce a 'NullPointerException' if the 'activityLogId' ends up missing from within the intent, but at least this now resolved the warning and makes this more explicit.
This is done as per the design changes. See the corresponding issue for more details.
This is done in order to group the layouts and also because of the fact that unless that is done reformat will always reposition the activity restore button linear layout on top of those text views.
This is done as per the design changes. See the corresponding issue for more details.
This is done as per the design changes. See the corresponding issue for more details.
This is done as per the design changes. See the corresponding issue for more details.
Also, this commit removes the now unused 'rewind' string from the list of strings.
This is done as per the design changes. See the corresponding issue for more details.
This is done as per the design changes. See the corresponding issue for more details.
This 'RewindStatusService' is only being used in order to determine whether the 'activityRestoreButton' is to be shown or not. Since the same logic needs to be applied for the 'activityDownloadBackupButton', another, more simplified solution will substitute the service. This other solution will pass the buttons visibility flag from the previous screen and show/hide both the restore and download backup buttons. Actually, after thinking on the existing service solution it might be even better if the UX is updated to the more simplified solution since otherwise, with the current solution, a user might see the restore button appear out of nowhere, given the fact that they enter the details screen while a restore is in progress, and that restore finishes while they are within the details screen, not knowing in the end, why this button ends up being appearing afterwards. Obviously, the more simplified solution would not cover some edge cases. However, those edge case, if need be, can be worked on later on. As such, the 'RewindStatusService' is no longer needs and can be safely removed from the codebase.
These tests will fail as the implementation is not ready yet. The next commit will make the tests pass (TDD).
This commit makes the previous failing test pass (TDD).
These tests will fail as the implementation is not ready yet. The next commit will make the tests pass (TDD).
This commit makes the previous failing test pass (TDD).
These tests will fail as the implementation is not ready yet. The next commit will make the tests pass (TDD).
This commit makes the previous failing test pass (TDD).
This makes the 'onActivityCreated(...)' function less complex.
This makes the lines fit into 120 characters.
This flag will now be responsible for showing/hiding the restore and download backup buttons based on: - Whether the activity log list item is rewindable, and - Whether a restore or backup download is in progress (see 'EventItemViewHolder' change).
This commit will make sure to forward the activity result from the backup download flow to the activity log through the activity log detail screen. This commit also makes sure that the restore and backup download flows are being differentiated on the receiving 'onActivityResult(...)' list screen.
This was in general unused and never got to be utilised since use cases where used instead.
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
Generated by 🚫 dangerJS |
|
You can test the changes on this Pull Request by downloading the APK here. |
|
👋 @zwarm ! Thank you so much for the rapid review and for merging that to PS: About those services, YEA, so happy to have them gone as well! 🎉 👋 @osullivanchris ! Apologies for merging with Please feel free to suggest any change and I'll create another PR afterwards. 🙏 |
|
@ParaskP7 Hey I just went through it. It looks great. Nice quick fix and good attention to detail on the UI, it looks spot on. Thank you! |
|
👋 @osullivanchris ! Many thanks for the review, and your kind words, as always! ❤️ |
Fixes #14095
This PR does the below:
Activity Log Detailsscreen UI based on design (see this comment for more details).Download Backupbutton and connects theActivity Log Detailsscreen with the backup download flow.Rewind Status Servicewith a more simplified solution for making sure that the restore and download backup buttons are shown/hidden depending on the rewindable and in progress status of the activity log items.More importantly, this PR makes sure that when a user presses the
DOWNLOAD BACKUPbutton within theActivity Log Detailscreen, then they get redirected to theBackup Downloadscreen. Also, when a backup download gets triggered from within this flow, this PR makes sure that the user get redirected back to theActivity Logscreen, skipping theActivity Log Detailscreen and starts seeing the backup download progress row within that screen.To test:
My Sitetab.Activity LogorBackupscreen.Activity Log Detailscreen.RESTOREandDOWNLOAD BACKUPbuttons are visible.Activity Log Detailscreen.RESTOREandDOWNLOAD BACKUPbuttons are not visible.RestoreorBackup Downloadflow from a rewindable item from the list. Wait for the progress item to appear and the menu item on all the list items to disappear.RestoreorBackup Downloadprocess is in progress, find a rewindable item from the list and click on it. You will now enter theActivity Log Detailscreen.RESTOREandDOWNLOAD BACKUPbuttons are NOT visible.RestoreorBackup Downloadprocess is in progress, find a non-rewindable item from the list and click on it. You will now enter theActivity Log Detailscreen.RESTOREandDOWNLOAD BACKUPbuttons are not visible.RestoreorBackup Downloadprocess to finish.Activity Log Detailscreen.RESTOREbutton to launch theRestorescreen,Restore sitebutton. On the confirmation screen, click on theConfirm restore sitebutton.Xtoolbar button or pressing/swiping back).Activity Logscreen, skipping theActivity Log Detailscreen and a restore status will be triggered,Restorescreen and flows, DO NOT trigger the restore, go back.Activity Log Detailscreen.Activity Log Detailscreen.DOWNLOAD BACKUPbutton to launch theBackup Downloadscreen,Create downloadable filebutton.Xtoolbar button or pressing/swiping back).Activity Logscreen, skipping theActivity Log Detailscreen and a backup download status will be triggered,Backup Downloadscreen and flows, DO NOT trigger the backup download, go back.Activity Log Detailscreen.PR submission checklist:
RELEASE-NOTES.txtif necessary.