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

DataGridRows not accessible in Release mode #3079

Closed
DanielGlick opened this issue Dec 12, 2019 · 12 comments
Closed

DataGridRows not accessible in Release mode #3079

DanielGlick opened this issue Dec 12, 2019 · 12 comments
Assignees
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior DataGrid 🔠 Issues on DataGrid control help wanted Issues identified as good community contribution opportunities
Milestone

Comments

@DanielGlick
Copy link

DanielGlick commented Dec 12, 2019

Describe the bug

DataGridRows are not able to be recognized when running UITests when the app is deployed in release mode. This is a problem for me because I need to run the app in release mode to make sure I test closest to what the customer will be getting in my app.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Run the attached project in Release mode
    ReleaseDataGrid.zip
  2. Open the Inspect

tool or Windows accessibility insights
3. Hover over the first column and first row
BUG 1

  1. Click the first row in the first column
    BUG 2

This can also be done by deploying the app in release, then running the uitest located in UnitTest1 in the UITests project in debug.
NOTE: You must have Windows Application Driver running for the uitest to run

Expected behavior

  1. It should highlight that control and tell me that it is a DataGridRow or something like that
  2. It highlights the data item but in the tree it is not where I expect it to be. It should be in

If you run the uitest it will fail because it could not find the row

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

NuGet Package(s): 

Package Version(s): 

Windows 10 Build Number:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ x ] May 2019 Update (18362)
- [ ] Insider Build (build number: )

App min and target version:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ x ] October 2018 Update (17763)
- [] May 2019 Update (18362)
- [ ] Insider Build (xxxxx)

Device form factor:
-Desktop

Visual Studio 
- 2019

## Additional context
Add any other context about the problem here.
@DanielGlick DanielGlick added the bug 🐛 An unexpected issue that highlights incorrect behavior label Dec 12, 2019
@ghost ghost added the needs triage 🔍 label Dec 12, 2019
@Kyaa-dost Kyaa-dost added DataGrid 🔠 Issues on DataGrid control and removed needs triage 🔍 labels Dec 16, 2019
@michael-hawker
Copy link
Member

michael-hawker commented Dec 18, 2019

FYI @anawishnoff @RBrid

@DanielGlick
Copy link
Author

Any update on this?

@DanielGlick
Copy link
Author

@michael-hawker Can I get an update on this?

@anawishnoff
Copy link

@RBrid Any ideas on this bug?

@RBrid
Copy link
Contributor

RBrid commented Jan 29, 2020

No idea unfortunately. I ran the Windows Community Toolkit Sample App and Windows' Narrator. Narrator just says "selected" or "non-selected" when navigating to a row, even though we have a DataGridRowAutomationPeer class. A deep dive would be needed to get to the bottom of this.

@michael-hawker michael-hawker added this to the 6.1 milestone Jan 30, 2020
@michael-hawker
Copy link
Member

@RBrid @anawishnoff this might be a regression? As it appears some work was done in the past for this, see #2233. I dug up commits for these changes and commented here.

@DanielGlick
Copy link
Author

@RBrid any update on this? This is pretty important to us to get done so we can finish our UWP ui testing in the datagrid.

@michael-hawker
Copy link
Member

@DanielGlick45 Régis works on the WinUI team who manage the DataGrid, but they're heads down with WinUI3. If you have some cycles and could test out anything related to the information I dug-up above, that'd be much appreciated.

If you do discover any of the code can be tweaked to resolve the issue, please open a PR and we can get this into our 6.1 release in May.

@michael-hawker michael-hawker added the help wanted Issues identified as good community contribution opportunities label Apr 17, 2020
@anawishnoff
Copy link

@DanielGlick45 are you still facing this issue?

@Kyaa-dost
Copy link
Contributor

@DanielGlick45 please let us know if you are still having any issues with this and if not we can close the issue.

@Kyaa-dost Kyaa-dost modified the milestones: 6.1, 7.0 Jun 22, 2020
ghost pushed a commit that referenced this issue Aug 5, 2020
…HEADER_stateNormalEditingRowFocused typo (#3366)

Fixes #3355 - Fixes a typo in the DataGrid's row header NormalEditingRowFocused state - there was an incorrect space in the name.

Also regarding Issue #3079, I improved the experience navigating through cells/rows with Narrator using the Caps Lock + Arrow keys. Instead of "Selected" / "Not Selected", Narrator will say "Row" "Selected" /  "Row" "Not Selected" when visiting a row.  Use the Caps Lock + Right Arrow for instance to experience this. The relevant change was made in DataGridItemAutomationPeer::GetNameCore.

## PR Type
What kind of change does this PR introduce?
- Bugfix

## What is the current behavior?
The NormalEditingRow state was not entered. This was not detected earlier because row headers have no visuals by default.

## What is the new behavior?
The NormalEditingRow state is entered.


## PR Checklist
Please check if your PR fulfills the following requirements:

- [X] Tested code with current [supported SDKs](../readme.md#supported)
- [ ] Pull Request has been submitted to the documentation repository [instructions](..\contributing.md#docs). Link: <!-- docs PR link -->
- [ ] Sample in sample app has been added / updated (for bug fixes / features)
    - [ ] Icon has been created (if new sample) following the [Thumbnail Style Guide and templates](https://github.com/windows-toolkit/WindowsCommunityToolkit-design-assets)
- [ ] Tests for the changes have been added (for bug fixes / features) (if applicable)
- [ ] Header has been added to all new source files (run *build/UpdateHeaders.bat*)
- [X] Contains **NO** breaking changes

## Other information
Regarding Issue #3079:
- I am adding a few commented out logs in the automation files for future debugging.
- I did not see any behavior difference between a retail and debug version of the product.
- I installed and ran "C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe" as instructed but could not get the app's test to run. 
- I installed and used "Accessibility Insights for Windows" - it will show "data item - 'row'" for the currently hovered row.
@michael-hawker
Copy link
Member

@RBrid I noticed you made a comment in your PR to this issue, is this issue now resolved or is there a bit more work here to be done?

@RBrid
Copy link
Contributor

RBrid commented Aug 6, 2020

@michael-hawker, let's close this issue. I could not detect any behavior difference between Release and Debug, and Narrator now says "Row Selected" / "Row unselected". All the automation peers seem to be used as expected.

@RBrid RBrid closed this as completed Aug 6, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Oct 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior DataGrid 🔠 Issues on DataGrid control help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

No branches or pull requests

5 participants