Skip to content

Allow more batch actions in the add-on store (remove, enable and disable)#15646

Merged
seanbudd merged 22 commits into
nvaccess:masterfrom
CyrilleB79:batchActions
Nov 27, 2023
Merged

Allow more batch actions in the add-on store (remove, enable and disable)#15646
seanbudd merged 22 commits into
nvaccess:masterfrom
CyrilleB79:batchActions

Conversation

@CyrilleB79

@CyrilleB79 CyrilleB79 commented Oct 17, 2023

Copy link
Copy Markdown
Contributor

Link to issue number:

Closes #15623

Summary of the issue:

In the store, install action can be executed on multiple add-ons. Other batch actions are needed.

Description of user facing changes

The following additional batch actions are now available in the store:

  • Remove selected add-ons
  • Update selected add-ons
  • Enable selected add-ons
  • Disable selected add-ons

Description of development approach

  • Use the same condition as the one required for the corresponding single action to occur.
  • For code simplicity there is no distinction between Enable and Enable (override) for the corresponding multiple action. Anyway, when an add-on should override compatibility to be enabled, there is a confirmation dialog box.
  • Also for simplicity, there is no multiple replace action:
    • if a multiple selection contains installable add-on with or without updatable or replaceable add-ons, the "Install selected add-ons" batch action will be available
    • If a multiple selection contains updatable add-ons, replaceable add-ons or both types, the "Update selected add-ons" batch action will be available.
  • For batch actions requiring a confirmation (e.g. override incompatibility, uninstall), the confirmation dialog box has a "Remember this choice" checkbox so that the user can answer yes or no for all the same questions.
  • When many add-ons are selected and a batch action is applied to them, the action actually applies only to the add-ons for which it is appropriate. E.g batch enable will not be applied to already enabled add-ons.

Testing strategy:

Manual testing of each of the multiple actions. Also re-tested the corresponding single selection actions.

Known issues with pull request:

Change log:
I have modified the change log item since batch install was available but I have implemented all the other actions. I have also added my GitHub's name. Unfortunately, it gives the impression that I have made all the job, whereas @seanbudd / NV Access has provided the initial work in #15350. Is it worth thinking to a way to show that an item has been contributed both by NV Access and an external contributor? Or by two external contributors? This would need to be clarified.

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@amirmahdifard

Copy link
Copy Markdown

@CyrilleB79 hi, thanks for this: please also make this for updating addons too: emajin there 8 addons in the updatable addons tab, wich needs update: we have to update them one by one, but if you make this action available to updatable addons as whel, we can select all addons we want to update, and then do update to update them at final. thanks.

@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 33addd5950

@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit b29435b52e

@CyrilleB79 CyrilleB79 marked this pull request as ready for review November 13, 2023 13:50
@CyrilleB79 CyrilleB79 requested review from a team as code owners November 13, 2023 13:50

@seanbudd seanbudd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Changes generally look good to me

Comment thread source/gui/_addonStoreGui/controls/actions.py Outdated
Comment thread source/gui/_addonStoreGui/controls/messageDialogs.py Outdated
Comment thread source/gui/_addonStoreGui/controls/messageDialogs.py Outdated
Comment thread source/gui/_addonStoreGui/viewModels/addonList.py Outdated
Comment thread source/gui/_addonStoreGui/viewModels/store.py Outdated
Comment thread source/gui/_addonStoreGui/viewModels/store.py Outdated
Comment thread source/gui/_addonStoreGui/viewModels/store.py Outdated
Comment thread source/gui/_addonStoreGui/viewModels/store.py Outdated
Comment thread source/gui/_addonStoreGui/viewModels/store.py Outdated
Comment thread user_docs/en/changes.t2t Outdated
@CyrilleB79

Copy link
Copy Markdown
Contributor Author

@seanbudd, I have applied review comments. Moreover, I have use more canUseXxxAction when possible and rephrased the log messages.

I am still concerned with one point:
In your previous work, batch install was operating either on available add-ons and on updatable add-ons. In the initial description of this PR, I indicate that I handle batch install, update and replace separately for simplicity but that's not true for install since I have kept your original condition (available or updatable).
After thinking again to this, maybe the best solution would be to commonalize these three task and just provide:

  • "Install selected add-ons" in "Available add-ons tab to operate on available, updatable and migratable add-ons, i.e. canUseInstallAction or canUseUpdateAction or canUseReplaceAction
  • "Update selected add-ons" in other tabs

The limitation of this solution are:

  1. You can have "Install selected add-ons" on a selection that contains only updatable or migratable add-ons. I think that it is understandable anyway.
  2. You can have "Update selected add-ons" on a selection containing only migratable add-ons. I think that's not a problem since there is the dialog box recording that the versions cannot be compared.

Do you agree with this approach? If no, what do you suggest instead?

@seanbudd seanbudd added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Nov 21, 2023
@seanbudd

Copy link
Copy Markdown
Member

The approach you describe sounds good, I don't think multiple actions are required for install vs. update vs. replace

@seanbudd seanbudd marked this pull request as draft November 21, 2023 23:37
@CyrilleB79

Copy link
Copy Markdown
Contributor Author

@seanbudd, at the end, I have implemented a mid-way solution regarding the install/update/migrate batch actions. It allows to have update batch action when only updatable or migratable (replaceable) add-ons are selected, but no installable one. I have updated the initial description accordingly; see it for more details.

@CyrilleB79 CyrilleB79 marked this pull request as ready for review November 24, 2023 09:36
Comment thread source/gui/addonStoreGui/viewModels/store.py Outdated
Comment thread source/gui/addonStoreGui/viewModels/store.py Outdated

@seanbudd seanbudd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @CyrilleB79

@Qchristensen Qchristensen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reads well, good work.

@seanbudd seanbudd merged commit 7a328bd into nvaccess:master Nov 27, 2023
@nvaccessAuto nvaccessAuto added this to the 2024.1 milestone Nov 27, 2023
@CyrilleB79 CyrilleB79 deleted the batchActions branch November 27, 2023 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow enable/disable action on a selection of two add-ons or more

7 participants