-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Added automation peer class for carousel and item #3507
Conversation
Thanks jamesmcroft for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌 |
Microsoft.Toolkit.Uwp.UI.Controls/Carousel/CarouselAutomationPeer.cs
Outdated
Show resolved
Hide resolved
Microsoft.Toolkit.Uwp.UI.Controls/Carousel/CarouselItemAutomationPeer.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.
Good catch and fix. For the visually impaired this would make the coracle usable.
Hello @michael-hawker! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
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.
Couple of questions/concerns around the strong reference and why we can't just use SelectedItem
from the parent?
Microsoft.Toolkit.Uwp.UI.Controls/Carousel/CarouselAutomationPeer.cs
Outdated
Show resolved
Hide resolved
Microsoft.Toolkit.Uwp.UI.Controls/Carousel/CarouselItemAutomationPeer.cs
Outdated
Show resolved
Hide resolved
….com/windows-toolkit/WindowsCommunityToolkit into jamesmcroft/3506-carousel-automation
@jamesmcroft looks like the test passed! 🎉🎉🎉 This all good to go now or is there anything else left you need to do? |
I had a quick skim through and I think everything is good unless there is something obvious I've missed 😅 I'm happy with the solution 👍 |
Thanks @jamesmcroft I think we're good on our end once you've resolved @chingucoding's comments. |
@msftbot merge once @chingucoding approves. |
Hello @michael-hawker! 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". |
Microsoft.Toolkit.Uwp.UI.Controls.Layout/Carousel/CarouselItemAutomationPeer.cs
Outdated
Show resolved
Hide resolved
@jamesmcroft want to reply/address @chingucoding's comments and we can close this out? 🙂 @chingucoding mind resolving any items that are now all good for the comments? |
Unfortunately, GitHub doesn't let me resolve my comments, only something the PR author can do apparently :( |
How extremely odd. I left them open because I didn't want to resolve your feedback 😞 |
That's very kind and thoughtful of you, thank you! 😊 |
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.
Thank you for adding the peers and making Carousel accessible! Looks good to me.
CI failed @jamesmcroft, can you take a look? |
@chingucoding I think something changed with the Carousel when I've merged in. I will take a look and get this sorted 😄 |
@michael-hawker I think the bot gave up on this PR can you merge this for us? |
Thanks @jamesmcroft and @chingucoding for being so thorough! This'll be a great example for us to template off of in the future! |
Thank you @jamesmcroft for being so patient with this and thank you @michael-hawker for adding the test infrastructure for the new tests! |
An absolute pleasure to both of you! Apologies that it has taken so long though. Definitely will be more on top of my PRs in the future 😅 |
Don't worry about that @jamesmcroft, there was some test infrastructure missing to get the tests up and running. |
Fixes #3506
Changes have been made to introduce an
AutomationPeer
for theCarousel
andCarouselItem
control to improve the ability for UI testing.PR Type
What kind of change does this PR introduce?
What is the current behavior?
When using a UI Automation tree tool, it is currently not possible to find the selected item of the
Carousel
as these properties are not exposed.What is the new behavior?
A
CarouselAutomationPeer
andCarouselItemAutomationPeer
has been added which is used by their respected control implementation in order to surface more automation properties.The change includes minor changes to the
Carousel
andCarouselItem
controls exposed as internal for use by the newAutomationPeer
classes.Below is the before and after of the UI Automation tree.
Before
After
As you can see from the after screenshot, the change surfaces up the
CarouselItem
within the UI Automation tree. This allows additional properties to propagate up such as the Selected state.PR Checklist
Please check if your PR fulfills the following requirements: