Skip to content

[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

Merged
merged 8 commits into from
Jun 28, 2025

Conversation

Dhruv-Mishra
Copy link
Collaborator

@Dhruv-Mishra Dhruv-Mishra commented Jun 19, 2025

Problem

Fixed the Following Problems with Fluent Native Controls:

[Fluent Native controls] [Android] [V2 BottomSheet]: Name is not defined for the controls.
[Fluent Native controls] [Android] [V2 Menu] : After applying Resize, Text is not visible clearly.
[Fluent Native controls] [Android] [V2 Scaffold]: After applying Resize, Show Snackbar Button is not visible.

Screenshots

Before After
image
image
image
image

Pull request checklist

This PR has considered:

  • Light and Dark appearances
  • Automated Tests
  • Documentation and demo app examples
  • VoiceOver and Keyboard Accessibility
  • Internationalization and RTL layouts
  • Size classes and window sizes (notched devices, multitasking, different window sizes, etc)

@Copilot Copilot AI review requested due to automatic review settings June 19, 2025 09:03
@Dhruv-Mishra Dhruv-Mishra requested a review from a team as a code owner June 19, 2025 09:03
Copy link
Contributor

@Copilot 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 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 with FlowRow in V2ScaffoldActivity 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 a Modifier 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 to FlowRow but haven't imported it. Add import androidx.compose.foundation.layout.FlowRow (and the correct experimental layout import) to avoid compilation errors.
            FlowRow(

Dhruv-Mishra and others added 3 commits June 19, 2025 14:36
…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>
@Dhruv-Mishra Dhruv-Mishra merged commit 49c55fd into master Jun 28, 2025
2 checks passed
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