-
Notifications
You must be signed in to change notification settings - Fork 116
[Fluent V2] Fixes for Fluent Native Controls #789
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
Conversation
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.
Pull Request Overview
This PR addresses several UI and accessibility issues in Fluent Native Android V2 controls by adding semantic labels, updating layout defaults, and ensuring text visibility after resize.
- Updated
ListContentBuilder
to provide default tokens and accessibility content descriptions. - Replaced
Row
withFlowRow
inV2ScaffoldActivity
under an experimental layout API. - Standardized input widths and line limits in
V2MenuActivity
to keep text visible and avoid overflow.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
fluentui_listitem/src/main/java/com/microsoft/fluentui/tokenized/contentBuilder/ListContentBuilder.kt | Default token parameters made non-null and semantics added for accessibility. |
FluentUI.Demo/src/main/java/com/microsoft/fluentuidemo/demos/V2ScaffoldActivity.kt | Swapped Row for FlowRow and added @OptIn(ExperimentalLayoutApi::class) . |
FluentUI.Demo/src/main/java/com/microsoft/fluentuidemo/demos/V2MenuActivity.kt | Introduced titleMaxLines and a fixed width fraction for input fields. |
Comments suppressed due to low confidence (3)
fluentui_listitem/src/main/java/com/microsoft/fluentui/tokenized/contentBuilder/ListContentBuilder.kt:105
- Since the default value is always a new
TabItemTokens()
instance, consider making this parameter non-nullable (tabItemTokens: TabItemTokens = TabItemTokens()
) to simplify the API and remove unnecessary nullability.
tabItemTokens: TabItemTokens? = TabItemTokens()
fluentui_listitem/src/main/java/com/microsoft/fluentui/tokenized/contentBuilder/ListContentBuilder.kt:286
- The closing brace before the
.semantics
call looks misaligned and may end the wrong scope. Ensure that.semantics
is chained directly on aModifier
instance, not on a lambda or block closure, to avoid syntax errors.
.semantics {
FluentUI.Demo/src/main/java/com/microsoft/fluentuidemo/demos/V2ScaffoldActivity.kt:175
- You switched from
Row
toFlowRow
but haven't imported it. Addimport androidx.compose.foundation.layout.FlowRow
(and the correct experimental layout import) to avoid compilation errors.
FlowRow(
...listitem/src/main/java/com/microsoft/fluentui/tokenized/contentBuilder/ListContentBuilder.kt
Outdated
Show resolved
Hide resolved
FluentUI.Demo/src/main/java/com/microsoft/fluentuidemo/demos/V2MenuActivity.kt
Outdated
Show resolved
Hide resolved
…ed/contentBuilder/ListContentBuilder.kt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…2MenuActivity.kt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Problem
Fixed the Following Problems with Fluent Native Controls:
Screenshots
Pull request checklist
This PR has considered: