Skip to content

fix(members): make Add period unmissable in the fee editor (spec 50 R14.9) - #282

Merged
PeterGeers merged 1 commit into
testfrom
fix/50-fee-period-affordance
Nov 30, 2026
Merged

PeterGeers merged 1 commit into
testfrom
fix/50-fee-period-affordance

Conversation

@PeterGeers

Copy link
Copy Markdown
Owner

On TEST the fee editor looked like it could only hold one period: the add control was a low-contrast ghost button below the scrolling periods table. Two separate defects made it read as "there is no add":

  1. Placement/contrast - moved beside the "Periods" heading as an outline/orange + Add period (still type="button").
  2. Seeding (fixed in fix(members): author multiple fee periods via a contiguous append (spec 50 R14.9) #281) - it used to insert the current calendar year, which overlapped the existing period and was rejected by the contiguous/gap-free rule.

Also in this PR:

  • New helper line periods_hint (EN/NL): periods must be contiguous AND the period covering today is the one the member fee uses - that explains why moving a lone period to 2027 leaves the "current period" columns empty for 2026 (the derivation and the table are effective-dated by design).
  • Empty state row when a type has periods: [].
  • Seeding tightened: an EXISTING entry with periods: [] stays empty (derived fee = None, R12.5); only a not-yet-configured type is seeded one calendar-year period.

Tests: editor 6 -> 7 (affordance + hint + empty state + add), model 18, translations 7 -> 32 passed; tsc --noEmit clean; eslint clean.

Spec: R14.9, design section "Period authoring" (placement + hint + empty state), tasks 11.2 updated.

… R14.9)

On TEST the editor read as "there is no add" because the control was a low-contrast ghost
button BELOW the scrolling periods table (size="xl" + scrollBehavior="inside").

- The `+ Add period` button now sits beside the "Periods" heading, `variant="outline"` /
  `colorScheme="orange"` (still `type="button"`, still pushing `nextPeriodAfter(values.periods)`).
- New helper line under the heading (`periods_hint`, EN/NL): periods must be contiguous and the
  period covering today is the one the member fee uses — that is why changing a lone period to
  2027 makes the 2026 "current period" columns read empty.
- Empty state row ("no periods yet") when a type has `periods: []`.
- Seeding tightened: an EXISTING entry with `periods: []` keeps it empty (the derived fee is then
  None); only a not-yet-configured type is seeded one calendar-year period.
- test: `shows the Add period affordance + empty state for a type with no periods` (6 → 7 editor
  tests); the add-period test still asserts the contiguous 2027 seeding + two-period save.

Verified: vitest 32 passed (model 18, editor 7, translations 7), `tsc --noEmit` clean, eslint clean.
@PeterGeers
PeterGeers merged commit 646524f into test Nov 30, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant