Skip to content

Adding command gesture categories for appmodules#15867

Merged
seanbudd merged 18 commits into
nvaccess:masterfrom
Nael-Sayegh:appmodules-category
Dec 11, 2023
Merged

Adding command gesture categories for appmodules#15867
seanbudd merged 18 commits into
nvaccess:masterfrom
Nael-Sayegh:appmodules-category

Conversation

@Nael-Sayegh

@Nael-Sayegh Nael-Sayegh commented Nov 30, 2023

Copy link
Copy Markdown
Contributor

Link to issue number:

closes #15815

Summary of the issue:

Store the Poedit, PowerPoint, miranda32, vipmud, and Eclipse appModules in separate categories within the command gesture category.

Description of user facing changes

When the user is in one of the applications (poedit, powerpoint, eclipse, vipmud, and miranda32), and if they wish to view the keyboard shortcuts offered by the appmodule, they can consult them in the command gesture category under the section named after the application rather than in various.

Description of development approach

I have added in each appmodule a variable that contains the name of the category, and for each keyboard shortcut, I have added the name of the category associated with that command.

Testing strategy:

I tested each application by opening the app and checking if the corresponding category appeared in NVDA's command gestures.

Known issues with pull request:

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.

@Nael-Sayegh Nael-Sayegh requested a review from a team as a code owner November 30, 2023 20:10
@Nael-Sayegh Nael-Sayegh requested a review from seanbudd November 30, 2023 20:10
@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 6cc0250e20

@CyrilleB79 CyrilleB79 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Welcome Nael and congratulation for your first PR.

Here is my review:

Comment thread source/appModules/eclipse.py Outdated
Comment thread source/appModules/miranda32.py Outdated
Comment thread source/appModules/poedit.py Outdated
Comment thread source/appModules/powerpnt.py Outdated
Comment thread source/appModules/vipmud.py Outdated
@Adriani90

Copy link
Copy Markdown
Collaborator

@Nael-Sayegh welcome to NVDA development and thank you so much for this great work.
I'd like to propose two more applications that should be considered:

  • MS Excel: shift+f2 > opens an accessible notes dialog replacing the native one for creating notes (equivalent to the old style comments)
  • MS Word: nvda+shift+h > I didn't find out what this command should do and it is not documented anywhere, it seems it works only in tables.

@Nael-Sayegh

Copy link
Copy Markdown
Contributor Author

Thank you for your encouragement and advice.
@CyrilleB79 I made the suggested changes, but I didn't quite understand the explanation concerning the naming of constants.
@Adriani90 I've looked at your request, but Excel doesn't add the indicated keyboard shortcut in the excel.py and the keyboard shortcut for Word doesn't have a description. I don't see the point of creating a category if it doesn't have any shortcuts in it.

What do you think of my modifications?

@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit b96c123820

@CyrilleB79 CyrilleB79 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

OK. My bad for the category name...

Also, there are still linting errors.

Comment thread source/appModules/eclipse.py Outdated
Comment thread source/appModules/eclipse.py Outdated
Comment thread source/appModules/eclipse.py Outdated
@CyrilleB79

Copy link
Copy Markdown
Contributor

@Nael-Sayegh welcome to NVDA development and thank you so much for this great work. I'd like to propose two more applications that should be considered:

  • MS Excel: shift+f2 > opens an accessible notes dialog replacing the native one for creating notes (equivalent to the old style comments)
  • MS Word: nvda+shift+h > I didn't find out what this command should do and it is not documented anywhere, it seems it works only in tables.

Makes sense for shift+F2: even if it uses the same shortcut as a native Excel command, it is a specific NVDA command, documented in the User Guide and that can be remapped. @Nael-Sayegh, the script is in source\NVDAObjects\window\excel.py.

For NVDA+shift+H in Word, I do not agree to add it a category, nor to do anything in this PR. First as written by @Nael-Sayegh because it has no description. Second, if your proposal is to add a description too, this is not enough, since the script causes an error when not in table and more things needs to be discussed on this script (see #11465). Today, my personal opinion is that this debug script should be removed completely and a new command should be implemented from scratch to report useful information in a table if needed (see #3462 and more specifically #3462 (comment)). But anyway this should first be discussed and then be implemented in another PR.

@Nael-Sayegh

Copy link
Copy Markdown
Contributor Author

@CyrilleB79 Thank you, I have made the necessary changes, this time it should be good.

@Nael-Sayegh

Copy link
Copy Markdown
Contributor Author

@CyrilleB79 Sorry, I didn't see your response about Excel. I'm going to take a look and try to add it to a category.

@Nael-Sayegh

Copy link
Copy Markdown
Contributor Author

I added the Excel category to the command gestures.
@CyrilleB79 I wouldn't have thought to look for the script in that directory.

@AppVeyorBot

Copy link
Copy Markdown
  • FAIL: Translation comments check. Translation comments missing or unexpectedly included. See build log for more information.
  • PASS: Unit tests.
  • FAIL: Lint check. See test results for more information.
  • FAIL: System tests (tags: installer NVDA). See test results for more information.
  • Build (for testing PR): https://ci.appveyor.com/api/buildjobs/l6qq3e8f3wy0b0ls/artifacts/output/nvda_snapshot_pr15867-30170,f5a90991.exe
  • CI timing (mins):
    INIT 0.0,
    INSTALL_START 1.0,
    INSTALL_END 1.1,
    BUILD_START 0.0,
    BUILD_END 28.7,
    TESTSETUP_START 0.0,
    TESTSETUP_END 0.3,
    TEST_START 0.0,
    TEST_END 17.1,
    FINISH_END 0.1

See test results for failed build of commit f5a9099100

Comment thread source/NVDAObjects/window/excel.py Outdated
Comment thread source/NVDAObjects/window/excel.py Outdated
@Nael-Sayegh

Copy link
Copy Markdown
Contributor Author

No, it's a mistake, my IDE added it automatically and I didn't notice. Thank you for pointing it out, I've made the corrections.

Comment thread source/NVDAObjects/window/excel.py
@CyrilleB79

Copy link
Copy Markdown
Contributor

Looking at the Excel scripts that have been modified for Excel, I realize that Word equivalent scripts (set row/column headers and read comment) should also be categorized.

Finally, it makes me think that categorizing Excel and Word script in "Excel" and "Word" categories is not a good idea. The Poedit scripts are specific to an application and it makes sense to have a category for this application. In the case of Word/Excel, the scripts are more general:

  • Word scripts are also available in Outlook, and maybe also in other applications, so categorizing scripts in a Word category when they operate in Outlook is not very clear.
  • NVDA+F7 is already categorized in browse mode category; it does not matter if it's the browser's NVDA+F1, the one of Word or the one of Excel. The same way, read comment at the cursor's position should not matter if we are in Word or Excel (even if in the code there are two implementations); thus I suggest to add "read comment" and "set row/column header" in the "System caret" category; Excel's shift+F2 (open note editing dialog) should also be grouped in "System caret" for consistency.
  • The scripts for Word or Excel are more general. We may imagine in the future that scripts such as set row/column headers be available in other context (Libre Office, web page,etc.) Same for read comment.

Do you agree with this suggestion?

@Nael-Sayegh

Nael-Sayegh commented Dec 2, 2023

Copy link
Copy Markdown
Contributor Author

@CyrilleB79 I agree with you on the comment, but then, what would be the shortcuts to put in the system caret?
Were you thinking of putting in shortcuts for Word and Excel?

@Nael-Sayegh Nael-Sayegh marked this pull request as draft December 2, 2023 09:56
@CyrilleB79

Copy link
Copy Markdown
Contributor

@CyrilleB79 I agree with you on the comment, but then, what would be the shortcuts to put in the system caret? Were you thinking of putting in shortcuts for Word and Excel?

I was thinking to use SCRCAT_SYSTEMCARET for scripts setRowHeader, setColumnHeader, reportComment, editComment in source\NVDAObjects\window\excel.py and setColumnHeader, setRowHeader, reportCurrentComment in source\NVDAObjects\IAccessible\winword.py.
Maybe there are also equivalent scripts in source\NVDAObjects\UIA; to be checked.

That's just a proposal and other people may disagree with me; to be discussed...

@Nael-Sayegh Nael-Sayegh requested a review from Nardol December 5, 2023 09:10
@Nael-Sayegh Nael-Sayegh marked this pull request as ready for review December 5, 2023 12:12

@Nardol Nardol left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me, even if @CyrilleB79 raised some points which would deserve to be discussed. Maybe on a separate PR?
And please read the other review made about script not to be remapable.

@Nael-Sayegh

Copy link
Copy Markdown
Contributor Author

Okay, I think the discussion should be in a separate PR or issue because it's no longer entirely on topic for this issue.

@seanbudd

seanbudd commented Dec 6, 2023

Copy link
Copy Markdown
Member

Please put "fixes" or "closes" before the issue number in your PR description, so that the issue is automatically linked

@AppVeyorBot

Copy link
Copy Markdown
  • FAIL: Translation comments check. Translation comments missing or unexpectedly included. See build log for more information.
  • 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/ken7cy0wr54om5cy/artifacts/output/nvda_snapshot_pr15867-30235,5c25c1bf.exe
  • CI timing (mins):
    INIT 0.0,
    INSTALL_START 1.0,
    INSTALL_END 1.0,
    BUILD_START 0.0,
    BUILD_END 30.0,
    TESTSETUP_START 0.0,
    TESTSETUP_END 0.4,
    TEST_START 0.0,
    TEST_END 17.2,
    FINISH_END 0.1

See test results for failed build of commit 5c25c1bf96

@AppVeyorBot

Copy link
Copy Markdown
  • FAIL: Translation comments check. Translation comments missing or unexpectedly included. See build log for more information.
  • 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/805ux57i0ff5d9dk/artifacts/output/nvda_snapshot_pr15867-30236,4f5ba7dd.exe
  • CI timing (mins):
    INIT 0.0,
    INSTALL_START 1.0,
    INSTALL_END 1.0,
    BUILD_START 0.0,
    BUILD_END 29.9,
    TESTSETUP_START 0.0,
    TESTSETUP_END 0.4,
    TEST_START 0.0,
    TEST_END 17.2,
    FINISH_END 0.1

See test results for failed build of commit 4f5ba7ddf7

@AppVeyorBot

Copy link
Copy Markdown
  • FAIL: Translation comments check. Translation comments missing or unexpectedly included. See build log for more information.
  • 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/pqf9gywoytfljw7a/artifacts/output/nvda_snapshot_pr15867-30237,c9d1bc94.exe
  • CI timing (mins):
    INIT 0.0,
    INSTALL_START 1.1,
    INSTALL_END 0.9,
    BUILD_START 0.0,
    BUILD_END 28.2,
    TESTSETUP_START 0.0,
    TESTSETUP_END 0.3,
    TEST_START 0.0,
    TEST_END 16.9,
    FINISH_END 0.1

See test results for failed build of commit c9d1bc94e9

@Nael-Sayegh Nael-Sayegh marked this pull request as ready for review December 7, 2023 21:34
@Nael-Sayegh

Copy link
Copy Markdown
Contributor Author

Hello,
@seanbudd I have made all the necessary modifications.
Normally, everything is good and ready.
What do you think?

Comment thread source/NVDAObjects/window/excel.py Outdated
Comment thread source/NVDAObjects/UIA/wordDocument.py Outdated
Comment thread source/NVDAObjects/window/excel.py
Comment thread source/NVDAObjects/IAccessible/winword.py
Comment thread source/NVDAObjects/IAccessible/winword.py Outdated
Comment thread source/NVDAObjects/IAccessible/winword.py Outdated
Comment thread source/NVDAObjects/IAccessible/winword.py Outdated
@seanbudd seanbudd marked this pull request as draft December 8, 2023 00:16
Nael-Sayegh and others added 2 commits December 8, 2023 08:00
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 5cad186961

@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 65640b96b6

@Nael-Sayegh

Copy link
Copy Markdown
Contributor Author

Hello,
@seanbudd I have made the requested changes and I have implemented the new translations.
Have I forgotten anything?
Thank you

@Nael-Sayegh Nael-Sayegh marked this pull request as ready for review December 9, 2023 15:38
@Adriani90

Copy link
Copy Markdown
Collaborator

There is also the nvda+o gesture for Microsoft Excel when using UIA for Excel, which displays in a browseable window useful information about the cell. This gesture is not documented in the user guide. See also #14082.

@CyrilleB79

Copy link
Copy Markdown
Contributor

@Adriani90, as explained in #14082, the status of NVDA+O is not clarified.

Since Excel UIA is experimental and since NVDA+O appears to be a demo script, there is no point in adding it in the current PR.

When it is decided what should be done with NVDA+O in #14082, it is still time either to remove it completely or to document it in input gesture dialog, input help and user guide, as well as adapt it to other situations, at least Excel legacy.

@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 @Nael-Sayegh

@seanbudd seanbudd merged commit cd250fa into nvaccess:master Dec 11, 2023
@nvaccessAuto nvaccessAuto added this to the 2024.1 milestone Dec 11, 2023
seanbudd pushed a commit that referenced this pull request Dec 12, 2023
)

I have put various little changes in the same PR. Let me know if I should divide it.

Link to issue number:
Follow-up of #15867.

Summary of the issue:
Various issues seen in #15867 or while investigating on it (e.g. looking at usages of gesture.send()):

Script BrowseModeTreeInterceptor.script_passThrough in browseMode.py has a description. It should not since: 1. It is only dedicated to specific key which should not be remapped; 2. There should not be any input help associated to it, since this "pass through" should be transparent to users.
In Eclipse, when no selected auto-completion item can be found, NVDA+D should not pass the gesture through. Indeed gesture.send() should not be used since NVDA+D is not a native gesture of this IDE. An error message should be reported instead.
The PowerPoint script does not show up in its category, whereas it was the goal in Adding command gesture categories for appmodules #15867.
With 15867, scripts to set headers of rows or columns in Excel or Word have their description shortened and the details of its usage (e.g. 1 press, 2 presses) is not reported anymore in input help. This is not consistent with other scripts. It's better to keep more details in input help as for other scripts.
Adriani90 pushed a commit to Adriani90/nvda that referenced this pull request Mar 13, 2024
…ion (nvaccess#15906)

I have put various little changes in the same PR. Let me know if I should divide it.

Link to issue number:
Follow-up of nvaccess#15867.

Summary of the issue:
Various issues seen in nvaccess#15867 or while investigating on it (e.g. looking at usages of gesture.send()):

Script BrowseModeTreeInterceptor.script_passThrough in browseMode.py has a description. It should not since: 1. It is only dedicated to specific key which should not be remapped; 2. There should not be any input help associated to it, since this "pass through" should be transparent to users.
In Eclipse, when no selected auto-completion item can be found, NVDA+D should not pass the gesture through. Indeed gesture.send() should not be used since NVDA+D is not a native gesture of this IDE. An error message should be reported instead.
The PowerPoint script does not show up in its category, whereas it was the goal in Adding command gesture categories for appmodules nvaccess#15867.
With 15867, scripts to set headers of rows or columns in Excel or Word have their description shortened and the details of its usage (e.g. 1 press, 2 presses) is not reported anymore in input help. This is not consistent with other scripts. It's better to keep more details in input help as for other scripts.
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.

Store the poEdit appModule scripts in a dedicated category

9 participants