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

UI Automation in Windows Console: make default in FORMATTED consoles (Windows 11 Sun Valley 2) #10964

Merged
merged 3 commits into from
Jun 21, 2022

Conversation

codeofdusk
Copy link
Contributor

@codeofdusk codeofdusk commented Apr 8, 2020

Link to issue number:

Supersedes #9771 and #10716. Closes #1682. Closes #8653. Closes #9867. Closes #11172. Closes #11554.

Summary of the issue:

Microsoft has significantly improved performance and reliability of UIA console:

We should enable UIA support on new Windows Console builds by default for performance improvement and controllable password suppression.

Description of how this pull request fixes the issue:

This PR:

  • Exposes all three options for the UIA console feature flag in the UI (replaces the UIA check box with a combo box).
  • Adds a runtime check to test if apiLevel >= FORMATTED, and use UIA in this case when the user preference is auto. This is the case on Windows 11 Sun Valley 2 (SV2) available now in beta and set for release in the second half of 2022.

Testing performed:

Tested the IMPROVED and FORMATTED console implementations as my primary command console for over a year (since February 2020) and worked closely with the Windows Console team (especially @carlos-zamora) to verify stability and report/fix issues. Sent test builds of the new console to several others to verify stability and functionality.

  • When UIA console is set to auto in advanced settings, UIA is used in the Windows 11 SV2 console and legacy in all older versions.
  • When UIA console is set to UIA in advanced settings, UIA is always used if available (console has a UIA provider and legacy mode in properties is unticked).
  • When UIA console is set to legacy in advanced settings, legacy is always used.

Known issues with pull request:

In the event that this PR must be reverted, please do a git revert or the GitHub revert button to roll it back completely (I'm happy to help with conflict resolution should it be necessary). In other words, please do not change the default value of the winConsoleImplementation option in the config spec in an attempt to back out this change similar to #10682, as the "auto" option will then not match default behaviour as expected.

Change log entry:

== New Features ==

== Changes for Developers ==

@josephsl
Copy link
Collaborator

josephsl commented Apr 8, 2020 via email

@codeofdusk

This comment has been minimized.

@josephsl
Copy link
Collaborator

josephsl commented Apr 8, 2020 via email

@codeofdusk
Copy link
Contributor Author

note that even in Version 2004, newer Windows Terminal preview release may contain UIA console improvements, and checking for 21H1 property says True.

How so? That property is on WinConsoleUIA, not WinTerminalUIA.

@josephsl
Copy link
Collaborator

josephsl commented Apr 8, 2020 via email

@codeofdusk
Copy link
Contributor Author

Yes. Since Windows Terminal always has a correct UIA implementation, ConsoleUIATextInfo (not ConsoleUIATextInfoPre21H1) is always used, and there's no need for an is21H1Plus property.

@feerrenrut feerrenrut added app/windows-terminal New terminal app, potentially supersedes app/windows-console (repo: microsoft/terminal) feature labels Apr 9, 2020
@feerrenrut
Copy link
Contributor

@codeofdusk could you update the description to summarize what is rolled back in the two PR's you link to and also summarize the two microsoft/terminal PR's.

@codeofdusk
Copy link
Contributor Author

I've updated the description.

@codeofdusk
Copy link
Contributor Author

@feerrenrut How can I re-label this PR as Windows Console, not Windows Terminal?

@feerrenrut feerrenrut added app/windows-console Legacy console in Windows, potentially will superseded by the app/windows-terminal and removed app/windows-terminal New terminal app, potentially supersedes app/windows-console (repo: microsoft/terminal) labels May 1, 2020
@feerrenrut
Copy link
Contributor

Most of the PR seems to be referring to terminal and the microsoft/terminal repo. Can you make the description clearer?

@codeofdusk
Copy link
Contributor Author

codeofdusk commented May 1, 2020

Yes, because the terminal repo contains both Windows Terminal and Windows Console source code.

@dpy013
Copy link
Contributor

dpy013 commented Jun 16, 2020

Will this PR merge NVDA2020.2?
thanks

@codeofdusk
Copy link
Contributor Author

codeofdusk commented Jun 16, 2020

Will this PR merge NVDA2020.2?
thanks

Probably not, as there are still blocking issues on the conhost side. Once the conhost issues are fixed we can look at merging this.

@codeofdusk
Copy link
Contributor Author

codeofdusk commented Oct 9, 2020

@feerrenrut @michaelDCurran Could this PR please be labelled as blocked until the blocking PRs are merged?

Also CC @carlos-zamora, @DHowett.

@AppVeyorBot

This comment was marked as off-topic.

@AppVeyorBot

This comment was marked as off-topic.

@codeofdusk
Copy link
Contributor Author

@seanbudd Thanks for approving! I'm not sure why the system tests are failing as my changes are unrelated.

@seanbudd seanbudd removed their assignment May 23, 2022
@seanbudd seanbudd self-requested a review May 23, 2022 05:48
codeofdusk added a commit to codeofdusk/nvda that referenced this pull request Jun 17, 2022
It was requested in nvaccess#10964 (comment) that the ternary option be exposed separately to the change in default behaviour to ease revertability. This commit exposes the ternary option as requested and updates the user guide in preparation for PR nvaccess#10964.

Co-authored-by: Łukasz Golonka <lukasz.golonka@mailbox.org>
@codeofdusk codeofdusk marked this pull request as draft June 17, 2022 08:28
codeofdusk added a commit to codeofdusk/nvda that referenced this pull request Jun 17, 2022
It was requested in nvaccess#10964 (comment) that the ternary option be exposed separately to the change in default behaviour to ease revertability. This commit exposes the ternary option as requested and updates the user guide in preparation for PR nvaccess#10964.

Co-authored-by: Łukasz Golonka <lukasz.golonka@mailbox.org>
@codeofdusk

This comment was marked as outdated.

seanbudd pushed a commit that referenced this pull request Jun 21, 2022
…preparation for usage by default (#13807)

Summary of the issue:
It was requested in #10964 (comment) that the ternary option be exposed separately to the change in default behaviour to ease revertability.

Description of how this pull request fixes the issue:
Exposes the ternary option as requested and updates the user guide.
@codeofdusk
Copy link
Contributor Author

@seanbudd I've updated this PR now that #13807 has been merged. It is once again ready for review.

@codeofdusk codeofdusk marked this pull request as ready for review June 21, 2022 03:08
Copy link
Member

@Qchristensen Qchristensen left a comment

Choose a reason for hiding this comment

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

Reads well, great work!

@seanbudd seanbudd merged commit b817b03 into nvaccess:master Jun 21, 2022
@nvaccessAuto nvaccessAuto added this to the 2022.3 milestone Jun 21, 2022
seanbudd pushed a commit that referenced this pull request Jun 22, 2022
Fix-up of #10964.

Summary of the issue:

The link to Expose Text Attributes to UI Automation microsoft/terminal#10336 was broken by t2t preproc directives.

Additional clarification on "NVDA API levels" might be appreciated by some users.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app/windows-console Legacy console in Windows, potentially will superseded by the app/windows-terminal conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. feature
Projects
None yet
10 participants