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 ability to sort add-ons by columns #17135

Merged
merged 51 commits into from
Sep 17, 2024
Merged

Add ability to sort add-ons by columns #17135

merged 51 commits into from
Sep 17, 2024

Conversation

nvdaes
Copy link
Collaborator

@nvdaes nvdaes commented Sep 8, 2024

  • Add ability to sort by column the add-ons list in the store
  • Change accelerator for short by column
  • Add info to the user guide
  • Update changelog

Link to issue number:

Fixes #15277

Summary of the issue:

Currently, add-ons in the store can't be sortered by column, which is desirable to search for add-ons in a confortable way.

Description of user facing changes

  • A combo box with available columns has been added to the store dialog, to sort by columns in ascending or descending order.

Description of development approach

  • A combo box has been added before the combo box channel.
  • _columnSortChoices property, and an optional reverse boolean parameter to setSortField function (to set a self._reverseSort_variable) have been added to the AddonListVMclass to build the combo box with ascending and descending options.

Testing strategy:

  • Sorting add-ons by different columns in different tabs.
  • Using other filter controls checking that the add-on status is reflected.

Known issues with pull request:

None

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.

Summary by CodeRabbit

  • New Features

    • Introduced a sorting functionality in the Add-on Store, allowing users to filter add-ons by various columns.
    • Added a keyboard shortcut (alt+m) to access sorting options easily.
  • Documentation

    • Updated user guide with a new section detailing the sorting capabilities of the add-ons list.
    • Enhanced documentation for the Add-on Store to reflect the new sorting feature.

@nvdaes nvdaes marked this pull request as ready for review September 8, 2024 15:23
@nvdaes nvdaes requested review from a team as code owners September 8, 2024 15:23
@nvdaes
Copy link
Collaborator Author

nvdaes commented Sep 8, 2024

@coderabbitai review

Copy link
Contributor

coderabbitai bot commented Sep 8, 2024

Walkthrough

The changes introduce a new sorting functionality in the Add-on Store, allowing users to sort the list of add-ons by various columns such as name, publisher, and status. This feature is implemented through the addition of a control in the storeDialog.py file, which updates dynamically based on user selections. Corresponding documentation updates are made to inform users about the new functionality and its usage.

Changes

Files Change Summary
source/gui/addonStoreGui/controls/storeDialog.py, tests/manual/addonStore.md, user_docs/en/changes.md, user_docs/en/userGuide.md Added sorting functionality for the add-ons list, including event handling and documentation updates.

Assessment against linked issues

Objective Addressed Explanation
Ability to sort add-on store by columns (name, publisher, status, etc) (#15277)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    -- I pushed a fix in commit <commit_id>, please review it.
    -- Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    -- @coderabbitai generate unit testing code for this file.
    -- @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    -- @coderabbitai generate interesting stats about this repository and render them as a table.
    -- @coderabbitai read src/utils.ts and generate unit testing code.
    -- @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    -- @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Outside diff range, codebase verification and nitpick comments (1)
user_docs/en/changes.md (1)

Line range hint 1-1: Reminder: Add tests.

The TODO comment indicates that tests are missing.

Do you want me to generate the unit testing code or open a GitHub issue to track this task?

source/gui/addonStoreGui/controls/storeDialog.py Outdated Show resolved Hide resolved
user_docs/en/userGuide.md Outdated Show resolved Hide resolved
@CyrilleB79
Copy link
Collaborator

@nvdaes, thanks for tackling this issue. Will be very useful when the date column will be a realty.

As expressed in other occasions, I (and other people) find that there are already enough combo-boxes on top in the Add-on Store's GUI. Moreover, I'd say that adding a combo-box here to sort add-ons whereas the other controls around are for filtering makes the Add-on Store's GUI less clear.

Alternatively, I'd add one more item "Sort by" in the list's context menu with a submenu containing all the names of the column headers. This is similar to Windows Explorer or Desktop context menu (when no item is selected), where you can find a "Sort by" menu item with subitems allowing to sort by name, size, file type, etc.

@nvdaes
Copy link
Collaborator Author

nvdaes commented Sep 8, 2024

@CyrilleB79 , thanks for your feedback.
For me, the important thing is that this feature is added, regardless of the control used to implement it.
Anyway, I think that a combo box has the following advantages:

  1. It's consistent with other controls used to set the presentation of the list. Other NVDA settings have a lot of combo boxes, checkboxes, etc.
  2. I think that context submenus may be more difficult to manage: this combo box has a keystroke and can be reached easily; it's placed after tabs and before any other combo box intentionally, so that we don't focus it unintentionally; we don't need to select or unselect add-ons to use it; if the date is added to the last column, we can just press the combo box shortcut and then the end key, i.e., the first and last option (name and date), probably the more used settings, are easily reachable, and I think that this won't be the case with a submenu.
  3. Ihave listened that add-on help is hidden in the store, since previously there was a button to open it. Also, the selected option in the combo box will be visible, whereas, when the context submenu is closed after sorting the list, it would be more difficult to see the column used to the new order. We may not wan't to add more info to the title, and a visual indicator may be shown, but the combo box may be useful to blind users to consult the current column for the order.
  4. Feedback is appreciated.

Copy link
Member

@seanbudd seanbudd left a comment

Choose a reason for hiding this comment

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

Thanks @nvdaes - this is a nice approach

source/gui/addonStoreGui/controls/storeDialog.py Outdated Show resolved Hide resolved
source/gui/addonStoreGui/controls/storeDialog.py Outdated Show resolved Hide resolved
source/gui/addonStoreGui/controls/storeDialog.py Outdated Show resolved Hide resolved
source/gui/addonStoreGui/controls/storeDialog.py Outdated Show resolved Hide resolved
tests/manual/addonStore.md Outdated Show resolved Hide resolved
user_docs/en/changes.md Outdated Show resolved Hide resolved
tests/manual/addonStore.md Outdated Show resolved Hide resolved
user_docs/en/userGuide.md Outdated Show resolved Hide resolved
user_docs/en/userGuide.md Outdated Show resolved Hide resolved
user_docs/en/userGuide.md Show resolved Hide resolved
@seanbudd seanbudd marked this pull request as draft September 9, 2024 00:45
@seanbudd
Copy link
Member

seanbudd commented Sep 9, 2024

I would also be supportive of adding this to the context menu as well, however my experience is that combo-boxes are a more common UX than context menus for sorting (both in Windows dialogs and the web). I think it makes more sense to keep sorting with the filters, rather than the add-on actions.

@AppVeyorBot
Copy link

See test results for failed build of commit 31746862f4

@nvdaes nvdaes marked this pull request as ready for review September 10, 2024 20:36
@nvdaes
Copy link
Collaborator Author

nvdaes commented Sep 10, 2024

Finally I've tested this successfully and should be ready for review.

user_docs/en/userGuide.md Outdated Show resolved Hide resolved
tests/manual/addonStore.md Outdated Show resolved Hide resolved
source/gui/addonStoreGui/controls/storeDialog.py Outdated Show resolved Hide resolved
source/gui/addonStoreGui/viewModels/addonList.py Outdated Show resolved Hide resolved
source/gui/addonStoreGui/viewModels/addonList.py Outdated Show resolved Hide resolved
source/gui/addonStoreGui/viewModels/addonList.py Outdated Show resolved Hide resolved
source/gui/addonStoreGui/viewModels/addonList.py Outdated Show resolved Hide resolved
source/gui/addonStoreGui/viewModels/addonList.py Outdated Show resolved Hide resolved
source/gui/addonStoreGui/viewModels/addonList.py Outdated Show resolved Hide resolved
source/gui/addonStoreGui/viewModels/addonList.py Outdated Show resolved Hide resolved
@seanbudd seanbudd marked this pull request as draft September 16, 2024 02:44
@AppVeyorBot
Copy link

See test results for failed build of commit 1040a2a4c3

@AppVeyorBot
Copy link

See test results for failed build of commit f6339ea667

@nvdaes nvdaes marked this pull request as ready for review September 16, 2024 20:10
Copy link
Member

@seanbudd seanbudd left a comment

Choose a reason for hiding this comment

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

Thanks @nvdaes

Copy link
Member

@Qchristensen Qchristensen left a comment

Choose a reason for hiding this comment

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

Reads well, good job

@seanbudd seanbudd merged commit 4cfe718 into nvaccess:master Sep 17, 2024
4 checks passed
@github-actions github-actions bot added this to the 2025.1 milestone Sep 17, 2024
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.

User request: Ability to sort add-on store by columns (name, publisher, status, etc)
7 participants