feat(native): swipe rows, long-press menus, placeholders while loading, fading pictures, iOS bounce and app icon quick actions

Packing items, tasks and expenses swipe sideways to their actions, as in
Mail or Reminders: done or open one way, delete and edit the other, the
first one run by a full swipe. They are second ways to what each row
already offers; an expense still asks before it goes.

A long press on a trip card lifts it and opens its menu with the card's own
actions. Plain confirmations in MConfirmSheet now also ask through the
system where the app can.

Lists, the atlas and a journey show grey placeholders in their shape while
loading instead of a spinner in an empty screen (MSkeleton); buttons keep
theirs. A picture still loading fades in once it is there; one from the
cache shows at once. In the iOS app the page bounces at its ends again,
except on screens with pull-to-refresh, whose pull it would race; Android
keeps its stretch off.

On iOS a long press on the app icon offers "New trip" and the trip coming
up by its name, set by the UI in its language (TrekShell.setQuickActions,
feature quickActions), and a tap opens it, also from a cold start.

The app's own CSS moves out of index.css into native/nativeApp.css, which
had outgrown its size budget.
This commit is contained in:
Maurice
2026-11-09 09:37:36 +01:00
parent c9a91bbdad
commit 80c04df4fc
44 changed files with 1315 additions and 120 deletions
+21
View File
@@ -142,6 +142,27 @@ export interface TrekShellPlugin {
event: 'keyCommand',
listener: (payload: { id: string }) => void
): Promise<{ remove: () => Promise<void> }>;
/** Feature quickActions (iOS): the actions a long press on the app icon shows, in the UI's language. */
setQuickActions(options: { items: NativeQuickAction[] }): Promise<void>;
/** Feature quickActions: the action the app was launched with, before the UI ran. */
takeQuickAction(): Promise<{ path: string | null }>;
/** Feature quickActions: an action chosen while the app was running. */
addListener(
event: 'quickAction',
listener: (payload: { path: string }) => void
): Promise<{ remove: () => Promise<void> }>;
}
/** One quick action on the app icon: what it says, and the path in the UI it opens. */
export interface NativeQuickAction {
/** Stable name, e.g. "newTrip". */
type: string;
title: string;
subtitle?: string;
/** 'add' or 'trip'. */
icon: 'add' | 'trip';
/** A path of this server's UI, starting with "/". */
path: string;
}
/** What Google Play Billing answers a restore with (Android, feature playBilling), beside iOS's `jws`. */