From 4de9711a312b9ad291b5c54cf6c5a57ba7199190 Mon Sep 17 00:00:00 2001 From: Martin Guillon Date: Thu, 29 Oct 2026 09:37:29 +0100 Subject: [PATCH 1/4] feat(ui): use the primary button of the design system in the card sheets The add button of the create card and extra field sheets is the primary button: a 44 tall glass capsule on iOS, a 40 tall filled pill on Android. The delete buttons of the card edit sheet use the error color. Co-Authored-By: Claude Sonnet 5.5 --- app/app.android.scss | 5 +++++ app/app.ios.scss | 5 +++++ app/components/view/CardEditSheet.svelte | 4 ++-- app/components/widgets/CreateCard.svelte | 2 +- app/components/widgets/ExtraFieldPicker.svelte | 2 +- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/app/app.android.scss b/app/app.android.scss index b10ec458..5976d154 100644 --- a/app/app.android.scss +++ b/app/app.android.scss @@ -2,3 +2,8 @@ checkbox { margin-right: 0; } + +// the primary button is a 40 tall pill +button[variant='contained'] { + height: 40; +} diff --git a/app/app.ios.scss b/app/app.ios.scss index c1ca6c25..33d2cc61 100644 --- a/app/app.ios.scss +++ b/app/app.ios.scss @@ -74,3 +74,8 @@ textfield[variant='none'] { font-size: 30; font-weight: 700; } + +// the primary button is a 44 tall capsule +button[variant='prominentGlass'] { + height: 44; +} diff --git a/app/components/view/CardEditSheet.svelte b/app/components/view/CardEditSheet.svelte index 3717c63b..5f2621a6 100644 --- a/app/components/view/CardEditSheet.svelte +++ b/app/components/view/CardEditSheet.svelte @@ -190,13 +190,13 @@ diff --git a/app/components/widgets/CreateCard.svelte b/app/components/widgets/CreateCard.svelte index 52b96c6b..918a4e4b 100644 --- a/app/components/widgets/CreateCard.svelte +++ b/app/components/widgets/CreateCard.svelte @@ -101,5 +101,5 @@ visibility={code?.length && !validCode ? 'visible' : 'collapse'} /> - 0} row={5} text={lc('add')} variant="text" on:tap={add} /> + 0} row={5} text={lc('add')} variant={__IOS__ ? 'prominentGlass' : 'contained'} on:tap={add} /> diff --git a/app/components/widgets/ExtraFieldPicker.svelte b/app/components/widgets/ExtraFieldPicker.svelte index 5a5a7702..7407659b 100644 --- a/app/components/widgets/ExtraFieldPicker.svelte +++ b/app/components/widgets/ExtraFieldPicker.svelte @@ -143,5 +143,5 @@ on:tap={(e) => selectDate(e)} /> - + From 3e13781dc25e440d96e761ed399f1141c2dde8c8 Mon Sep 17 00:00:00 2001 From: Martin Guillon Date: Thu, 29 Oct 2026 09:42:15 +0100 Subject: [PATCH 2/4] feat(ui): give the card sheets the header of the design system A shared sheet header: iOS has a glass Cancel pill, the centered title and a prominent action; Android a close icon, the title and a text action. The create card, extra field and card edit sheets use it, so their add button leaves the bottom of the sheet, and the color of a new card moves to its own row. Co-Authored-By: Claude Sonnet 5.5 --- app/components/common/SheetHeader.svelte | 26 +++++++++ app/components/view/CardEditSheet.svelte | 7 +-- app/components/widgets/CreateCard.svelte | 57 ++++++++++++------- .../widgets/ExtraFieldPicker.svelte | 49 ++++++++-------- 4 files changed, 89 insertions(+), 50 deletions(-) create mode 100644 app/components/common/SheetHeader.svelte diff --git a/app/components/common/SheetHeader.svelte b/app/components/common/SheetHeader.svelte new file mode 100644 index 00000000..bba87616 --- /dev/null +++ b/app/components/common/SheetHeader.svelte @@ -0,0 +1,26 @@ + + + + + {#if __IOS__} + + diff --git a/app/components/view/CardEditSheet.svelte b/app/components/view/CardEditSheet.svelte index 5f2621a6..2aab2342 100644 --- a/app/components/view/CardEditSheet.svelte +++ b/app/components/view/CardEditSheet.svelte @@ -2,6 +2,7 @@ import { lc } from '@nativescript-community/l'; import { Template } from '@nativescript-community/svelte-native/components'; import { TextField } from '@nativescript-community/ui-textfield'; + import SheetHeader from '~/components/common/SheetHeader.svelte'; import { showBottomSheet } from '@nativescript-community/ui-bottomsheet/svelte'; import { showError } from '@shared/utils/showError'; import dayjs from 'dayjs'; @@ -166,11 +167,7 @@ - - close(false)} /> - + close(false)} onDone={save} title={lc('edit')} />