Skip to content

Jetpack Section: Update Activity Log Details UI and Add Backup Download Button/Flow#14117

Merged
zwarm merged 30 commits intodevelopfrom
issue/14095-update-activity-log-detail-ui
Feb 19, 2021
Merged

Jetpack Section: Update Activity Log Details UI and Add Backup Download Button/Flow#14117
zwarm merged 30 commits intodevelopfrom
issue/14095-update-activity-log-detail-ui

Conversation

@ParaskP7
Copy link
Copy Markdown
Contributor

@ParaskP7 ParaskP7 commented Feb 19, 2021

Fixes #14095

This PR does the below:

  • It updates the Activity Log Details screen UI based on design (see this comment for more details).
  • It add the Download Backup button and connects the Activity Log Details screen with the backup download flow.
  • It replaces the Rewind Status Service with 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 BACKUP button within the Activity Log Detail screen, then they get redirected to the Backup Download screen. Also, when a backup download gets triggered from within this flow, this PR makes sure that the user get redirected back to the Activity Log screen, skipping the Activity Log Detail screen and starts seeing the backup download progress row within that screen.

Light Theme Dark Theme Layout Bounds
before after after

To test:

  • Open app and go to My Site tab.
  • Launch Activity Log or Backup screen.
  • Find a rewindable item from the list and click on it. You will now enter the Activity Log Detail screen.
  • On that screen, make sure that both, the RESTORE and DOWNLOAD BACKUP buttons are visible.
  • Make sure the UI matches the designs (see this comment for more details).
  • Go back to the previous list screen.
  • Find a non-rewindable item from the list and click on it. You will now enter the Activity Log Detail screen.
  • On that screen, make sure that both, the RESTORE and DOWNLOAD BACKUP buttons are not visible.
  • Go back to the previous list screen.
  • Trigger the Restore or Backup Download flow 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.
  • While the Restore or Backup Download process is in progress, find a rewindable item from the list and click on it. You will now enter the Activity Log Detail screen.
  • On that screen, make sure that both, the RESTORE and DOWNLOAD BACKUP buttons are NOT visible.
  • Go back to the previous list screen.
  • While the Restore or Backup Download process is in progress, find a non-rewindable item from the list and click on it. You will now enter the Activity Log Detail screen.
  • On that screen, make sure that both, the RESTORE and DOWNLOAD BACKUP buttons are not visible.
  • Wait for the Restore or Backup Download process to finish.
  • Find a rewindable item from the list and click on it. You will now enter the Activity Log Detail screen.
  • On that screen, click the RESTORE button to launch the Restore screen,
  • Click the Restore site button. On the confirmation screen, click on the Confirm restore site button.
  • Navigate back manually (by clicking the X toolbar button or pressing/swiping back).
  • You should automatically be navigated back to the Activity Log screen, skipping the Activity Log Detail screen and a restore status will be triggered,
  • The restore progress item should immediately appears. Make sure the restore timestamp is available on this progress item.
  • Try doing the same steps again, but this time when within the Restore screen and flows, DO NOT trigger the restore, go back.
  • Make sure that going back will navigate to the Activity Log Detail screen.
  • Again, find a rewindable item from the list and click on it. You will now enter the Activity Log Detail screen.
  • On that screen, click the DOWNLOAD BACKUP button to launch the Backup Download screen,
  • Click the Create downloadable file button.
  • Navigate back manually (by clicking the X toolbar button or pressing/swiping back).
  • You should automatically be navigated back to the Activity Log screen, skipping the Activity Log Detail screen and a backup download status will be triggered,
  • The backup download progress item should immediately appears. Make sure the backup download timestamp is available on this progress item.
  • Try doing the same steps again, but this time when within the Backup Download screen and flows, DO NOT trigger the backup download, go back.
  • Make sure that going back will navigate to the Activity Log Detail screen.

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

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.
@ParaskP7 ParaskP7 added [Type] Task Jetpack [Status] Needs Design Review A designer needs to sign off on the implemented design. Jetpack Mobile labels Feb 19, 2021
@ParaskP7 ParaskP7 added this to the 16.8 milestone Feb 19, 2021
@ParaskP7 ParaskP7 self-assigned this Feb 19, 2021
@peril-wordpress-mobile
Copy link
Copy Markdown

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Feb 19, 2021

Warnings
⚠️ PR has more than 500 lines of code changing. Consider splitting into smaller PRs if possible.

Generated by 🚫 dangerJS

@ParaskP7 ParaskP7 mentioned this pull request Feb 19, 2021
30 tasks
@peril-wordpress-mobile
Copy link
Copy Markdown

You can test the changes on this Pull Request by downloading the APK here.

Copy link
Copy Markdown
Contributor

@zwarm zwarm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ParaskP7 🥳 Everything works as expected. 🙇‍♀️ for getting rid of the services, so happy to see those gone!

@zwarm zwarm merged commit c2a9860 into develop Feb 19, 2021
@zwarm zwarm deleted the issue/14095-update-activity-log-detail-ui branch February 19, 2021 15:27
@ParaskP7
Copy link
Copy Markdown
Contributor Author

ParaskP7 commented Feb 19, 2021

👋 @zwarm !

Thank you so much for the rapid review and for merging that to develop, you rock! 🙏

PS: About those services, YEA, so happy to have them gone as well! 🎉

👋 @osullivanchris !

Apologies for merging with develop without your approval first, I forgot to add the MERGE INSTRUCTION on the PR description and explicitly specific to NOT merge until that is done.

Please feel free to suggest any change and I'll create another PR afterwards. 🙏

@osullivanchris
Copy link
Copy Markdown

@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!

@ParaskP7
Copy link
Copy Markdown
Contributor Author

👋 @osullivanchris !

Many thanks for the review, and your kind words, as always! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Jetpack [Status] Needs Design Review A designer needs to sign off on the implemented design. [Type] Task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Jetpack Section: Update Activity Log Details UI and Add Backup Download Button/Flow

3 participants