From e1919cab83649d1c30a6bd8c7134e8b093156f35 Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Tue, 7 Jul 2026 14:23:07 +0200 Subject: [PATCH] components: FullScreenPicker takes an optional actions slot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Forwards a trailing app-bar `actions` lambda through to CollapsingScaffold, so a full-screen picker can carry a commit/extra action — a custom-value Add/OK, a Reset — instead of being select-and-dismiss only. Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 4 +++- .../de/jeanlucmakiola/floret/components/OptionPicker.kt | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 322d9ac..e764e48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,7 +46,9 @@ are no binary releases; "version" tracks the shared `version` in the root build `largeTopBar = false` for a pinned single-line bar (the picker variant). - `FullScreenPicker` / `OptionPicker` — the full-screen single-select picker, now over a pinned single-line bar (a picker is a short list, so no tall - collapsing header to scroll past). + collapsing header to scroll past). `FullScreenPicker` takes an optional + `actions` slot (app-bar trailing items) for pickers that carry a commit or + extra action — a custom-value **Add**/**OK**, a **Reset**. - `ReorderableColumn` — dependency-free drag-to-reorder for the short, fixed grouped-card Settings lists; pairs with `GroupedRow(gapBelow = false)`, which hands the column uniform control of row spacing. diff --git a/components/src/main/kotlin/de/jeanlucmakiola/floret/components/OptionPicker.kt b/components/src/main/kotlin/de/jeanlucmakiola/floret/components/OptionPicker.kt index 722827c..c22afa1 100644 --- a/components/src/main/kotlin/de/jeanlucmakiola/floret/components/OptionPicker.kt +++ b/components/src/main/kotlin/de/jeanlucmakiola/floret/components/OptionPicker.kt @@ -2,6 +2,7 @@ package de.jeanlucmakiola.floret.components import android.view.WindowManager import androidx.compose.foundation.layout.ColumnScope +import androidx.compose.foundation.layout.RowScope import androidx.compose.material.icons.Icons import androidx.compose.material.icons.rounded.Check import androidx.compose.material3.Icon @@ -25,6 +26,7 @@ fun FullScreenPicker( title: String, onDismiss: () -> Unit, predictiveBack: Boolean = false, + actions: @Composable RowScope.() -> Unit = {}, content: @Composable ColumnScope.() -> Unit, ) { Dialog( @@ -48,6 +50,7 @@ fun FullScreenPicker( onBack = onDismiss, largeTopBar = false, predictiveBack = predictiveBack, + actions = actions, content = content, ) }