Commit Graph

29 Commits

Author SHA1 Message Date
e1919cab83 components: FullScreenPicker takes an optional actions slot
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) <noreply@anthropic.com>
2026-07-07 14:23:07 +02:00
55ad536513 identity: add Modifier.animateContentSizeMotion()
Eases a composable's own height/size changes on the family's M3 Expressive
spatial motion scheme (fastSpatialSpec) instead of jumping — e.g. a text
field that wraps to a new line, or a value swapped for a longer one. Snaps
under reduced motion, like the other identity motion helpers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 10:55:57 +02:00
cded44207c core-time: add LocalDate.isoWeekNumber() (ISO-8601 week-of-year)
Centralises the calendar-week-number computation — ISO-8601
week-of-week-based-year (Monday-start, week 1 holds the first Thursday) —
that Calendula previously inlined identically in its Week and Month grid
headers. Names the scheme choice (there are several incompatible "week
number" definitions) and covers the year-boundary rollover cases with a
unit test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 10:14:20 +02:00
5a576c4d28 components: FullScreenPicker uses the pinned bar
Completes the picker upstream: FullScreenPicker now passes largeTopBar=false
to CollapsingScaffold, so the family's selection pickers sit under a pinned
single-line bar instead of a tall collapsing header (the short list has nothing
to scroll past). Matches Calendula's scrollable-picker fix; applies family-wide.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 21:47:17 +02:00
2e47271904 docs: multi-value reminders + new components; drop stray README conflict marker
Record core-reminders (multi-value) and the new components in CHANGELOG,
README module table and the ROADMAP extracted list; clarify that only the
reminder *scheduler* stays app-local. Also removes a leftover '>>>>>>> origin/main'
merge-conflict marker committed in README by an earlier merge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 21:11:25 +02:00
89e3deb9f6 components: extract ReorderableColumn + DebugRibbon
Family-generic widgets upstreamed from Calendula: ReorderableColumn (a
dependency-free drag-to-reorder for the short grouped-card Settings lists; pairs
with GroupedRow(gapBelow=false)) and DebugRibbon (a stark un-themed DEBUG corner
ribbon).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 21:11:25 +02:00
53217f139e components: largeTopBar, gapBelow, enabled
CollapsingScaffold gains largeTopBar (false = pinned single-line bar, the
picker variant); GroupedSurface/GroupedRow gain gapBelow to suppress the 2dp
inter-row gap for a caller that owns spacing; InlineTextField gains enabled
(disabled dims to a locked value). All additive, defaults preserve behaviour.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 21:11:25 +02:00
bd874c2586 core-reminders: multi-value reminder overrides
ReminderOverride.Minutes now carries a List<Int> of lead times so a target
can hold several reminders at once; an app that offers a single reminder uses a
one-element list. Map helpers move to Map<Long, List<Int>> (empty list = explicit
None), and the codec gains a third (list) separator while single legacy values
round-trip byte-identically. Adds reminderOverrideForMinutes/normalizeReminders/
reminderLeadsFor. Upstreamed from Calendula's per-calendar multi-reminders.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 21:11:24 +02:00
566caf4305 Merge origin/main: component superset alongside core-time date util
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 22:07:10 +02:00
d9e4e877cc components: grow GroupedRow + CollapsingScaffold + pickers to the family superset
Promote the richer variants Calendula had kept app-local into the shared kit, as
backward-compatible additions (every new parameter defaults to the prior
behaviour, so Agendula's call sites are unchanged):

- GroupedRow: add `dimmed` (fade headline/summary to M3 disabled emphasis while
  the trailing control stays live — for present-but-off rows) and `container`
  (tonal-colour override, e.g. a category tint).
- CollapsingScaffold: add `actions` (trailing app-bar items), `snackbarHost`,
  and opt-in `predictiveBack` (wires the back-gesture preview to onBack for
  full-screen surfaces that want it).
- FullScreenPicker: thread opt-in `predictiveBack` to the scaffold, and apply
  SOFT_INPUT_ADJUST_NOTHING so a picker's own imePadding lifts the focused field
  instead of leaving a black gap above the keyboard.
- OptionPicker: forward `predictiveBack` and add an optional `header` slot above
  the option rows.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 20:49:34 +02:00
aee26a28f3 core-time: add formatDateTimeCompact for dense list rows
Drops the year in the current year and drops the time when it carries no information (all-day items or a midnight time), so list rows show glanceable dates like "20 Jun" or "20 Jun · 14:30".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 20:47:25 +02:00
86f44805d1 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	README.md
2026-06-28 19:20:30 +02:00
09d3f9b934 components: add AboutCard + LanguagePickerRow settings recipes
AboutCard — logo slot + app name/author, a row of outlined link buttons and an
optional tonal highlight link (each opens its URL). LanguagePickerRow — a
GroupedRow that opens the full-screen language picker, backed by core-locale's
AppLanguage. Both parameterized so each app keeps its own strings, logo and row
icon. Adds the components -> core-locale dependency.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 15:24:17 +02:00
24ada183e2 components: add OptionalFormSection (revealable form section)
The shared wrapper for optional edit-form fields behind a "More fields" toggle:
AnimatedVisibility with the family's expand+fade motion over a full-width Column.
Adds the first intra-kit dependency (components -> identity) for the shared
transitions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 15:17:57 +02:00
1e36c229ca components: add DialogControls (DialogAmountField + DialogUnitDropdown)
The tonal 3-digit amount input and unit dropdown shared by the custom
reminder/recurrence steps — the family's InlineTextField over a tonal surface,
matching the card/grouped-row language. Drawn from Calendula.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 15:15:08 +02:00
ea96e970c7 identity: add the shared content transitions
expandEnter/collapseExit (revealable sections), itemEnter (resolved content),
animateItemMotion (lazy-list relayout) and fadeThrough — all driven by the M3
Expressive motion scheme and honouring rememberReduceMotion. Drawn from
Calendula's motion helpers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 15:13:06 +02:00
2085b82a5e identity: add the shared predictive-back peek (Modifier.predictiveBack)
The standard Android back-gesture preview — the surface scales to ~90%, rounds
its corners and shifts toward the swiped edge as the gesture is dragged, then
commits or springs back. Plus rememberReduceMotion() to honour the system
"remove animations" setting. Drawn from Calendula's CalendarTransitions so both
apps preview back the same way; adds the activity-compose dependency.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 14:31:11 +02:00
10e0ca0b06 components: add the shared onboarding scaffold recipe
OnboardingScaffold (scrollable hero + body, CTAs pinned to the bottom),
BenefitRow and the OnboardingSpace scale — identical across Agendula and
Calendula. The hero is a slot, so each app keeps its own mark.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 14:16:48 +02:00
4eb9809993 core-locale: shared per-app language plumbing (AppLanguage)
Android-library module, drawn from the byte-identical AppLanguage in Agendula
and Calendula: read the shipped languages from res/xml/locales_config.xml,
get/set the applied language via AppCompatDelegate, and render each language's
autonym. The locales_config resource id is now a parameter, so the module is
app-agnostic. appcompat only, no Compose.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 14:12:16 +02:00
367a8ff8af core-reminders: shared reminder-lead plumbing (ReminderUnit, override model + codec)
Pure-Kotlin module, drawn from the duplicate reminder logic in Agendula and
Calendula: the lead-time unit model (ReminderUnit / decomposeReminderMinutes),
the per-target override model (ReminderOverride + reminderLeadFor /
applyReminderOverride) and the stored-format codec (ReminderOverrideCodec).

The codec's separators are configurable so each app keeps its on-disk format
(Agendula stores id:minutes, Calendula id=minutes) without a data migration.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 14:11:55 +02:00
25ec248e73 docs: changelog, docs/ set, CONTRIBUTING, LICENSE
Bring floret-kit up to the family's repo conventions:
- CHANGELOG.md (Keep a Changelog) — what each module added.
- README.md — full module table (core-time/core-crash/identity/components) +
  consumption notes and a docs index.
- docs/README.md (index), docs/ARCHITECTURE.md (module layering, the submodule +
  composite-build consumption model, JVM vs android-library, the reproducibility
  rules, the share-mechanics-not-look contract), docs/ROADMAP.md (extracted vs
  deferred vs deliberately-not-shared, from the cross-app survey).
- CONTRIBUTING.md — the no-app-coupling rules, how to add a module, how an app
  adopts the kit.
- LICENSE (MIT, matching the apps).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 13:42:53 +02:00
0db0e3883f components: add CollapsingScaffold + OptionPicker/FullScreenPicker (batch-2)
The family's collapsing settings/sub-screen scaffold and the full-screen
single-select picker built on it (used for theme/list/reminder option dialogs).
Adds material-icons-core (ArrowBack/Check) and a generic 'back' string apps can
override. ReminderFormatting (labels over app-specific R.plurals + per-app
presets) deliberately NOT included — it needs a label-callback API, a separate
pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 13:24:08 +02:00
1bd3e03ad5 components: shared Compose vocabulary (GroupedSurface, InlineTextField, OptionCard, pastelize)
Phase 4 (components). The family's canonical grouped-row primitive
(GroupedSurface/GroupedRow + Position/positionOf, press-morphing tonal
container), the borderless InlineTextField (capitalization parameterized),
the OptionCard selection-dialog pick, and the pastelize() colour softener.
All app-agnostic (no R, no domain) and taken from Agendula's versions as the
canonical reference per design sign-off; apps keep their own identity chips
and compose their own screens from these. android-library, Compose-only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 13:06:34 +02:00
dccf934172 identity: shared M3 Expressive theme factory + nav slide spec
FloretExpressiveTheme(lightScheme, darkScheme, darkTheme, dynamicColor,
typography) holds the family's theme mechanics — dynamic-colour resolution
(API 31+), system light/dark fallback, and the STANDARD motion scheme — while
each app supplies its own seed-derived colour schemes, so the look stays
per-app and the machinery is shared. rememberNavSlideSpec() shares the fast
spatial nav slide. android-library, Compose-only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 12:57:27 +02:00
19c2f8a677 core-crash: shared on-device crash capture + report dialog
First Android-library module in the kit. Privacy-respecting crash capture
(writes a self-contained, allowlist-only report to private storage, chains to
the platform handler, uploads nothing), startup crash-loop detection, a report
dialog showing the full text before it leaves the device, and an issue-tracker
hand-off. Extracted from Calendula and generalised: app label + issue URLs come
from a CrashConfig supplied at install(); each app keeps its own thin themed
CrashReportActivity. Lean deps (Compose + core-ktx). 3 unit tests on the pure
report builder.

Adds AGP/android-library + compose plugins and the compose/core-ktx libs to the
kit catalog; core-time stays a plain JVM module.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 12:15:41 +02:00
554d536b2f settings: reword toolchain note to keep the 'foojay' token out of source
Calendula scans its whole source tree (incl. this submodule) for the literal
token as a reproducibility guard; the explanatory comment shouldn't trip it.
No behavioural change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-27 23:45:28 +02:00
39cdfbcb71 settings: drop foojay toolchain resolver (reproducible-build safe)
Calendula consumes the kit as an included build and publishes via official
F-Droid reproducible builds, whose offline source scanner rejects the foojay
toolchain resolver (it can fetch a JDK at build time). The kit never used a
Java toolchain block — modules set jvmTarget directly — so the resolver was
dead weight that would have broken Calendula's reproducibility invariant.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-27 23:44:31 +02:00
7efad77fde core-time: add TimeBridge (Instant <-> epoch millis)
Generic content-provider time bridge shared by the family: Long epoch millis
<-> kotlin.time.Instant. Extracted from Calendula for Phase 1 (Calendula as the
second core-time consumer). 3 unit tests; module suite now 5 green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-27 23:37:25 +02:00
d3ae83f1a4 core-time: shared date/time helpers (DayWindow + Instant formatting)
First module of floret-kit, the shared Material 3 Expressive design system +
plumbing for the Floret app family. core-time is a pure-Kotlin JVM library
(DayWindow local-day boundaries + locale/zone-aware Instant formatting),
extracted from Agendula. Standalone build + 2 unit tests green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-27 23:23:45 +02:00