feat(forms): declutter fields — required markers, info popovers, gated submit #749

Merged
raisondetredev merged 1 commit from refs/pull/749/head into main 2026-07-09 21:58:11 +02:00
raisondetredev commented 2026-07-09 21:57:23 +02:00 (Migrated from codeberg.org)

Declutters the studyset create/edit form (and field labels app-wide), addressing all four points from the "too much information at once" feedback.

1 · "(optional)" is gone everywhere

Optional is now the unmarked default. The alternative you asked about: mark the few required fields instead, with a subtle asterisk (new RequiredFieldLabel). In the studyset form that's just the title. Removed "(optional)"/"Optional." from ~9 labels/hints across the studyset form, flashcard-report note, profile avatar, audio label, path secondary title, vocabulary reading, MC prompt, and the study-button tag filter.

2 · The secondary-title helper was outdated (you were right)

It said "Renders as 'Title | Secondary title' on cards and the detail header" — but the code renders it as a kicker label (small, above the title) via TitleWithKicker; the pipe form now only survives in the markdown exporter. So the helper was both wrong and truncated to "…" (a long two-sentence string in a single-line helperText). Rewritten to be accurate and short.

3 · Long helpers → a tap "(?)" affordance

New reusable FieldInfoButton: a small help icon (in the field's suffixIcon) that reveals its explanation on tap (and hover on desktop) via a tap-triggered tooltip — no heavy popup. The form stays dense; the detail is one tap away. Applied to the secondary-title, license, and license-holder fields. The description field just drops its verbose helper — its chevron + "Tap to add a description" placeholder already convey that it opens an editor (also addressing your "a text field that opens a separate editor is at odds" point: it now stops over-explaining and reads as the tappable row it is).

4 · The Create/Save button is gated

Disabled until the required title is filled (previously only disabled while a submit was in flight). The license — required for a public studyset — is still validated on submit, since it's only conditionally required.

Notes

  • New widgets: FieldInfoButton, RequiredFieldLabel (both reusable for the other forms as a follow-up — this PR applies them to the studyset form, the concrete example, plus the app-wide "(optional)" removal).
  • Tests: the studyset edit-sheet suite is updated for the new title label (found by a key now) and the gated button (asserts disabled-until-title, plus a pump after title entry so the button rebuilds). l10n regenerated; full analyze clean (no new issues); suite green.
Declutters the studyset create/edit form (and field labels app-wide), addressing all four points from the "too much information at once" feedback. ### 1 · "(optional)" is gone everywhere Optional is now the unmarked default. The alternative you asked about: **mark the few *required* fields instead**, with a subtle asterisk (new `RequiredFieldLabel`). In the studyset form that's just the title. Removed "(optional)"/"Optional." from ~9 labels/hints across the studyset form, flashcard-report note, profile avatar, audio label, path secondary title, vocabulary reading, MC prompt, and the study-button tag filter. ### 2 · The secondary-title helper was outdated (you were right) It said *"Renders as 'Title | Secondary title' on cards and the detail header"* — but the code renders it as a **kicker label** (small, above the title) via `TitleWithKicker`; the pipe form now only survives in the **markdown exporter**. So the helper was both wrong *and* truncated to "…" (a long two-sentence string in a single-line `helperText`). Rewritten to be accurate and short. ### 3 · Long helpers → a tap "(?)" affordance New reusable `FieldInfoButton`: a small help icon (in the field's `suffixIcon`) that reveals its explanation on **tap** (and hover on desktop) via a tap-triggered tooltip — no heavy popup. The form stays dense; the detail is one tap away. Applied to the **secondary-title, license, and license-holder** fields. The **description** field just *drops* its verbose helper — its chevron + "Tap to add a description" placeholder already convey that it opens an editor (also addressing your "a text field that opens a separate editor is at odds" point: it now stops over-explaining and reads as the tappable row it is). ### 4 · The Create/Save button is gated Disabled until the required **title** is filled (previously only disabled while a submit was in flight). The license — required for a *public* studyset — is still validated on submit, since it's only conditionally required. ### Notes - New widgets: `FieldInfoButton`, `RequiredFieldLabel` (both reusable for the other forms as a follow-up — this PR applies them to the studyset form, the concrete example, plus the app-wide "(optional)" removal). - Tests: the studyset edit-sheet suite is updated for the new title label (found by a key now) and the gated button (asserts disabled-until-title, plus a pump after title entry so the button rebuilds). l10n regenerated; full `analyze` clean (no new issues); suite green.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
project-halkyon/halkyon-learn!749
No description provided.