Skip to content

[Fabric] add support for enableFocusRing - #11323

Merged
Andrew Coates (acoates-ms) merged 5 commits into
microsoft:mainfrom
acoates-ms:fabricEnableFocusRing
Mar 7, 2023
Merged

[Fabric] add support for enableFocusRing#11323
Andrew Coates (acoates-ms) merged 5 commits into
microsoft:mainfrom
acoates-ms:fabricEnableFocusRing

Conversation

@acoates-ms

@acoates-ms Andrew Coates (acoates-ms) commented Mar 1, 2023

Copy link
Copy Markdown
Contributor

Description

enableFocusRing is a property to display native focus visualization. This adds support for that property. For now, it's using a simple black rect. In future this should be updated to align with windows visuals (Ex: rounded rect with black/white border)

This involved creating an extra container visual around views so that the focus rect can be outside the views clip (Ex: a view with a rounded rect would clip the focus rect if the focus rect was within the view's visual)

Also fixed some logic in the walkTree method, now that I can see focus it became clearer that I completely messed up the first implementation.

Added handling of the focus command, so now ref.focus() works.

Microsoft Reviewers: Open in CodeFlow

@acoates-ms Andrew Coates (acoates-ms) added the Area: Fabric Support Facebook Fabric label Mar 1, 2023
@acoates-ms Andrew Coates (acoates-ms) added the AutoMerge Causes a PR to be automatically merged once all requirements are passed (label drives bot activity) label Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Fabric Support Facebook Fabric AutoMerge Causes a PR to be automatically merged once all requirements are passed (label drives bot activity) New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants