feat(10-03): tabs, toggles, relation fields, form lifecycle and settings pages

- FormTabs groups fields by tab (untabbed fields in the default tab) as a
  segmented tablist; a tab holding invalid fields after a 422 shows a
  count badge and the form switches to the first invalid field
- switch, checkbox and relation join the renderer registry: toggle cards
  (role=switch, 20px checkbox) keep a numeric value numeric; relation
  fields are read-only labels from meta.labels, a searchable single
  select over fields/{field}/options with emptyOption first, or ordered
  removable chips with an appending search (300 ms debounce, 20 per
  page, more on scroll or the more action)
- FormView gets the back button, record title and update subtitle, a
  sticky footer (Usuń with deleteConfirm then DELETE, Anuluj, Zapisz i
  zamknij to the mapped redirectClose, Zapisz), and asks before leaving a
  dirty form on any route change plus a beforeunload guard
- Settings: the rail pins Ustawienia to the bottom when /settings is
  non-empty; /settings lists pages by category; /settings/:code renders
  the settings schema through FormGrid and the registry, PUTs the values
  and maps a 422 like the record form
- New backend::lang keys (form.more_options, tab_default, discard,
  settings.back); form and settings smoke tests; boardwalk/dist rebuilt
This commit is contained in:
Jakub Zych
2026-09-27 17:00:18 +02:00
parent 8b5f85603f
commit 8f32416f4f
30 changed files with 1898 additions and 58 deletions

View File

@@ -70,6 +70,8 @@ form:
select_placeholder: Select…
loading_options: Loading…
no_options: No results
more_options: More results
tab_default: General
unsupported_field: "Unsupported field type: :type"
error_title: Could not save.
error_fields:
@@ -78,6 +80,7 @@ form:
load_failed: The form could not be loaded.
error_generic: The changes could not be saved. Please try again.
unsaved_confirm: You have unsaved changes. Discard them?
discard: Discard changes
tab_errors:
one: ":count error"
other: ":count errors"
@@ -93,6 +96,7 @@ settings:
title: Settings
empty: No settings are available.
saved: Settings saved
back: Back to settings
messages:
list:
record_count:

View File

@@ -74,6 +74,8 @@ form:
select_placeholder: Wybierz…
loading_options: Wczytywanie…
no_options: Brak wyników
more_options: Więcej wyników
tab_default: Podstawowe
unsupported_field: "Nieobsługiwany typ pola: :type"
error_title: Nie udało się zapisać.
error_fields:
@@ -84,6 +86,7 @@ form:
load_failed: Nie udało się wczytać formularza.
error_generic: Nie udało się zapisać zmian. Spróbuj ponownie.
unsaved_confirm: Masz niezapisane zmiany. Porzucić je?
discard: Porzuć zmiany
tab_errors:
one: ":count błąd"
few: ":count błędy"
@@ -101,6 +104,7 @@ settings:
title: Ustawienia
empty: Brak dostępnych ustawień.
saved: Zapisano ustawienia
back: Wróć do ustawień
messages:
list:
record_count: