Skip to content

Context help: support more controls and dialogs#11743

Merged
feerrenrut merged 10 commits into
nvaccess:masterfrom
CyrilleB79:contextHelp2
Nov 17, 2020
Merged

Context help: support more controls and dialogs#11743
feerrenrut merged 10 commits into
nvaccess:masterfrom
CyrilleB79:contextHelp2

Conversation

@CyrilleB79

@CyrilleB79 CyrilleB79 commented Oct 9, 2020

Copy link
Copy Markdown
Contributor

Link to issue number:

Fixes #7757
Follow-up of #11456

Summary of the issue:

#11456 provided a framework to context help in NVDA dialogs and added context help in the majority of NVDA dialogs and controls. However, this work being very teddious, some issue remained:

  • some references did not point to the corresponding paragraph (missing call to self.bindHelpEvent or call with an incorrect parameter)
  • some dialogs or panels did not point to the corresponding paragraph (missing or incorrect helpId)
  • some dialogs or frames did not provide context help at all because they did not subclass gui.ContextHelpMixin
  • Rate boost paragraph were missing in the user guide whereas all other synth parameter are described in detail

Description of how this pull request fixes the issue:

I have separated the fixes in 3 commits to ease the review:

1st commit (c940083)

  • Added missing helpId or fix it if needed (with respect to the anchors in the user doc).
  • Added calls to self.bindHelpEvent for controls where it was missing
  • Fixed the first parameter (anchor) of self.bindHelpEvent to match the corresponding paragraph in the user guide

Speech, Braille and Vision setting all use subpanels inheriting from AutoSettingsMixin. It was taken into account however that all these subpanels do not have the same level of details in the user guide and thus have been treated diferently:

  • In Speech sub-panel, all option point to a dedicated paragraph in the doc
  • In Braille sub-panel, options point to the main Braille settings paragraph in the doc since the items of this subpanel are specific to each Braille display and do not have a corresponding paragraph in the doc.
  • In Vision panel:
    • each Focus Highlight option points to Focus Highlight paragraph in the doc
    • each Screen Curtain option points to Screen Curtain paragraph in the doc
    • any option of a provider using the generic panel (as the one in _exampleProvider_autoGui.py) points to the main Vision setting paragraph in the doc.

2nd commit (ebcf8a1)

Make some more dialogs or frames inherit from gui.ContextHelpMixin.

Note:
I have made the modifications as per #11456. But I do not know in detail the use of DpiScalingHelperMixinWithoutInit and DpiScalingHelperMixIn. Thus this part of code (class inheritance and init function) should be carefully checked/reviewed.

3rd commit (dd72d09)

Added a paragraph for rate boost in the user guide.

Note: this video indicates at 1:33 that rate boost with Windows OneCore voice triples the speech rate. Also this page indicates that rate boost triples the regular reading rate of NVDA. However, looking at the code, it seems that only eSpeak uses the 3 factor; OneCore using 5.5 factor. I have also checked this by doing some tests (rate 100%, RB off vs rate 18% RB on). Thus, I did not specify the 3 factor in the user guide.

Testing performed:

Tested that pressing F1 in all dialogs and controls opens the User Guide at the expected paragraph. For some dialogs or controls however, these tests were made during development and not with the final commit of this PR. The tests were made sometimes with NVDA in French (and thus also the User Guide) and sometimes with NVDA in English.
Note that sometimes, the browser opens the UG at the correct position (visually), but NVDA reads from beginning of the UG, i.e. ignoring the anchor. I think this is already known and was commented somewhere (maybe in #11456); anyway, it's a browser issue and pressing F5 may allow to jump to the correct anchor. In any case, the URL was correct.

Known issues with pull request:

This PR does not provide a support for:

  • speech synth having extra parameters (such as IBMTTS): in this case, the userg guide is opened at the beginning since the constructed anchor is not present in the User Guide.
  • help for panels added by an add-on (maybe a new PR?)

Change log entry:

None if this PR is merged in 2020.4 since #11456 belong also to 2020.4

- Added missing helpId in some dialogs/panels
- Fixed some helpId
- Added calls to self.bindHelpEvent
- Fixed parameters (anchor) of some calls to self.bindHelpEvent
@CyrilleB79

Copy link
Copy Markdown
Contributor Author

Cc @feerrenrut for general review, @Qchristensen for review of 3rd commit regarding user guide.

@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit fe7b24ce9a

@OzancanKaratas

Copy link
Copy Markdown
Collaborator

speech synth having extra parameters (such as IBMTTS): in this case, the userg guide is opened at the beginning since the constructed anchor is not present in the User Guide.

@CyrilleB79 I think it would be better to have a “No help available here” message for add-ons such as IBMTTS that don't have help context.

- if the setting is a standard setting, go to the paragraph that describes this specific setting in User Guide
- if the setting is not standard, i.e. specific to a third-party synth, go to speech settings in the User Guide
@CyrilleB79

Copy link
Copy Markdown
Contributor Author

speech synth having extra parameters (such as IBMTTS): in this case, the userg guide is opened at the beginning since the constructed anchor is not present in the User Guide.

@CyrilleB79 I think it would be better to have a “No help available here” message for add-ons such as IBMTTS that don't have help context.

Thanks @OzancanKaratas for commenting. Opening the user guide at the beginning was actually not a good solution: it does not bring any additional information to the user.
There were 2 alternatives:

  • do not provide help at all since this option is not described in the UG
  • provide a more general help by opening the user guide at the speech settings paragraph
    I have choosen this second option. This seems more coherent with some other dialogs where some controls have a specific paragraph in the UG and some other in the same dialog do not. In this case, the UG was already opening at the paragraph describing the whole dialog.
    This behaviour may be modified if one day we support context help for add-ons; in this case we would implement a mean to target the corresponding paragraph in the add-on user documentation.

For reviewers:
Regarding implementation, I have hard-coded the list of standard supported settings, since I have not found a better way to do it. If one day there is an additional standard voice setting, it will need to be added in this list. Any hint to get this list from somewhere else rather than hard-coding it is welcome!

@CyrilleB79 CyrilleB79 marked this pull request as draft October 10, 2020 21:22
@CyrilleB79

CyrilleB79 commented Oct 10, 2020

Copy link
Copy Markdown
Contributor Author

Please do not review.
I have converted this PR to draft since I have found some more dialogs to handle. Just let me time to work again on this and I will let you know when all is ready.

@Qchristensen

Copy link
Copy Markdown
Member

With the User Guide, Is it worth changing the text from:

"If checked this option allows you to significantly increase the rate of the current voice by multiplying the [regular rate value #SpeechSettingsRate] by a predetermined factor.
This option may not be supported by all synthesizers; but eSpeak NG and Windows OneCore supports it as well as some third-party synthesizer.
This option is disabled by default."

To:
"When enabled, the speech rate is significantly increased, if supported by the current synthesizer.
This option is disabled by default."

It's more succinct and similar wording to other options. I thought if we can't specify the exact rate increase, it's probably best not to include something like "by a predetermined factor" which invites the question "what is that factor?". I must admit, when I made that video you referred to, I just worked out the speech rate with and without rate boost. Evidently in my test the increase was 300% but if that is not the same for all supported synthesizers, it's probably best, as you suggest, not to specify it at all.

@CyrilleB79

Copy link
Copy Markdown
Contributor Author

@Qchristensen you suggests the following rewriting in the UG:

"When enabled, the speech rate is significantly increased, if supported by the current synthesizer.
This option is disabled by default."

What about shortening it still more to the shorter form as follows:
"When enabled, the speech rate is significantly increased. This option is disabled by default."
Indeed, if not supported by the synthesizer, this checkbox will be disabled.

It's more succinct and similar wording to other options.

Not so much similar to "Variant" option (just above). If we would like to write something similar to the "Variant" option, we may write a longer form:
"When enabled, the speech rate is significantly increased. This option is disabled by default. This option is not supported by all synthesizer; but it is supported by eSpeak and Windows OneCore."
But I agree that the "Variant" paragraph is giving unneeded details.

I thought if we can't specify the exact rate increase, it's probably best not to include something like "by a predetermined factor" which invites the question "what is that factor?".

I fully agree with that in any case and I will not mention the term of factor or or multiplier.

What do you prefer between shorter or longer form (or something else)?

@XLTechie

XLTechie commented Oct 12, 2020 via email

Copy link
Copy Markdown
Collaborator

@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 6004b35c7b

@Qchristensen

Copy link
Copy Markdown
Member

I would tend to favour clear, concise wording. And as XLTechie noted, even though the option is disabled if not supported, if a user knows it exists, they may be confused why they can't find it.

@CyrilleB79

Copy link
Copy Markdown
Contributor Author

OK for the words "if supported..."

Something still bothers me however:
"When enabled, the speech rate is significantly increased, if supported by the current synthesizer.
This option is disabled by default."
Grammatically this let think that the speech rate is enabled (or not). Of course with the title above, anyone understands that it deals with rate boost. But I would prefer something clearer:
"When enabled, this option significantly increases the speech rate, if supported by the current synthesizer.
This option is disabled by default."
Sorry to be a bit picky about words. But this makes translation work easier for translators.

@CyrilleB79

Copy link
Copy Markdown
Contributor Author

This PR is now ready for review.

I have added context help for some more dialogs in a5860ce. This commit needs to be reviewed with the same care as the 2nd commit (ebcf8a1).

The following dialogs remain not overloaded with context help:

  • starting dialog in Outlook and PowerPoint app modules
  • ExitDialog: no corresponding paragraph in the UG
  • DonateRequestDialog: no corresponding paragraph in the UG
  • Main frame
  • IndeterminateProgressDialog
    Also the message boxes poping from nowhere, e.g. add-on installation from explorer, do not have context help.
    Let me know if I need to support them.

Magically, message boxes opened from a dialog such as add-on info opened from the add-on manager support context help of the parent dialog. However, I do not understand exactly why... Any clarification is welcome.

@CyrilleB79 CyrilleB79 marked this pull request as ready for review October 14, 2020 21:26
@XLTechie

XLTechie commented Oct 15, 2020 via email

Copy link
Copy Markdown
Collaborator

@CyrilleB79

Copy link
Copy Markdown
Contributor Author

I would prefer something clearer: "When enabled, this option significantly increases the speech rate, if supported by the current synthesizer. This option is disabled by default."

I don't object to that, although it is getting long again. Do we need the note about the default? Perhaps: "Enabling this option will significantly increase the speech rate, if supported by the current synthesizer."

@XLTechie, thanks for commenting agin.
Your suggestion is clear and concise and I am happy with it.
Regarding the note about the default, I had copied what was done in another paragraph; but I agree that it is not necessary.
Let's hear @Qchristensen's opinion.

@Qchristensen

Copy link
Copy Markdown
Member

I also had copied the style of another option. I am happy either way, and certainly a small change which makes it clearer for non-native English speakers is a useful change, I am happy to take suggestions from translators on that.

@CyrilleB79

Copy link
Copy Markdown
Contributor Author

@feerrenrut do you plan to integrate this PR in 2020.4? This would make sense since #11456 is also part of 2020.4.
If yes, may you review it or indicate someone who could perform this review?
Thanks.

@lukaszgo1

Copy link
Copy Markdown
Contributor

@CyrilleB79 wrote:

Regarding implementation, I have hard-coded the list of standard supported settings, since I have not found a better way to do it. If one day there is an additional standard voice setting, it will need to be added in this list. Any hint to get this list from somewhere else rather than hard-coding it is welcome!

While I don't have a solution for this, ideally we should redesign the way in which context help is presented so that we can check if there is a section in the documentation or not for a particular control.

@CyrilleB79

Copy link
Copy Markdown
Contributor Author

@CyrilleB79 wrote:

Regarding implementation, I have hard-coded the list of standard supported settings, since I have not found a better way to do it. If one day there is an additional standard voice setting, it will need to be added in this list. Any hint to get this list from somewhere else rather than hard-coding it is welcome!

While I don't have a solution for this, ideally we should redesign the way in which context help is presented so that we can check if there is a section in the documentation or not for a particular control.

I agree with you that this way to do is not ideal. But I do not know any other way to do.
Since there has not been other solution proposal that may be targeted for NVDA 2020.4, I recommend merging this PR as is in 2020.4 since it is a fix for #11456 that was already merged.

As soon as you have an better idea to manage context help, please open a new issue with detailed description and links to this PR and to #11456, so that it is more visible.
Thanks.

@feerrenrut feerrenrut 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.

Overall, this looks good. There are a lot of changes here, can you confirm you have tested help works for all of these now?

Please don't add more to this PR, lets get it finalized and merged, and add any further missed items in subsequent PR's.

Comment thread source/cursorManager.py Outdated
Co-authored-by: Reef Turner <feerrenrut@users.noreply.github.com>
@CyrilleB79

Copy link
Copy Markdown
Contributor Author

Thanks @feerrenrut for this review.

I confirm that during the development, I have carefully tested all the controls of the modified dialogs or panels.

The 2 last commits were just a merge commit to remove a conflict with master and the commit after review comments. I will not add anymore commit (except possible review comment addressing if required).

@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: concise and clear. Good work!

@feerrenrut feerrenrut 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.

Thanks @CyrilleB79

@feerrenrut feerrenrut merged commit aecff99 into nvaccess:master Nov 17, 2020
@nvaccessAuto nvaccessAuto added this to the 2020.4 milestone Nov 17, 2020
@CyrilleB79 CyrilleB79 deleted the contextHelp2 branch November 17, 2020 08:08
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.

Context Sensitive Help in NVDA Dialogs

8 participants