Skip to content

[Components] Update compose Picker to expose offset and properties of inner drop down menu#27

Merged
js-bonin merged 4 commits into
mainfrom
feature/update_picker_component_android
Jul 14, 2025
Merged

[Components] Update compose Picker to expose offset and properties of inner drop down menu#27
js-bonin merged 4 commits into
mainfrom
feature/update_picker_component_android

Conversation

@js-bonin

@js-bonin js-bonin commented Jul 10, 2025

Copy link
Copy Markdown
Member

I needed to tweak the offset and some properties from the inner DropDownMenu used si I am exposing those fields.

I also renamed itemColors to label since it represent the composable for the label and isn't related to colors at all I think (although that would be a breaking change so I can let it go but the name seemed odd)

@js-bonin js-bonin requested review from Copilot and npresseault July 10, 2025 19:53
@js-bonin js-bonin changed the title [Components] Update Picker to expose offset and properties of inner drop down menu [Components] Update compose Picker to expose offset and properties of inner drop down menu Jul 10, 2025

Copilot AI left a comment

Copy link
Copy Markdown

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 exposes the inner dropdown’s position and popup properties on PilotPicker and renames the selected-label composable parameter for clarity.

  • Added offset: DpOffset and properties: PopupProperties parameters to the dropdown
  • Renamed itemColors parameter to label (composable for the selected value)
  • Updated imports to accommodate new defaults and units
Comments suppressed due to low confidence (2)

components/android/material3/src/main/kotlin/com/mirego/pilot/components/ui/material3/PilotPicker.kt:21

  • Please update or add KDoc for PilotPicker to document the new offset and properties parameters, explaining their default behavior and usage.
public fun <LABEL : Any, ITEM : Any> PilotPicker(

components/android/material3/src/main/kotlin/com/mirego/pilot/components/ui/material3/PilotPicker.kt:48

  • Consider adding or updating unit or UI tests to verify that the exposed offset and properties parameters are applied correctly in the dropdown menu.
            offset = offset,

import androidx.compose.material3.DropdownMenu
import androidx.compose.material3.DropdownMenuItem
import androidx.compose.material3.MenuDefaults
import androidx.compose.material3.MenuDefaults.itemColors

Copilot AI Jul 10, 2025

Copy link

Choose a reason for hiding this comment

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

The static import of MenuDefaults.itemColors is no longer used (you still call MenuDefaults.itemColors()); consider removing this import to clean up unused code.

Suggested change
import androidx.compose.material3.MenuDefaults.itemColors

Copilot uses AI. Check for mistakes.

@npresseault npresseault left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Document:
Breaking change: itemColors -> label

@npresseault npresseault left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All good, dont forget to dump new API

@js-bonin js-bonin merged commit 34e311f into main Jul 14, 2025
1 check passed
@js-bonin js-bonin deleted the feature/update_picker_component_android branch July 14, 2025 13:40
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.

4 participants