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

Add a progress bar to "Edit" bulk actions [5] #11597

Closed
10 tasks done
MateStrysewske opened this issue Mar 7, 2023 · 1 comment · Fixed by #11911
Closed
10 tasks done

Add a progress bar to "Edit" bulk actions [5] #11597

MateStrysewske opened this issue Mar 7, 2023 · 1 comment · Fixed by #11911
Assignees
Labels
backend Affects the web backend feature A new feature to be developed (ticket type) general Not directly concerned with any particular functional section of the application qa-verified Issue has been tested and verified by QA ready Issue fulfills the definition of ready and can be implemented vaadin-app Affects the Vaadin application

Comments

@MateStrysewske
Copy link
Contributor

MateStrysewske commented Mar 7, 2023

Feature Description

#11442 has introduced batches for bulk editing in order to avoid running into timeouts. Right now, the user gets a popup every 200 processed entities or 3 minutes that asks them whether they want to continue the bulk operation. This is suboptimal UX because it requires them to interact with the app frequently, and while it tells the user how many entities are left to process when the popup appears, there's no further feedback about the process in between those popups.

Proposed Change

Introduce a progress bar popup to bulk editing, similar to the progress bar we have for imports, that shows the user how many entities out of the amount of entities selected have been edited so far and allows them to cancel the procedure.

Acceptance Criteria

  • In all directories that support the "Edit" bulk action, when using it with AT LEAST 40 entries selected, a progress screen is shown (see mockup 1 below) that includes the number of selected entries, processed entries so far, a progress bar that updates according to the ratio, and a button that allows the user to cancel the bulk action
  • When at least 40 entries are selected and the progress screen is shown, the respective backend save method is called in batches of 20 entries instead of passing it all selected entries at once
  • When a batch has been successfully processed, the progress bar and process entry count on the progress screen are updated accordingly and the save method is called with the next batch
  • Once all entries have been processed, the progress indicator icon is replaced with a checkmark, the text is updated and the "Cancel" button is replaced with a "Close" button (see mockup 2 below); clicking on "Close" closes the window; no success notification is needed afterwards, but the directory has to be reloaded
  • Clicking on the "Cancel" button at any time results in a popup being shown (see mockup 3 below) that allows the user to confirm the cancellation; this only happens after the current batch of entries have been saved (and the progress screen updated accordingly), so there might be a delay until the popup window is shown to the user
  • Aborting the cancellation closes the popup window and continues the bulk processing (i.e. the save method is called with the next batch)
  • Confirming the cancellation closes the popup window and the progress screen, reloads the directory and displays a warning notification: "The bulk action has been cancelled. out of have been processed. All unprocessed entries are still selected."
  • When the bulk action is cancelled, all entries that have not yet been processed still need to be selected (this is already implemented, i.e. verify that it's still working after the other changes in this issue have been done)
  • When using the "Edit" bulk action with LESS THAN 40 entries selected, the progress screen is not shown and instead all selected entries are passed to the backend for processing; a success notification is shown after the bulk action has been completed as usual
  • Any now unused functionality introduced in Limit bulk action load for "Edit" bulk actions [5] #10461 has been removed from the code (e.g. the popup that asks the user whether they want to continue the bulk processing, the entryand time limit, etc.); make sure to also remove no longer used strings from strings.properties

Mockups

Bulk processing in progress

bulk_in_progress

Bulk processing completed

bulk_completed

Cancel confirmation

bulk_cancel

Implementation Details

  • Use the import progress layout as the basis for implementation; ideally, add a general ProgressLayout superclass that is reused by the import progress layouts and the new bulk progress layout
  • The thresholds specified above should be stored in constants so that we can easily change them, i.e. BULK_ACTION_BATCH_SIZE = 20 and BULK_ACTION_PROGRESS_THRESHOLD = 40; add comments to these fields and explain what they do

Additional Information

@MateStrysewske MateStrysewske added backend Affects the web backend vaadin-app Affects the Vaadin application feature A new feature to be developed (ticket type) general Not directly concerned with any particular functional section of the application labels Mar 7, 2023
@MateStrysewske MateStrysewske self-assigned this Apr 11, 2023
@MateStrysewske MateStrysewske added the ready Issue fulfills the definition of ready and can be implemented label Apr 13, 2023
@MateStrysewske MateStrysewske removed their assignment Apr 13, 2023
@MateStrysewske MateStrysewske changed the title Add a progress bar to bulk actions Add a progress bar to bulk actions [5] Apr 18, 2023
@MateStrysewske MateStrysewske self-assigned this Apr 21, 2023
@MateStrysewske MateStrysewske added this to Backlog in SORMAS Team 2 - DEV - Iteration Backlog via automation Apr 21, 2023
@MateStrysewske MateStrysewske moved this from Backlog to In Progress in SORMAS Team 2 - DEV - Iteration Backlog Apr 21, 2023
MateStrysewske added a commit that referenced this issue Apr 21, 2023
MateStrysewske added a commit that referenced this issue Apr 26, 2023
MateStrysewske added a commit that referenced this issue Apr 27, 2023
@MateStrysewske MateStrysewske moved this from In Progress to Review in SORMAS Team 2 - DEV - Iteration Backlog Apr 28, 2023
@MateStrysewske MateStrysewske changed the title Add a progress bar to bulk actions [5] Add a progress bar to "Edit" bulk actions [5] May 4, 2023
sergiupacurariu added a commit that referenced this issue May 5, 2023
…tion_progress_bar

#11597 - Added a bulk progress layout
@adinaflorea9 adinaflorea9 self-assigned this May 5, 2023
@adinaflorea9
Copy link

Verified ticket on the local machine using the latest version of SORMAS from the development branch - 1.84.0-SNAPSHOT(244b3eb).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Affects the web backend feature A new feature to be developed (ticket type) general Not directly concerned with any particular functional section of the application qa-verified Issue has been tested and verified by QA ready Issue fulfills the definition of ready and can be implemented vaadin-app Affects the Vaadin application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants