-
-
Notifications
You must be signed in to change notification settings - Fork 637
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
Refactored the COM Registration Fixing Tool, to make it fail more gracefully, and improve its UX #12349
Conversation
… gracefully and improve code. No longer shows success dialog on failure, or when the UAC is canceled or declined. If there is a Windows error other than cancel of UAC, alert the user and show the error in a dialog. Slight changes to warning message wording. Switched from using YES and NO buttons, to YES_NO. Added a CANCEL button for visual closure and escape key use. Catch the Windows error that signals user cancel of UAC, and return (as if "NO" had been initially chosen). Added a docstring. Added some more logging.
Hello Glad that you submit such a PR. I had it in mind already for a little time. Here are my thoughts:
|
Glad that you submit such a PR. I had it in mind already for a little time.
Thank you.
I can see it is still in Draft so you probably want to add additional work in it.
It could go as is; it is already an improvement, but there are a few
details I think could still be made better.
* The errors that may occur in COMRegistrationFixes\__init__.py should not only be logged but also notified to the user when running
That would be nice. Already I have it reporting the last Windows error
raised to the user, but I don't know what that covers.
Specifically, I haven't looked deeply into what can be raised from the elevated run, back to the user level caller.
I will research before finalizing this PR, but it may have to go in the
next one.
* But what should be done when such an error occurs during NVDA installation?
I think either it has to be silently tried again on error, or silently
ignored like it is now. I don't think bothering the user with it at that
stage would be helpful.
* I think you have changed the dialog asking confirmation prior to COM reg fixing tool execution. Could you check if it is now possible to add context
help support to it. At the time context help was implemented, I had checked this but it was not supported in simple message box.
Maybe with the Help button? I will try to build it.
I intend to improve the dialog further in any case, so it may end up being
more helpful than the manual anyway.
|
No, there is no matter of help button. It depends on if you inherit from wx.Dialog or wx.MessageBox/gui.MessageBox. In the latter case, it does not seem possible to me. |
This grew bigger than I originally intended; I will open a new PR from a more appropriate branch. |
…dows errors, improve UX (#12355) Fixes #10799 Fixes #12345 Fixes #12351 Replaces #12349 Summary of the issue: * The COM Registration Fixing Tool still showed its completion dialog if it failed, or if the user said no to the UAC dialog (#12345). * The initial dialog didn't have a visual close button (red X), and was not responsive to the `Escape` or `Alt+F4` keys (#10799). * It didn't report errors to the user as pointed out by @CyrilleB79 in #12349, and * Its initial warning dialog was not serving users well with its strong warning and presentation (#12351). User facing changes: * Initial dialog given a more friendly message, with a more beginner-themed explanation. * User may now press `Escape`/`Alt+F4` to leave the dialog, as well as hitting `Cancel`. * There is now a visual close control (red X). * `F1` context help is now available. * Errors are reported to the user by error code. * The tool no longer reports success if it fails. * The tool no longer reports success if the process is cancelled by UAC. Development details: * Refactored this code to be in line with current coding standards, fix the above issues, and to give the tool a better over all UX. * Catch the Windows error generated on UAC cancel, and log that the process was stopped at the UAC. * Show other Windows errors to the user via a dialog, instead of just in the log. * Switched from using YES and NO buttons, to Continue and CANCEL. * Added a docstring. Linted and added more logging. * In order to implement the Continue and Cancel paradigm, created `gui.nvdaControls._ContinueCancelDialog`. Testing strategy: * Tested all buttons by tabbing and pressing, and by keyboard shortcuts. * Tested that all windows appear when and where they should. * Confirmed that the "completed" message no longer appears on failure or cancellation. * Simulated a Windows error to prove that a message would appear to show the error to the user. Known issues: 1. Upon UAC cancel, or upon successful completion, focus is moved from desktop or where ever it was, to the NVDA systray icon. That seems a little strange to me, although it is not new behavior. `gui.postPopup` is supposed to fix this, but it doesn't. 2. Even after being deleted, the progress window's speech appears to hang around until after the completion window is cleared, although this speech seems to be cancelled or interrupted. Again, not new behavior.
Link to issue number:
Fixes #12345
Fixes #12351
Summary of the issue:
The COM Registration Fixing Tool still showed its completion dialog if it failed.
In particular, it showed it if the user initially said yes, but then selected NO or pressed escape in the UAC dialog.
That seemed disconcerting and incorrect.
Additionally, the code needed improvement and linting; and the UX of the tool was not all it could be.
Description of how this pull request fixes the issue:
Refactored this code to be in line with current coding standards, fix this problem, and to give the tool a better over all UX.
(More changes to come)
Testing strategy:
Known issues with pull request:
Change log entries:
New features
Bug fixes
The COM Registration Fixing Tool no longer shows a completion dialog if it was canceled by closing the UAC dialog without accepting. Instead it behaves as if "No" had been selected in the initial dialog.
Code Review Checklist: