Skip to content

Adding UIA support for PrintPreviewControl#6600

Merged
Tanya-Solyanik merged 1 commit intodotnet:mainfrom
Danil-Andrianov:Issue-3421_AddingUIASupportForPrintPreviewControl
Feb 20, 2022
Merged

Adding UIA support for PrintPreviewControl#6600
Tanya-Solyanik merged 1 commit intodotnet:mainfrom
Danil-Andrianov:Issue-3421_AddingUIASupportForPrintPreviewControl

Conversation

@Danil-Andrianov
Copy link
Contributor

@Danil-Andrianov Danil-Andrianov commented Feb 2, 2022

Partially implements #3421

Proposed changes

  • Updated "SupportsUiaProviders" flag.
  • Added and implemented printPreviewControlaccessible object
  • Added unit tests

Customer Impact

  • Before update:
    image
    image

  • After update:
    Provider was changed.
    image
    image

Regression?

  • No

Risk

  • Minimal

Test methodology

  • Unit tests
  • CTI team

Accessibility testing

  • Narrator
  • Inspect
  • Accessibility Insights

Test environment(s)

  • Microsoft Windows [Version 10.0.22000.318]
  • .NET Core SDK: 7.0.0-alpha.1.21562.1
Microsoft Reviewers: Open in CodeFlow

@Danil-Andrianov Danil-Andrianov requested a review from a team as a code owner February 2, 2022 06:38
@ghost ghost assigned Danil-Andrianov Feb 2, 2022
@Danil-Andrianov Danil-Andrianov marked this pull request as draft February 2, 2022 06:38
@ghost ghost added the draft draft PR label Feb 2, 2022
@Danil-Andrianov Danil-Andrianov force-pushed the Issue-3421_AddingUIASupportForPrintPreviewControl branch 2 times, most recently from c512d68 to e7717b4 Compare February 2, 2022 12:20
@Danil-Andrianov Danil-Andrianov removed the draft draft PR label Feb 2, 2022
@Danil-Andrianov Danil-Andrianov marked this pull request as ready for review February 2, 2022 12:21
@Danil-Andrianov Danil-Andrianov force-pushed the Issue-3421_AddingUIASupportForPrintPreviewControl branch 3 times, most recently from 7ff876b to 1249f2e Compare February 3, 2022 06:15
[WinFormsFact]
public void PrintPreviewControlAccessibleObject_GetPropertyValue_Focused_ReturnsExpected()
{
Form form = new();
Copy link
Member

Choose a reason for hiding this comment

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

using ?

dreddy-work
dreddy-work previously approved these changes Feb 8, 2022
Copy link
Member

@dreddy-work dreddy-work left a comment

Choose a reason for hiding this comment

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

RLGTM. @Tanya-Solyanik , when you get a chance, can you take a final look here?

@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
Copy link
Contributor

Choose a reason for hiding this comment

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

This is noise, please revert

Tanya-Solyanik
Tanya-Solyanik previously approved these changes Feb 8, 2022
Copy link
Contributor

@Tanya-Solyanik Tanya-Solyanik left a comment

Choose a reason for hiding this comment

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

Looks good, @Olina-Zhang - could you please test this change

@dreddy-work dreddy-work added waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s) waiting-author-feedback The team requires more information from the author labels Feb 8, 2022
@Danil-Andrianov Danil-Andrianov force-pushed the Issue-3421_AddingUIASupportForPrintPreviewControl branch from 1249f2e to 20cb633 Compare February 8, 2022 20:03
@ghost ghost removed the waiting-author-feedback The team requires more information from the author label Feb 8, 2022
@IDEExperienceTestSolution
Copy link
Member

Tested the private binaries that built by ourselves for this PR based on latest .Net 7.0 using Accessiblity Tools: Inspect, Accessiblity Insight, and Narrator. The providerDescription information is updated and no new issue found:
image

In addition, all the migrated automation cases are passed.

@Tanya-Solyanik Tanya-Solyanik added the waiting-author-feedback The team requires more information from the author label Feb 9, 2022
@Danil-Andrianov Danil-Andrianov force-pushed the Issue-3421_AddingUIASupportForPrintPreviewControl branch from 20cb633 to cab44a4 Compare February 16, 2022 05:42
@ghost ghost removed the waiting-author-feedback The team requires more information from the author label Feb 16, 2022
@Tanya-Solyanik
Copy link
Contributor

new unrelated failure:

Assert.Equal() Failure\r\nExpected: 1\r\nActual:   MemoryStream { CanRead = True, CanSeek = True, CanTimeout = False, CanWrite = True, Capacity = 70, ... }


Stack trace
   at System.Windows.Forms.Tests.ClipboardTests.Clipboard_SetDataObject_InvokeObjectBoolNotIComDataObject_GetReturnsExpected(Object data, Boolean copy) in /_/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ClipboardTests.cs:line 279

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@Tanya-Solyanik
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Copy link
Contributor

@vladimir-krestov vladimir-krestov left a comment

Choose a reason for hiding this comment

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

Should be carefully tested

Comment on lines +44 to +45
using Form form = new();
using var control = new PrintPreviewControl();
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use one style for your tests:

Suggested change
using Form form = new();
using var control = new PrintPreviewControl();
using Form form = new();
using PrintPreviewControl control = new();

using Form form = new();
using var control = new PrintPreviewControl();
form.Controls.Add(control);
form.Show();
Copy link
Contributor

Choose a reason for hiding this comment

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

Please consider the ability to test this case without creating a form. Because this test is already UI test

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, in this case the focus can't be set without creating form.

Copy link
Contributor

@vladimir-krestov vladimir-krestov Feb 18, 2022

Choose a reason for hiding this comment

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

Doesn't FocusActiveControlInternal work? Or something like that:
User32.SetFocus(new HandleRef(_activeControl, _activeControl.Handle));? (don't forget to CreateControl before)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The latter way works fine, thanks.

@Danil-Andrianov Danil-Andrianov force-pushed the Issue-3421_AddingUIASupportForPrintPreviewControl branch 4 times, most recently from 6a9a4c8 to fcf25fa Compare February 18, 2022 09:33
Tanya-Solyanik
Tanya-Solyanik previously approved these changes Feb 18, 2022
Copy link
Contributor

@Tanya-Solyanik Tanya-Solyanik left a comment

Choose a reason for hiding this comment

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

Looks good, but please make sure the @vladimir-krestov signs off, seems like his comments are addressed

@Tanya-Solyanik
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Copy link
Contributor

@vladimir-krestov vladimir-krestov left a comment

Choose a reason for hiding this comment

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

Approved ✔️

@Danil-Andrianov Danil-Andrianov force-pushed the Issue-3421_AddingUIASupportForPrintPreviewControl branch from fcf25fa to bc563b7 Compare February 19, 2022 09:03
Copy link
Contributor

@Tanya-Solyanik Tanya-Solyanik left a comment

Choose a reason for hiding this comment

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

Looks good

@Cassie-Li01
Copy link

Verified on 7.0.100-preview.3.22124.15, this is fixed.
image
image

@ghost
Copy link

ghost commented Mar 4, 2022

Hi @Cassie-Li01, it looks like you just commented on a closed PR. The team will most probably miss it.
If you have a question - consider opening a new discussion thread. Alternatively, you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context.

@ghost ghost locked as resolved and limited conversation to collaborators Apr 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants