Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7778 - Bulk delete redesign #7846

Merged
merged 45 commits into from
Dec 2, 2022
Merged

7778 - Bulk delete redesign #7846

merged 45 commits into from
Dec 2, 2022

Conversation

latin-panda
Copy link
Contributor

@latin-panda latin-panda commented Oct 17, 2022

Description

  • Border left indicator was moved from .content-row a to .content-row as side effect of separating click scope from anchors and checkboxes, all tabs' lists using .content-row should work fine same as original code.

Screen Shot 2022-10-17 at 12 24 36 pm

  • The action bar's buttons related to bulk delete and select mode (select all, deselect all, etc) have been removed from here and now the multiselect bar component will handle some of these. The action bar will eventually disappear as part of the UI evolution ("FAB", "More options" tasks)
  • Store's selected report has been split in selectedReport (a report selected to open/view its content) and selectedReports (a collection of reports selected for bulk operation). This is because the user can open to view a report while the select mode is active on mobile devices.
  • The select mode is now calculated in the Report's component, it's based on the last state of the store.
  • The modal displaying "Bulk deletion has completed. Click complete to refresh the page" will not have the cancel button anymore because it was doing the same as the "complete" button, it's considered redundant.
  • Adding default values to navigation component properties to avoid angular exception on change detection.
  • A telemetry record is saved when the user bulk delete, counting number of docs deleted.
  • The protractor test submit-delivery-form.specs.js was already migrated, so I removed it and updated the PROTRACTOR_WDIO_MIGRATION_STATE.md.
  • We've decided to not fully support responsive UI, details here.

Screenshots of feature.

CHT_Docs

#7778

Code review checklist

  • Readable: Concise, well named, follows the style guide, documented if necessary.
  • Documented: Configuration and user documentation on cht-docs
  • Tested: Unit and/or e2e where appropriate
  • Internationalised: All user facing text
  • Backwards compatible: Works with existing data and configuration or includes a migration. Any breaking changes documented in the release notes.

License

The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.

@latin-panda
Copy link
Contributor Author

Hi @dianabarsan can you please review?

@tatilepizs can you please review too and let me know if any other coverage is needed?

Thanks for you time!

@latin-panda
Copy link
Contributor Author

latin-panda commented Oct 28, 2022

Hi @tatilepizs I've updated the tests, can you please have a look again? Thanks!

Nb. I've updated the ticket and the PR's description with latest screenshots and decisions about the feature.

@latin-panda latin-panda marked this pull request as ready for review October 28, 2022 11:32
Copy link
Contributor

@tatilepizs tatilepizs left a comment

Choose a reason for hiding this comment

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

Is still looking good to me 😄
Thanks @latin-panda !

Copy link
Member

@dianabarsan dianabarsan left a comment

Choose a reason for hiding this comment

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

Excellent work! I really like the changes in effects and action names, it makes it much clearer to understand compared to the old version and makes the isMobile required fewer times. Great!

I did add some minor comments and an e2e test request, if possible.
Thanks!!

webapp/src/ts/effects/reports.effects.ts Outdated Show resolved Hide resolved
webapp/src/ts/effects/reports.effects.ts Show resolved Hide resolved
webapp/src/ts/reducers/reports.ts Show resolved Hide resolved
webapp/tests/karma/ts/effects/reports.effects.spec.ts Outdated Show resolved Hide resolved
@@ -1,6 +1,6 @@
const utils = require('../../../utils');
const commonElements = require('../../../page-objects/default/common/common.wdio.page');
const reports = require('../../../page-objects/default/reports/reports.wdio.page');
const reportsPage = require('../../../page-objects/default/reports/reports.wdio.page');
const loginPage = require('../../../page-objects/default/login/login.wdio.page');
Copy link
Member

Choose a reason for hiding this comment

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

Since the functionality differs between mobile and desktop view and we have a mobile e2e suite, please add an e2e test that checks bulk deletion for mobile as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, I forgot about the mobile e2e, I'm doing this one in a separate commit for easy review

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I looked at this and had a call with QA. The mobile e2e suite is running with protractor, which QA's current target is to migrate everything and remove protractor, because of that we won't be creating more protractor tests.

They have in their very near future plans to work on the mobile e2e suite, which there are some ideas on how to do it, apparently something that Bede started as proof of concept, they will retake and explore based on some ideas from Gareth, like resizing the browser's screen to simulate mobile.

They plan to automate what's in the automation board.

So, we agree that I will help them setting the base for the wdio mobile suite, specifically default config, and have them involve while I do it and automate this case scenario of bulk delete. I've created a new ticket since I don't want to make this PR bigger than it is, this is what I'll be working tomorrow and Friday... and when I come back from my time off.

CC: @tatilepizs

@latin-panda
Copy link
Contributor Author

@dianabarsan I've resolved the feedback, can you please have a look again? Thank you for your time :)

@dianabarsan
Copy link
Member

dianabarsan commented Nov 2, 2022

I'm having a look at this on desktop and noticing that, when I have any reports selected, and I click on a report content, nothing happens. From a UX perspective, is this the desired result? I find it's pretty confusing for the click to do nothing.

Kazam_screencast_00003.mp4

Maybe it is possible that, when in select mode, clicking on the whole report could set the report as selected?
I'm noticing that in mobile view, clicking on the report body, even if I have other reports selected, does redirect me to report detail page.

@dianabarsan
Copy link
Member

dianabarsan commented Nov 2, 2022

I have a pretty large database and I'm trying to select and deselect all reports and I'm not really understanding this interaction. If I select all, how can I deselect all afterwards?

Kazam_screencast_00005.mp4

Copy link
Member

@dianabarsan dianabarsan left a comment

Choose a reason for hiding this comment

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

I'm also noticing that reports list infinite scroll is no longer working. Even if I have a long list of reports, scrolling down no longer loads extra reports.

@dianabarsan
Copy link
Member

If I'm throttling my network and selecting reports, I see "unknown sender" displayed instead of the summary that already exists in the RHS. Is this expected?

Kazam_screencast_00006.mp4

@latin-panda
Copy link
Contributor Author

I'm having a look at this on desktop and noticing that, when I have any reports selected, and I click on a report content, nothing happens. From a UX perspective, is this the desired result? I find it's pretty confusing for the click to do nothing.

Yes that's the expected behaviour in desktop, if the user wants to see the reports details then they should click on it to expand.

Maybe it is possible that, when in select mode, clicking on the whole report could set the report as selected?

I will try and report back.

If I'm throttling my network and selecting reports, I see "unknown sender" displayed instead of the summary that already exists in the RHS. Is this expected?

The other I reported an issue for that.

I'm also noticing that reports list infinite scroll is no longer working. Even if I have a long list of reports, scrolling down no longer loads extra reports.

Oh it's because the element that scrolls is another one, so ScrollLoaderProvider won't fire... I thing that scroll thing should be a directive so it's easier to discover... anyways, I won't refactor it too much in this PR, will just make it work for now.

I have a pretty large database and I'm trying to select and deselect all reports and I'm not really understanding this interaction. If I select all, how can I deselect all afterwards?

I guess the reportList in store doesn't have the full quantity, I'll think an alternative.

@latin-panda
Copy link
Contributor Author

latin-panda commented Nov 2, 2022

@dianabarsan Thanks a lot for your feedback!! You can find the commits below:

  • infinit scroll: commit
  • Selecting report when clicking in the row while in select mode: commit
  • Select all when too many reports: commit

I had a call with @n-orlowski and we reviewed the select all behaviour:

  • When the select all checkbox has a minus, and the user clicks on it
    • it should select all (up to 500 reports).
  • When that checkbox is blue and checked, and the user clicks on it
    • it should deselect all.
  • If the user has too many reports (+500) then select all
    • it will only select up to 500 same as in master,
    • and the select all checkbox is blue and checked, and the "clear selection" is available.
  • If the user scrolls more than +500 in the LHS, and "selects all" and then selects some more (for example 505 selected) then that's okay for now, same as master.

Tomorrow my morning I'm going to update the bulk delete ticket with this information and open a new ticket so we can evaluate the behaviour of "select all" when there's more than +500 reports (Edit: Ticket). cc: @tatilepizs

Video this branch vs demo instance (3.17)
https://user-images.githubusercontent.com/66472237/199562802-cc784932-813a-4dbc-9da5-2d9a108fd805.mov

@latin-panda
Copy link
Contributor Author

I've updated this work's ticket with relevant information discussed yesterday.
And I've created the ticket to Improve experience of "select all" when there are +500 reports

@latin-panda
Copy link
Contributor Author

@dianabarsan I think it's ready for another 👀 Thanks!

Copy link
Member

@dianabarsan dianabarsan left a comment

Choose a reason for hiding this comment

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

Awesome. Thanks a lot for addressing all the feedback! I just have one tiny question left inline.

webapp/src/ts/modules/reports/reports.component.ts Outdated Show resolved Hide resolved
@latin-panda latin-panda merged commit 6042a8e into master Dec 2, 2022
@latin-panda latin-panda deleted the 7778-bulk-delete-redesign branch December 2, 2022 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants