Improve bookmarks navigation, scoping, search, and bulk actions
Add Bookmarks to the Contacts overflow menu, open the dedicated BookmarksScreen from direct and channel chat menus with a split scope pill (All vs current chat), add in-screen bookmark search with scroll-and-highlight jump, support bulk bookmarking from channel selection mode and bulk removal in BookmarksScreen, and prompt with a confirmation dialog before removing single or selected bookmarks.
This commit is contained in:
1 parent
d4a6839413
commit
32977bdd50
32 files changed
+1817
-230
No files matched your search
@@ -155,7 +155,7 @@ Icon sizes in use: 24 for tile and banner icons, 20 for menu icons and small act
|
||||
- `FilledButton.tonal`: a secondary action that still needs weight (rare).
|
||||
- `OutlinedButton(.icon)`: secondary actions next to a filled one.
|
||||
- `TextButton`: Cancel and low-emphasis actions in dialogs; inline actions in cards.
|
||||
- Destructive confirm: `FilledButton` with `backgroundColor: scheme.error`, `foregroundColor: scheme.onError` (`showConfirmClearDialog` in `widgets/confirm_clear_dialog.dart`), or a `TextButton` with `foregroundColor: scheme.error` when it is not the primary action.
|
||||
- Destructive confirm: destructive or data-removing actions (such as clearing a chat, deleting a channel or contact, or removing single or bulk bookmarks) always prompt with a confirmation `AlertDialog` pairing a `Cancel` `TextButton` with an error-styled destructive action (`TextButton` with `foregroundColor: scheme.error`, as in `confirmClearChat` and `confirmRemoveBookmarks`, or `FilledButton` with `backgroundColor: scheme.error`, `foregroundColor: scheme.onError`).
|
||||
- Dialog action order: Cancel first, primary last.
|
||||
- Avoid `ElevatedButton` in new code.
|
||||
|
||||
@@ -224,7 +224,7 @@ What the code does:
|
||||
Rules for new UI:
|
||||
|
||||
1. **Settings → page.** A row in Settings, App Settings or a repeater screen that opens settings opens a page, even for a single field. See [Settings pages](#settings-pages).
|
||||
2. **Confirmation or a single short input → dialog.** Title, one sentence, Cancel + one action. Inside settings, dialogs only confirm actions (Reboot, Delete all paths, unsaved changes).
|
||||
2. **Confirmation or a single short input → dialog.** Title, one sentence, Cancel + one action. Destructive or data-removing actions (clearing a chat, deleting a channel/contact, or removing single/bulk bookmarks) always use this `AlertDialog` pattern (`Cancel` + `scheme.error` destructive action button). Inside settings, dialogs only confirm actions (Reboot, Delete all paths, unsaved changes).
|
||||
3. **Pick one of several options, or act on one item → sheet.** Use `showMeshSheet` and start the content with `BottomSheetHeader(title:, subtitle:)`. It handles the keyboard and navigation-bar insets. Use raw `showModalBottomSheet` only when you need `DraggableScrollableSheet`.
|
||||
4. **Forms with sections, live remote values, or anything that needs Save/Discard → page.** Guard unsaved changes with `UnsavedChangesGuard` (built into `SaveToRadioPage`).
|
||||
5. Never stack a dialog on a sheet on a dialog. Close the sheet first, or move the flow to a page.
|
||||
|
||||
Reference in new issue
Block a user