-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Adding support for text pattern to ComboBox #4540
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
Adding support for text pattern to ComboBox #4540
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4540 +/- ##
===================================================
+ Coverage 97.97367% 97.97828% +0.00460%
===================================================
Files 543 544 +1
Lines 264666 265418 +752
Branches 5007 5089 +82
===================================================
+ Hits 259303 260052 +749
Misses 4483 4483
- Partials 880 883 +3
Flags with carried forward coverage won't be shown. Click here to find out more. |
462690e to
9a2fc76
Compare
vladimir-krestov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work. So many tests!
Main review point - return real hardcode values instead calculating
src/System.Windows.Forms/src/System/Windows/Forms/ComboBox.ComboBoxChildEditUiaProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/ComboBox.ComboBoxUiaTextProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/ComboBox.ComboBoxUiaTextProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/ComboBox.ComboBoxUiaTextProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/ComboBox.ComboBoxUiaTextProvider.cs
Outdated
Show resolved
Hide resolved
....Windows.Forms/tests/UnitTests/System/Windows/Forms/ComboBox.ComboBoxUiaTextProviderTests.cs
Outdated
Show resolved
Hide resolved
....Windows.Forms/tests/UnitTests/System/Windows/Forms/ComboBox.ComboBoxUiaTextProviderTests.cs
Outdated
Show resolved
Hide resolved
....Windows.Forms/tests/UnitTests/System/Windows/Forms/ComboBox.ComboBoxUiaTextProviderTests.cs
Outdated
Show resolved
Hide resolved
....Windows.Forms/tests/UnitTests/System/Windows/Forms/ComboBox.ComboBoxUiaTextProviderTests.cs
Outdated
Show resolved
Hide resolved
....Windows.Forms/tests/UnitTests/System/Windows/Forms/ComboBox.ComboBoxUiaTextProviderTests.cs
Outdated
Show resolved
Hide resolved
9a2fc76 to
a014d9c
Compare
63fc0fb
vladimir-krestov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
src/System.Windows.Forms/src/System/Windows/Forms/ComboBox.ComboBoxUiaTextProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/ComboBox.ComboBoxUiaTextProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/ComboBox.ComboBoxUiaTextProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/ComboBox.ComboBoxUiaTextProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/ComboBox.ComboBoxUiaTextProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/ComboBox.ComboBoxUiaTextProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/ComboBox.ComboBoxUiaTextProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/ComboBox.ComboBoxChildEditUiaProvider.cs
Outdated
Show resolved
Hide resolved
61984b3 to
ba1b95f
Compare
|
CTI approved |
|
MC |
ba1b95f to
0bb8d75
Compare
|
MC are fixed :) |
src/System.Windows.Forms.Primitives/src/System/Windows/Forms/Automation/UiaTextRange.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's a correlation between _childEdit and ChildEditAccessibleObject?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
During the creation of the Handle for the ComboBox, we create a _childEdit. _childEdit is used when creating a ChildEditAccessibleObject. Thus, if _childEdit exists, we can be sure that the ChildEditAccessibleObject exists or can be created.
src/System.Windows.Forms/src/System/Windows/Forms/ComboBox.ComboBoxUiaTextProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/ComboBox.ComboBoxUiaTextProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/ComboBox.ComboBoxUiaTextProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/ComboBox.ComboBoxUiaTextProvider.cs
Outdated
Show resolved
Hide resolved
…pDown, Simple) should support ValuePattern and TextPattern dotnet#4409 Added ComboBoxUiaTextProvider class to support TextPattern. Its logic is based on the TextBoxBaseUiaTextProvider, but we use the native control handle, which is responsible for editing Changed the value of the "nativeDebugging" flag to "false", because the text pattern works incorrectly without this in the "WinFormTests" project Added unit tests
0bb8d75 to
ae34ee4
Compare
| [InlineData(ComboBoxStyle.Simple)] | ||
| public void ComboBoxUiaTextProvider_Ctor_DoesntCreateControlHandle(ComboBoxStyle dropDownStyle) | ||
| { | ||
| using (new NoAssertContext()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In most cases you can do this:
| using (new NoAssertContext()) | |
| using NoAssertContext context = new(); |
It the same, just less braces and indentation.
Fixes #4409
Proposed changes
Customer Impact
Before:

After:

Regression?
Risk
Test methodology
Accessibility testing
Test environment(s)
Microsoft Reviewers: Open in CodeFlow