Skip to content

DomainUpDown/NumericUpdown should be KeyboardFocusable#4127

Merged
3 commits merged intodotnet:masterfrom
albertvaka:albertvaka/keyboardfocusable-updowns
Oct 27, 2020
Merged

DomainUpDown/NumericUpdown should be KeyboardFocusable#4127
3 commits merged intodotnet:masterfrom
albertvaka:albertvaka/keyboardfocusable-updowns

Conversation

@albertvaka
Copy link
Contributor

@albertvaka albertvaka commented Oct 17, 2020

Fixes #4123

I tracked the current behavior to this PR: #2382

Proposed changes

  • DomainUpDown/NumericUpdown should return true when queried for IsKeyboardFocusablePropertyId and they are visible and enabled. This is the behavior of the base class, so we shouldn't override it here.

Regression?

  • Yes.

Risk

  • Someone might be relying on the current behavior.

Test methodology

  • Added new tests.
Microsoft Reviewers: Open in CodeFlow

@albertvaka albertvaka requested a review from a team as a code owner October 17, 2020 17:39
@ghost ghost assigned albertvaka Oct 17, 2020
@dnfadmin
Copy link

dnfadmin commented Oct 17, 2020

CLA assistant check
All CLA requirements met.

@codecov
Copy link

codecov bot commented Oct 17, 2020

Codecov Report

Merging #4127 into master will increase coverage by 29.99531%.
The diff coverage is 100.00000%.

@@                 Coverage Diff                  @@
##              master       #4127          +/-   ##
====================================================
+ Coverage   68.12157%   98.11688%   +29.99530%     
====================================================
  Files           1482         494         -988     
  Lines         508855      258454      -250401     
  Branches       41468        4489       -36979     
====================================================
- Hits          346640      253587       -93053     
+ Misses        155976        4105      -151871     
+ Partials        6239         762        -5477     
Flag Coverage Δ
#Debug 98.11688% <100.00000%> (+29.99530%) ⬆️
#production 100.00000% <ø> (+62.82260%) ⬆️
#test 98.11688% <100.00000%> (+0.00045%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Contributor

@RussKie RussKie left a comment

Choose a reason for hiding this comment

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

Looks sensible.

@vladimir-krestov was there a specific reason to set it to false initially?

@vladimir-krestov
Copy link
Contributor

@RussKie, actually, no. That is my mistake in #2382. But we can't set true here just like that because a control with properties Enabled=false or Visible=false can't be focused. So I would prefer to use _owningControl.CanSelect property here. But ControlAccessibleObject already implements it, so @albertvaka, we can just remove IsKeyboardFocusable definitions from DomainUpDown/NumericUpdown AccessibleObjects.
@albertvaka, could you please check if it is correct? And also please add unit tests for it if it is possible.

@RussKie RussKie added the waiting-author-feedback The team requires more information from the author label Oct 22, 2020
@ghost ghost removed the waiting-author-feedback The team requires more information from the author label Oct 25, 2020
@RussKie
Copy link
Contributor

RussKie commented Oct 26, 2020

Please add unit tests. Thank you.

@RussKie RussKie added the waiting-author-feedback The team requires more information from the author label Oct 26, 2020
@ghost ghost removed the waiting-author-feedback The team requires more information from the author label Oct 26, 2020
Copy link
Contributor

@RussKie RussKie left a comment

Choose a reason for hiding this comment

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

:shipit:

@RussKie
Copy link
Contributor

RussKie commented Oct 27, 2020

@msftbot merge if @vladimir-krestov approves

@ghost ghost added the :octocat: automerge label Oct 27, 2020
@ghost
Copy link

ghost commented Oct 27, 2020

Hello @RussKie!

Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:

If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you".

@vladimir-krestov
Copy link
Contributor

The code is fine, I need to do some tests.

@ghost ghost merged commit 62e330d into dotnet:master Oct 27, 2020
@vladimir-krestov
Copy link
Contributor

All right! Thank you 😊

@RussKie RussKie added this to the 6.0 Preview1 milestone Oct 27, 2020
@albertvaka albertvaka deleted the albertvaka/keyboardfocusable-updowns branch October 27, 2020 13:12
@albertvaka
Copy link
Contributor Author

albertvaka commented Oct 30, 2020

[Unrelated to this change] While testing this PR I found a small change was needed to the arcade repo for NativeTests to build and I sent a PR that's not getting reviewed. If you folks can give it a look, here it is: dotnet/arcade#6462

@RussKie
Copy link
Contributor

RussKie commented Oct 30, 2020 via email

@albertvaka
Copy link
Contributor Author

albertvaka commented Oct 30, 2020

It's installed separately and I'm using the latest one. Maybe some versions of CMake accept an empty source dir and default to . and because of that it was working by chance before? In any case, I think the MSBuild file is actually missing that dependency so the source dir gets properly defined.

@ghost ghost locked as resolved and limited conversation to collaborators Feb 11, 2022
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

4 participants