Skip to content

Conversation

@MartinZikmund
Copy link
Member

GitHub Issue: closes #

PR Type:

What is the current behavior? πŸ€”

What is the new behavior? πŸš€

PR Checklist βœ…

Please check if your PR fulfills the following requirements:

Other information ℹ️

Copilot AI review requested due to automatic review settings September 24, 2025 14:27
@MartinZikmund MartinZikmund changed the title feat: Improve automation peers coverage [WIP] feat: Improve automation peers coverage Sep 24, 2025
@MartinZikmund MartinZikmund marked this pull request as draft September 24, 2025 14:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR aims to improve automation peers coverage by adding comprehensive UI Automation support types and expanding the AutomationProperties class. The changes introduce several new enumerations and significantly enhance the accessibility infrastructure for the Uno Platform.

  • Introduces new automation-related enumerations for text formatting, styles, and UI element classification
  • Significantly expands the AutomationProperties class with additional attached properties and getter/setter methods
  • Moves existing AutomationProperties functionality to a separate .old.cs file while maintaining the core implementation

Reviewed Changes

Copilot reviewed 14 out of 25 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
TextUnit.cs Defines text navigation units (character, word, line, etc.)
TextPatternRangeEndpoint.cs Specifies text range endpoints (start/end)
AutomationTextDecorationLineStyle.cs Comprehensive text decoration styles enumeration
AutomationStyleId.cs Document style identifiers (headings, normal text, etc.)
AutomationProperties.old.cs Legacy AutomationProperties implementation preserved
AutomationProperties.cs Significantly expanded with new attached properties and comprehensive documentation
AutomationOutlineStyles.cs Text outline style enumeration
AutomationFlowDirections.cs Text flow direction enumeration
AutomationCaretPosition.cs Caret position enumeration
AutomationCaretBidiMode.cs Bidirectional caret mode enumeration
AutomationBulletStyle.cs Bullet list style enumeration
AutomationAnimationStyle.cs Text animation style enumeration
AutomationActiveEnd.cs Text selection active end enumeration
AnnotationType.cs Document annotation type enumeration

ο»Ώusing System.Collections.Generic;
using Uno.UI;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Automation.Peers;
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

The file is missing several using statements that are used throughout the class. Add using Microsoft.UI.Xaml; and using Microsoft.UI.Xaml.Data; to match the imports from the original file and support the types used in the property definitions.

Suggested change
using Microsoft.UI.Xaml.Automation.Peers;
using Microsoft.UI.Xaml.Automation.Peers;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Data;

Copilot uses AI. Check for mistakes.
/// Provides attached properties that expose UI Automation metadata for elements.
/// Based on Microsoft Learn: AutomationProperties (Microsoft.UI.Xaml.Automation).
/// </summary>
public partial class AutomationProperties
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

The class declaration should include the [Bindable] attribute that was present in the original implementation to maintain compatibility with data binding scenarios.

Copilot uses AI. Check for mistakes.
"Name",
typeof(string),
typeof(AutomationProperties),
new FrameworkPropertyMetadata(string.Empty, OnNamePropertyChanged)
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

The OnNamePropertyChanged method is referenced but not defined in this file. Either implement this method or remove the callback reference to prevent compilation errors.

Copilot uses AI. Check for mistakes.
@unodevops
Copy link
Contributor

πŸ€– Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21518/docs/index.html

@unodevops
Copy link
Contributor

πŸ€– Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21518/docs/index.html

@unodevops
Copy link
Contributor

πŸ€– Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21518/docs/index.html

@unodevops
Copy link
Contributor

πŸ€– Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21518/docs/index.html

@unodevops
Copy link
Contributor

πŸ€– Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21518/docs/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants