nvda icon indicating copy to clipboard operation
nvda copied to clipboard

Add ability to view new add-ons

Open nvdaes opened this issue 1 year ago • 12 comments

  • Add support to show new add-ons in the store
  • Add schedule job to show new add-ons at startup
  • Check for new add-ons before running scheduled job to show them
  • Fix lint

Link to issue number:

Closes #16681

Summary of the issue:

List of available add-ons is very long, and some users may wish to show a list of recent add-ons with their description and other details to decide if they wish to install them.

Description of user facing changes

  • A new available add-ons has been added to the store.
  • A new combobox to enable or disable notification of new add-ons at startup has been added to the configuration add-on store panel.

Description of development approach

  • Cached compatible add-ons are saved in a backup file on NVDA exit.
  • New add-ons can be retrieved comparing the current compatible available add-ons with previous add-ons. Specifically, if an add-on with a non existing id or a new version of an existing add-on is available, it will be listed on the new add-ons tab, unles it's already installed.

Testing strategy:

Tested manually:

  • Removed the _cachedCompatibleAddons-old.json file, saved when NVDA is started, and check that more than 150 add-ons are shown in the new add-ons tab.
  • Removed an entry corresponding to an old add-on in the json file, and check that it's presented in the new add-ons tab.
  • Change the version number of an old add-on, and check that the add-on with the current available version is listed on the new add-ons tab.
  • Check that the job to show new add-ons is scheduled and can be triggered manually.
  • Check that, if an add-on is installed, it's not presented in the new add-ons tab.

Known issues with pull request:

When the store dialog is directly opened to the new available add-ons tab, NVDA reports a list item, for example, clipContentsDesigner, as if it was part of the title. Note that this may not be a specific issue related to this PR.

Code Review Checklist:

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

Summary by CodeRabbit

  • New Features

    • Added functionality to notify users about new add-ons available since the last NVDA startup.
    • Introduced a "Show New Add-ons" setting to enable or disable notifications for new add-ons.
    • Added a new tab "Available new add-ons" in the Add-on Store.
  • Enhancements

    • Improved Add-on Store Settings dialog with a new combo box for configuring notifications of new add-ons.
  • Documentation

    • Updated user guide with new add-on notification feature and instructions.
    • Added manual test steps for checking new add-ons in the Add-on Store.

nvdaes avatar Jun 21 '24 12:06 nvdaes

Walkthrough

The changes introduce functionality to filter, notify, and manage new add-ons in an NVDA add-on store. Users can now select reset intervals for new add-ons (monthly, weekly, at startup) and manage visibility of new add-ons through various filters. The application was enhanced with methods and entities related to caching, filtering, and displaying new add-ons.

Changes

Files & Paths Change Summary
source/.../dataManager.py Added methods and attributes for caching and filtering compatible old add-ons
source/.../models/status.py Introduced a new NEW add-on status with display logic and a function to fetch the reset date for new add-ons
source/config/configFlags.py Added an enum ResetNewAddons class with display labels for different interval resets
source/config/configSpec.py Introduced options showNewAddons and resetNewAddons to manage new add-ons settings
source/gui/.../storeDialog.py Incorporated a filter control for new add-ons and managed filtering logic based on new add-on status
source/gui/.../viewModels/store.py Enhanced AddonListVM with filtering logic to differentiate between all add-ons and new add-ons
tests/manual/addonStore.md Added manual testing steps to check and reset new add-ons, including instructions for handling JSON files and adjusting store settings
user_docs/en/changes.md Documented the new features for filtering add-ons by release date and setting reset intervals for new add-ons
user_docs/en/userGuide.md Added details about the "Reset New Add-ons" option with different time period behaviors and the ability to filter add-ons by release date

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UI
    participant DataManager
    participant Config

    User->>UI: Opens Add-on Store
    UI->>UI: Display add-ons
    UI->>Config: Fetch reset interval for new add-ons
    Config-->>UI: Return reset interval (e.g., monthly)
    UI->>DataManager: Request new add-ons based on interval
    DataManager-->>UI: Return list of new add-ons
    UI->>UI: Update display with new add-ons filter

    User->>UI: Select new add-ons filter
    UI->>DataManager: Filter new add-ons
    DataManager-->>UI: Return filtered add-ons
    UI->>UI: Update display with filtered new add-ons

Assessment against linked issues

Objective (Issue #16681) Addressed Explanation
Notify users about new add-ons
Add a tab or section for new add-ons in the store
Provide methods to set reset intervals
Display new add-ons upon startup or at set intervals

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>.
    • 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 show all the console.log statements in this repository.
    • @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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

coderabbitai[bot] avatar Jun 21 '24 12:06 coderabbitai[bot]

  • PASS: Translation comments check.
  • PASS: Unit tests.
  • FAIL: Lint check. See test results for more information.
  • PASS: System tests (tags: installer NVDA).
  • Build (for testing PR): https://ci.appveyor.com/api/buildjobs/ipj63ebk0q6e1ibj/artifacts/output/nvda_snapshot_pr16728-32549,f54b3667.exe
  • CI timing (mins): INIT 0.0, INSTALL_START 1.1, INSTALL_END 0.9, BUILD_START 0.0, BUILD_END 10.8, TESTSETUP_START 0.0, TESTSETUP_END 0.4, TEST_START 0.0, TEST_END 18.2, FINISH_END 0.2

See test results for failed build of commit f54b3667a1

AppVeyorBot avatar Jun 23 '24 04:06 AppVeyorBot

@coderabbitai review

seanbudd avatar Jun 24 '24 04:06 seanbudd

as requested in #16681, can you seek UX feedback before marking this as ready?

seanbudd avatar Jun 25 '24 04:06 seanbudd

Sean wrote:

as requested in #16681, can you seek UX feedback before marking this as ready?

I'm seeking for feedback:

A few people of the spanish mailing list (two persons) would like to see this feature, and my friend said me that it's a good suggestion, but I didn't get more precise feedback. I'd try to share an artifact so people can test this in a portable copy of NVDA.

nvdaes avatar Jun 25 '24 04:06 nvdaes

Thanks, we really need validation that this is the right approach and useful to users

seanbudd avatar Jun 25 '24 05:06 seanbudd

A different approach to this PR, but rather than have a new tab in the add-on dialog, would it be a better experience for users to have a "Last updated" date in the table list of add-ons, and have the ability to sort by various table columns. I would argue the date an add-on was last updated is more meaningful than the "add-on version" we currently list, which is only really relevant to THAT add-on, as every add-on uses its own version format.

If really wanted, you could then flag add-ons added since the add-on store was last opened as "new" (or have a flag the user could reset on demand).

Qchristensen avatar Jun 25 '24 05:06 Qchristensen

Quentin wrote:

A different approach to this PR, but rather than have a new tab in the add-on dialog, would it be a better experience for users to have a "Last updated" date in the table list of add-ons...

But a some add-ons may be very old in terms of the last update date but they may work perfectly, and instead, newer add-ons may need to be more maintained due to user requests or due of components used. Anyway this is a separate issue and needs to be triaged. See #15278

the ability to sort by various table columns. I would argue the date an add-on was last updated is

This is a separate issue

See #15277

nvdaes avatar Jun 25 '24 06:06 nvdaes

Quentin wrote:

But a some add-ons may be very old in terms of the last update date but they may work perfectly, and instead, newer add-ons may need to be more maintained due to user requests or due of components used. Anyway this is a separate issue and needs to be triaged. See #15278

True, but in the case of an add-on whose last version is three years old but still works great.... the proposed new add-ons info won't be of help either :)

the ability to sort by various table columns. I would argue the date an add-on was last updated is

This is a separate issue See #15277

My suggestion was that sorting the existing available add-ons list by latest update meets the same goal (of seeing which add-ons are new) as the proposed "new available add-ons" tab

Qchristensen avatar Jun 25 '24 07:06 Qchristensen

True, but in the case of an add-on whose last version is three years old but still works great.... the proposed new add-ons info won't be of help either :)

The goal of this PR is to see just recent add-ons to decide if they should be installed, seeing the description and details. The last date proposal will be useful as well, similar to this PR, but imo it would require to work in three repos: addon-datastore, addon-datastore-validation and NVDA with GitHub Actions, and may take a lot of time and work, and furthermore it's not triaged.

nvdaes avatar Jun 25 '24 07:06 nvdaes

Here's message 5002 of a spanish mailing list, where someone has tested the add-on. I provided a json file to simulate the presence of new add-ons. This tester says that he likes the idea and its application. He finds practical to view info about new add-ons separately. I commented that the idea of having info about dates seems good to me, though perhaps I prefer my approach since having too many info in the table (in columns) is more difficult (slow) to read. About the date, since it wasn't triaged, I think that the only option was to work on this approach.

nvdaes avatar Jun 27 '24 04:06 nvdaes

  • PASS: Translation comments check.
  • PASS: Unit tests.
  • PASS: Lint check.
  • FAIL: System tests (tags: installer NVDA). See test results for more information.
  • Build (for testing PR): https://ci.appveyor.com/api/buildjobs/slk6pk67idrxqg5l/artifacts/output/nvda_snapshot_pr16728-32664,b9710489.exe
  • CI timing (mins): INIT 0.0, INSTALL_START 1.1, INSTALL_END 1.1, BUILD_START 0.0, BUILD_END 11.6, TESTSETUP_START 0.0, TESTSETUP_END 0.4, TEST_START 0.0, TEST_END 18.5, FINISH_END 0.2

See test results for failed build of commit b971048981

AppVeyorBot avatar Jun 30 '24 11:06 AppVeyorBot

As requested by @Christianlm, another tester of this feature, I've created a combobox in the add-on store settings panel to reset new add-ons at startup, weekly or monthly. Also, the Notify when new add-ons are available is disabled by default, since, if new add-ons are reset monthly (as set by default now), having the notification option enabled may result in seeing the same add-ons at startup. System tests have failures. I'll test this more. Also, I'm thinking in trying to add the starting and end dates used to consider add-ons as new, for example, from 1 July 2024 to 31 July 2024, where add-ons would be reset. See Chris message requesting options to reset add-ons monthly or weekly.

nvdaes avatar Jul 01 '24 07:07 nvdaes

  • FAIL: Translation comments check. Translation comments missing or unexpectedly included. See build log for more information.
  • PASS: License check.
  • PASS: Unit tests.
  • PASS: Lint check.
  • PASS: System tests (tags: installer NVDA).
  • Build (for testing PR): https://ci.appveyor.com/api/buildjobs/y7huv72lcv66xe4d/artifacts/output/nvda_snapshot_pr16728-32689,11866d4c.exe
  • CI timing (mins): INIT 0.0, INSTALL_START 1.2, INSTALL_END 1.1, BUILD_START 0.0, BUILD_END 13.7, TESTSETUP_START 0.0, TESTSETUP_END 0.4, TEST_START 0.0, TEST_END 18.7, FINISH_END 0.2

See test results for failed build of commit 11866d4cfd

AppVeyorBot avatar Jul 01 '24 10:07 AppVeyorBot

@coderabbitai review

nvdaes avatar Jul 01 '24 11:07 nvdaes

@coderabbitai, I'll ignore your suggestions to keep my code aligned with NVDA's core code.

nvdaes avatar Jul 01 '24 11:07 nvdaes

[!TIP] For best results, initiate chat on the files or code changes.

@nvdaes, I understand your decision to keep the code aligned with NVDA's core code. If you need any further assistance or have any other questions, feel free to ask.

coderabbitai[bot] avatar Jul 01 '24 11:07 coderabbitai[bot]

I am actually not really in favor of a new tab. I vote rather for a sorting combo box in the available add-ons tab. sort by combo box:

  • Option 1: by name
  • Option 2: By date of last update
  • Option 3: by date of Submission approval

The current UX of this PR is too complex in my view. If users can sort the list of available add-ons as suggested above, there is no notification needed.

Adriani90 avatar Jul 01 '24 14:07 Adriani90

@Adriani90 , I think that sorting by submission approval of an add-on id is not related to this feature. Sorting by date was not triaged. See a previous comment where this was explained.

nvdaes avatar Jul 01 '24 16:07 nvdaes

But submission approval means new add-on. Or am I wrong?Von meinem iPhone gesendetAm 01.07.2024 um 18:13 schrieb Noelia Ruiz Martínez @.***>: @Adriani90 , I think that sorting by submission approval of an add-on id is not related to this feature. Sorting by date was not triaged. See a previous comment where this was explained.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Adriani90 avatar Jul 01 '24 16:07 Adriani90

Adriani wrote:

But submission approval means new add-on. Or am I wrong

No, you aren't wrong. I undestand that you mean submission approbal for each add-on id, that is, the date for the first version of every add-on. If you mean new add-ons and every new version, I think this maybe done adding a timestamp to the metadata for each add-on submission, but this is not triaged, and the issue related to this PR was triaged. I think that tabs aren't difficult to see, and they can be ignored. The idea of adding a combobox is also good, but I think that this PR, if adding dates requires a lot of work, for example, working in three repos, imo this PR may be useful too.

nvdaes avatar Jul 01 '24 17:07 nvdaes

This has mixed feedback, but since add-ons date is not shown in the store, and I don't know if dates should be presented in the add-ons list or in the details panal (I probably would prefer this last option), I mark this as ready for review.

nvdaes avatar Jul 02 '24 04:07 nvdaes

I have not yet been able to review or test this design. But reading the description and the comments of this PR, I do not feel it's worth to complexify the GUI for such information. That's a provisional feedback though and I may change my mind after a more careful review and test of this PR if/when I can. If you do not wish to wait anymore and since I am not sure to have time to provide more information, feel free to ignore my feedback.

CyrilleB79 avatar Jul 02 '24 07:07 CyrilleB79

Cyrille wrote:

If you do not wish to wait anymore and since I am not sure to have time to provide more information, feel free to ignore my feedback.

I think we can wait, this is not something that requires to act urgently. I think that having info about add-ons added in a certain period of time (recent add-ons) can be useful, since older add-ons may have been seen and this may be useful to help to decide if an add-on is installed. We had the website with feeds, though new versions weren't shown as new pages. We have a bot followed by some users, and I think that having this inside NVDA would be interesting. About complexing the gui, I think that if we want this feature this is needed. Imo a new tab is the less complex option since tabs can be ignored. But other designs are possible, of course. Thanks for your feedback.

nvdaes avatar Jul 02 '24 07:07 nvdaes

Thanks for your work on this, @nvdaes.

Personally though, I would prefer to see something closer to what @Adriani90 suggested.

Or maybe a combobox for sorting, and another for filtering, while in Available add-ons tab.

Sorting: name (A-Z), name (Z-A), updated date, added date.

Filter: new in last week, new in last month, new this year, updated in last week, updated in last month, updated this year, all.

Where last week and last month, are today's date minus seven days or 31 days, not necessarily this calendar week/month which might have just started a minute ago.

Regardless of this idea or another, I think we should think carefully about making the interface more complex. Users already find it to be complicated as it is.

XLTechie avatar Jul 04 '24 11:07 XLTechie

Thanks for your feedback, @XLTechie. Since here you all prefer a combo box, I'll try to replace the tab with a combo box, filtering new add-ons but using the same procedure of caching add-ons in a json file, since, as you know, add-on metadata doesn't include a timestamp and an issue related to dates, as explained before, is not triaged, so the only possibility is to work without having dates. I'll work in the combobox the next days and we can always roll back to the tab design.

nvdaes avatar Jul 04 '24 11:07 nvdaes

  • FAIL: Translation comments check. Translation comments missing or unexpectedly included. See build log for more information.
  • PASS: License check.
  • PASS: Unit tests.
  • PASS: Lint check.
  • PASS: System tests (tags: installer NVDA).
  • Build (for testing PR): https://ci.appveyor.com/api/buildjobs/qx03y55yxtkxbrb7/artifacts/output/nvda_snapshot_pr16728-32780,580f22c4.exe
  • CI timing (mins): INIT 0.0, INSTALL_START 1.2, INSTALL_END 1.0, BUILD_START 0.0, BUILD_END 12.2, TESTSETUP_START 0.0, TESTSETUP_END 0.4, TEST_START 0.0, TEST_END 18.3, FINISH_END 0.2

See test results for failed build of commit 580f22c4d2

AppVeyorBot avatar Jul 04 '24 16:07 AppVeyorBot

  • FAIL: Translation comments check. Translation comments missing or unexpectedly included. See build log for more information.
  • PASS: License check.
  • PASS: Unit tests.
  • PASS: Lint check.
  • PASS: System tests (tags: installer NVDA).
  • Build (for testing PR): https://ci.appveyor.com/api/buildjobs/j8cqb9yvj632n279/artifacts/output/nvda_snapshot_pr16728-32781,8ce03f47.exe
  • CI timing (mins): INIT 0.0, INSTALL_START 1.1, INSTALL_END 1.0, BUILD_START 0.0, BUILD_END 12.3, TESTSETUP_START 0.0, TESTSETUP_END 0.3, TEST_START 0.0, TEST_END 18.5, FINISH_END 0.2

See test results for failed build of commit 8ce03f4768

AppVeyorBot avatar Jul 04 '24 17:07 AppVeyorBot

Hi @XLTechie , I think I've addressed all your comments. I'll fix the schedule job to show new add-ons at startup this weekend.

nvdaes avatar Jul 05 '24 05:07 nvdaes

@XLTechie (%x) is not showing dates in the local format. I think we should try to use winKernel. I'll test it this weekend.

nvdaes avatar Jul 05 '24 05:07 nvdaes