Skip to content
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

Revert message dialog API #17561

Merged
merged 1 commit into from
Dec 20, 2024
Merged

Revert message dialog API #17561

merged 1 commit into from
Dec 20, 2024

Conversation

SaschaCowley
Copy link
Member

Reverts PR

Reverts #17304

Issues fixed

Fixes #17560
Fixes #17553

Issues reopened

Reopens #13007
Reopens #12344
Reopens #12353

Reason for revert

This PR broke two important NVDA functions, and there is insufficient time before the Christmas/New Years break to fix the issues, so we are temporarily reverting so that alphas work over the break:

  • The CRFT no longer works, as gui.message.MessageDialog's inheritance from ContextHelpMixin was accidentally removed.
  • Update checking no longer works, as runScriptModalDialog was modified to increment and decrement _messageBoxCounter, but UpdateAskInstallDialog attempts to restart NVDA before it has been closed, so the update fails as NVDA appears to be in an unsafe state.

Can this PR be reimplemented? If so, what is required for the next attempt

Yes:

  • Fix MessageDialog so it inherits from ContextHelpMixin correctly.
  • Either:
    • Restore the older, less safe behaviour of runScriptModalDialog; or
    • Re-implement the update check code so it does not try to exit NVDA while a modal dialog is open.

@SaschaCowley SaschaCowley requested a review from a team as a code owner December 20, 2024 00:57
@michaelDCurran michaelDCurran merged commit e80d782 into master Dec 20, 2024
5 checks passed
@michaelDCurran michaelDCurran deleted the revert-17304-i13007 branch December 20, 2024 06:25
@github-actions github-actions bot added this to the 2025.1 milestone Dec 20, 2024
@SaschaCowley SaschaCowley mentioned this pull request Jan 6, 2025
7 tasks
SaschaCowley added a commit that referenced this pull request Jan 8, 2025
Closes #13007
Closes #12344
Closes #12353

Summary of the issue:

This is the second PR to merge the message dialog API into NVDA. The previous merge was at `f437723`.
See #17304 for full implementation details.
The original PR was reverted by #17561, due to #17553 and #17560.

Description of user facing changes
This PR does not, in itself, introduce any end-user facing changes. However, it lays the groundwork for closing a number of issues.

Tasks
- [x] Fix the COM registration fixing tool (#17560)
- [x] Fix NVDA updates (#17553)

Description of development approach
Restored `gui.nvdaControls.MessageDialog` inheriting from `ContextHelpMixin`, which was accidentally lost.

Changed `updateCheck.UpdateAskInstallDialog.onUpdateButton` and `onPostponeButton` to simply end the modal, returning the appropriate code. Added a static method to `UpdateAskInstallDialog` which returns a callback function which, when given the return code from `UpdateAskInstallDialog`, performs the appropriate action. Added a property method to generate this callback function given the attributes of the instance on which it is called.

Testing strategy:
Created a portable copy of NVDA (`scons dist`), and tested running the CRFT:

- Running and granting permission - works as expected
- Running and denying permission - works as expected
- Cancelling - works as expected

Added `updateVersionType="snapshot:alpha" to `source/versionInfo.py`, and tested updating with NVDA running from source:

1. Attempt updating via NVDA menu -> Help -> Check for update... -> Download update -> Update - works as expected
2. Update by downloading then postponing update, then exit NVDA -> Install pending update
    a. Without incompatible updates installed - works as expected
    b. With incompatible updates installed - works as expected
3. Update by downloading then postponing update, restarting NVDA, then NVDA menu -> Install pending update - works as expected
4. Update by downloading then postponing update, restarting NVDA, then accepting the prompt to install the update - works as expected
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.

It seems that the registration tool is not working. cannot update to current alpha
2 participants