Skip to content

Populate Scan History screen with data from /scan/history endpoint#13802

Merged
malinajirka merged 15 commits intodevelopfrom
issue/13326-use-jetpack-history-endpoint
Jan 19, 2021
Merged

Populate Scan History screen with data from /scan/history endpoint#13802
malinajirka merged 15 commits intodevelopfrom
issue/13326-use-jetpack-history-endpoint

Conversation

@malinajirka
Copy link
Copy Markdown
Contributor

@malinajirka malinajirka commented Jan 18, 2021

Parent issue #13326

Related PR in FluxC - wordpress-mobile/WordPress-FluxC-Android#1841

Merge instructions

  1. Use FluxC tag
  2. Remove "Not ready for merge" label
  3. Merge this PR

This PR uses data provided by the /scan/history endpoint to populate Scan History screen (note: filtering by tab is not yet supported).
We decided to fetch data in the ScanHistoryViewModel (parent) and provide them to ScanHistoryListViewModel (children) through LiveData. Filtering is not yet supported, but I plan to do the actually filtering in the child view models.

To test:

  1. Make sure Scan feature flag is enabled
  2. Open Scan screen
  3. Click on "History" button in the Toolbar
  4. Notice the history screen is shown and threats get displayed after the request finished (it sometime takes 20+ seconds)

Note:

  • loading/error states are not implemented
  • tab filtering doesn't work yet
  • on item click is not implemented

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.

@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Jan 18, 2021

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 Jan 18, 2021

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

@malinajirka malinajirka added this to the 16.6 milestone Jan 18, 2021
@malinajirka malinajirka requested a review from ashiagr January 18, 2021 14:20
@malinajirka malinajirka self-assigned this Jan 18, 2021
@ashiagr ashiagr self-assigned this Jan 19, 2021
Copy link
Copy Markdown
Contributor

@ashiagr ashiagr left a comment

Choose a reason for hiding this comment

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

Thanks @malinajirka! So nice to start seeing threats history 🌟.
I just left minor comments. Feel free to address them in subsequent PR.

Approving this PR.

@malinajirka malinajirka merged commit 35c6a97 into develop Jan 19, 2021
@malinajirka malinajirka deleted the issue/13326-use-jetpack-history-endpoint branch January 19, 2021 10:19
@malinajirka malinajirka mentioned this pull request Jan 19, 2021
67 tasks
@malinajirka malinajirka mentioned this pull request Feb 8, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants