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

feat(ai-win-ado-sep21): initial changes to replace WebBrowser control with WebView2 control #1205

Merged
merged 8 commits into from
Sep 30, 2021

Conversation

karanbirsingh
Copy link
Contributor

@karanbirsingh karanbirsingh commented Sep 30, 2021

Details

This PR builds heavily on the draft in #1170 to replace the deprecated IE-based WebBrowser control with the newer WebView2 control so that bug filing in Azure DevOps is unblocked.

You can try the MSI here.

This changeset has the minimum set of changes to use the WebView2:

  • required DLLs are added to the WXS installer configuration files
  • tested on Windows 11 and Windows 7
  • tested with UI Access on the lock screen
  • messaging for users who don't have the WebView2 runtime installed
  • some changes to our usage of EnsureCoreWebView2Async that we think were causing ArgumentException crashes similar to MessageBox.Show() fails after WebView2 is added to form MicrosoftEdge/WebView2Feedback#329 - we haven't noticed the crash since making the change, but will keep looking

In the happy path, the old 'ADO issue filing is blocked' dialog is now gone, and users can file bugs again.

However, there are still several PRs to come:

  • as @DaveTryon mentioned in fix: Replace WebBrowser control with WebView2 control #1170, the ADO authentication can get out of sync between the WebView2 and AI-Windows; the user-impact is a filed bug without attachments
  • while the WebView2 renders the issue filing page correctly in most of my tests, I've noticed occasional failures to refresh the view, instead stuck on a gray background. In these instances the DOM is available via the keyboard/screen-reader, and my mouse cursor changes as I hover over buttons. But visually the entire screen is gray.
  • the WebView2 release notes describe minimum SDK + WebView2 runtime versions. It would be good to investigate this further to see if we need to handle compatibility issues

We decided to approach this via several PRs that make their way into canary rather than a single atomic change. This means canary might have some buggy behavior in issue filing for now, but it's an improvement over the current blocked behavior.

Motivation

unblock azure devops issue filing

Context

This PR also introduces a new dialog box that accompanies a change in our documentation: https://github.com/microsoft/accessibility-insights-docs/pull/899

dialog box asking user to install the WebView2 runtime

The WebView2 control requires a WebView2 runtime to be installed on the client machine. This requirement is also described in MicrosoftEdge/WebView2Feedback#341.

In April 2021, Microsoft began installing the WebView2 Runtime on Windows devices with Version 2101 or later of Microsoft 365 Apps installed. But some machines don't have the runtime installed (Windows 7, for example). We don't expect this to affect many users, but we need to provide information to users so they can install the runtime if needed.

As app owners we could also modify Accessibility Insights for Windows to install the WebView2 runtime directly for our users. After getting input from team members, we elected not to add to AI-Window's installation process. Instead, users without the runtime will follow these one-time steps.

This PR adds the dialog pictured above if the user does not have the runtime installed. The dialog will link to the published content in our documentation when completed.

Pull request checklist

  • Run through of all test scenarios completed?
  • Does this address an existing issue? If yes, Issue# -
  • Includes UI changes?
    • Run the production version of Accessibility Insights for Windows against a version with changes.
    • Attach any screenshots / GIF's that are applicable.

Note: After the PR has been created, certain checks will be kicked off. All of these checks must pass before a merge.

@karanbirsingh karanbirsingh requested a review from a team as a code owner September 30, 2021 00:29
@karanbirsingh karanbirsingh merged commit a120c4a into main Sep 30, 2021
@karanbirsingh karanbirsingh deleted the use-webview-control branch September 30, 2021 23:50
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.

2 participants