-
-
Notifications
You must be signed in to change notification settings - Fork 689
Add Braille and Tones extension points to avoid monkey patching by API consumers #14503
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
Conversation
* inputCore.manager.decide_executeGesture: Decider for filtering gestures * tones.decide_beep * nvwave.decide_playWaveFile * braille.handler.pre_writeCells * braille.handler.filter_displaySize * braille.handler.decide_enabled
See test results for failed build of commit c24a56155a |
See test results for failed build of commit 4ff1ae2c34 |
See test results for failed build of commit c25aab6ec4 |
Small fix in change log: |
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
See test results for failed build of commit f4f92ae9da |
It seems that the system tests are failing for a legitimate reason on this PR |
See test results for failed build of commit a44cfee9b9 |
I'l have a look and will add one additional extension point plus some unit tests as well. |
See test results for failed build of commit e1d27383a5 |
See test results for failed build of commit a43126dff8 |
See test results for failed build of commit b44f589a85 |
See test results for failed build of commit 74f272c4bd |
The system tests are working and all the unit tests are in place. I think this is readdy for another review. |
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @LeonarddeR , LGTM, I can fix up the docstring when updating the changes
source/braille.py
Outdated
#: Internal cache for the displaySize property. | ||
#: This attribute is used to compare the displaySize output by l{filterDisplaySize} | ||
#: with its previous output. | ||
#: If the value differs, L{displaySizeChanged} is notified. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be turned into a docstring like the others?
Fixup of #14503 Summary of the issue: When a handler was registered to decide_enabled and a cursor was blinking or a message with timeout was shown on the braille display, the display would still be updated. Found when working on NVDA Remote to integrate the extension points. The extensionPointTestHelpers wouldn't strictly test whether the handler was actually called. Also the handler argument for value was incorrect and using a class to store the filter value was overdone. Description of user facing changes When a handler decides to disable the braille handler, cursor blinking is now stopped and a message is dismissed.
…x FilterValueT name (#14549) Summary of the issue: FilterValueTypeT nneeded renaming to FilterValueT and had a wrong string in its TypeVar declaration. When experimenting with the extensionPoints, particularlyy with registering a handler to decide_executeGesture in a braille display driver, I discovered that inputCore was not yet initialized when initializing the driver and therefore extension point registration failed. Description of user facing changes Moved extension points, changes file is changed as part of this pr to reflect this. Description of development approach Just moving and renaming code
…ewer (#15214) Fixes regression from #14503 Summary of the issue: As part of #14503, braille extension points have been added that are used by the braille viewer. However when destroying the braille viewer by pressing alt+f4, the display size filter handler was never unregistered, resulting in the braille handler still assuming 40 braille cells even though no display was connected. Description of user facing changes Braille handler connectly restores to 0 cells again after disabling the braille viewer with alt+f4 when no braille display is connected. Description of development approach Changed if check on the dialog to is not None explicitly. wx gives a destroyed window a bool value of False, so the boolean check would work. Ensure braille.filter_displaySize is unregistered when destroyBrailleViewer is called when the window is already destroyed. Note that destroying the window will unregister braille.pre_writeCells properly, so that unregistration can be limited to an undestroyed window only.
…cide_executeGesture` See <nvaccess/nvda#14503>, <LeonarddeR/rdAccess#14>
…ecide_executeGesture` See <nvaccess/nvda#14503>, <LeonarddeR/rdAccess#14>
…cide_executeGesture` See <nvaccess/nvda#14503>, <LeonarddeR/rdAccess#14>
…cide_executeGesture` See <nvaccess/nvda#14503>, <LeonarddeR/rdAccess#14>
…cide_executeGesture` See <nvaccess/nvda#14503>, <LeonarddeR/rdAccess#14>
Link to issue number:
Replaces #9917
Summary of the issue:
Tools like NVDA remote that need to intercept speech and braille output currently rely on monkeypatching to do this.
Description of user facing changes
It is no longer possible to override the display size of the braille handler by setting braille.handler.displaySize. It is also no longer possible to enable/disable the handler by setting braille.handler.enabled.
Description of development approach
Added the following extension points:
This means that NVDA Remote and similar tools can at least drop all monkeypatching related to braille, playing tones and waves. Speech is a separate subject and will be handled in a follow up.
Testing strategy:
Known issues with pull request:
None known
Change log entries:
For Developers
API breaking changes
Code Review Checklist: