Conversation
|
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 ! I have some questions on the second scenario:
|
|
👋 @zwarm ! I also tested a fifth scenario, given that was on the video you shared, opening the
Everything works as expected, kudos! 🌟 |
osullivanchris
left a comment
There was a problem hiding this comment.
I went through the 4 flows and tested on tablet and dark mode. All looks exactly as expected, nice work 👌 😃
Yes 🤦
I decided to leave it because we are returning from another screen, where as in scenario 1 we are already in the context of the list. I could just as easily remove it here too. We need a tie breaker. |
|
👋 @zwarm !
Actually, thinking about it more and having you explained it it makes sense, let's leave it as is for now! 🙏 |
ParaskP7
left a comment
There was a problem hiding this comment.
👋 @zwarm !
I have reviewed and tested this PR as per the instructions, everything almost works as expected, amazing job dealing with this huge fat task! 🌟 🌟 🌟
I have left some minor (🔍) comments and suggestions (💡) for you to consider. Also, I have left a handful of questions (❓) I would like to discuss with you. Most importantly, I have left some warnings (develop.
🙏
...rg/wordpress/android/ui/jetpack/backup/download/usecases/PostDismissBackupDownloadUseCase.kt
Show resolved
Hide resolved
...ess/src/main/java/org/wordpress/android/ui/jetpack/backup/download/BackupDownloadFragment.kt
Show resolved
Hide resolved
...ss/src/main/java/org/wordpress/android/ui/jetpack/backup/download/BackupDownloadViewModel.kt
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/viewmodel/activitylog/ActivityLogViewModel.kt
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/viewmodel/activitylog/ActivityLogViewModel.kt
Show resolved
Hide resolved
| tools:text="We successfully created a backup download file from October 21, 2020 at 3:40 AM." | ||
| android:text="@string/activity_log_backup_download_notice_description_with_two_params"/> | ||
|
|
||
| <androidx.constraintlayout.widget.ConstraintLayout |
There was a problem hiding this comment.
Question (❓): Couldn't the same result be achieved with only one layer of ConstraintLayout?
There was a problem hiding this comment.
Going to leave this as is for now, if I have time I will revisit
| </style> | ||
|
|
||
| <!-- ActivityLog List Backup Download Notice Item --> | ||
| <style name="ActivityLogList.Notice.Item.Label" parent="android:Widget.TextView"> |
There was a problem hiding this comment.
Suggestion (💡): I usually suggest that the layout_width and layout_height to not be part of a style since they are totally dependent on the individual screen and how a specific element is positions in it. Also, I consider the layout_margin to be included in this category. However, the padding can be indeed considered part of the style.
PS: I see both approached being used on our styles, as such I am okay with anyway you decide to proceed with that. This was just me sharing my thoughts since I would have done it the way I described it.
There was a problem hiding this comment.
Going to leave this as is for this PR, as there are multiple approaches to using styles. We should have a follow up on future direction overall. Thanks
Fixes #14030
This PR adds the Backup Download Banner to the activity log list and backup list.
Notable changes ( It may be easiest to review this PR by commits and I'm available if reviewer wants to pair review)
activity_log_list_notice_item.xml- New layout file for the notice bannerstyles.xml&strings.xml- Added new styles for the banner and a few stringsActivityLogAdapter,ActivitiyLogDiffCallback- both updated to support theNoticelist item type and the newNoticeItemViewHolder, so that the view will actually show in the listCompleteto include url and validUntil andGetBackupDownloadStatusUseCaseto send those values downstreamPostDismissBackupDownloadUseCasewhich is post the dismiss request to the server. If there is an error, we log it and move on.JETPACK_BACKUP_DOWNLOAD_FILE_NOTICE_DOWNLOAD_TAPPED -
JETPACK_BACKUP_DOWNLOAD_FILE_NOTICE_DISMISSED_TAPPED,
ACTIVITY_LOG_DOWNLOAD_FILE_NOTICE_DOWNLOAD_TAPPED,
ACTIVITY_LOG_DOWNLOAD_FILE_NOTICE_DISMISSED_TAPPED
ActivityLogTrackerto make the tracks call reusableDownloadBackupFile, which will forward the user to the web browser for file download. Updated the observer inActivityLogListFragmentto handle the browser launchJetpackBackupDownloadActionStatewhich will let the calling activity know which state the download is in on return. This was a precursor to showing the correct messaging when returning to the activity log list or backup list. Changes were made toBackupDownloadFragmentandBackupDownloadViewModelto support this new intent extra.ActivityLogViewModel, which include:backupDownloadEventwith a displayNotice field, so whenreloadEventsexecutes it uses this property to determine if the notice banner should be shown. Also included downloadId, url, and validUntil.onQueryBackupDownloadStatusto use the JetpackBackupDownloadActionState to determine which snackbar message to be shown. Note that in the case of returning to the lists, we do want to show the snackbar in addition to the notice banner.handleBackupDownloadStatusForProgressto no longer check if the progress item is shown, we always kick off a reloadEventshandleBackupDownloadStatusForCompleteto reloadEvents of the progressItem is not shownMerge Instructions:
To test:
Scenario.1 : BackupDownload Flow - Manual Exit
Activity Logscreen,Download backupto launch theBackup Downloadscreen,Create downloadable filebutton.Xtoolbar button or pressing/swiping back).Activity Logscreen and a backup status will be triggered,Activity LogscreenScenario.2 : BackupDownload Flow - Wait for flow to end and then exit
Activity Logscreen,Download backupto launch theBackup Downloadscreen,Create downloadable filebutton.Xtoolbar button or pressing/swiping back)Scenario.3 (Notice banner download)
Scenario.4 (Notice banner dismiss)
PR submission checklist:
RELEASE-NOTES.txtif necessary.