Skip to content

One disclosure draws every expandable section - #599

Merged
maximsan merged 6 commits into
mainfrom
feat/one-disclosure
Sep 12, 2026
Merged

One disclosure draws every expandable section#599
maximsan merged 6 commits into
mainfrom
feat/one-disclosure

Conversation

@maximsan

@maximsan maximsan commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Why

Closes #596. Five hand-rolled expanders, four timings and two marks between
them, become one Disclosure.

Watch for

  • Every module on Path now opens and shuts. disclosure.jsx ties
    collapsible={false} to panel open, so the module you are working through
    was pinned open with no caret. The owner ruled that behaviour wrong: a caret
    on every module the learner can reach, open and collapse at will. The active
    one still opens itself on arrival. A module you have not reached keeps
    neither caret nor lessons — there is nothing behind one to open.
  • Disclosure states isOpen rather than inferring it from collapsible,
    which is where it departs from disclosure.jsx. That inference is what broke
    Path, and it misfires at the design's own Reference site too: it passes
    shut-while-locked and the component overrules it.
  • A shut panel is not mounted. Its children are dropped once the collapse
    finishes, so PathChallengeNode and the guide rows stop watching their
    providers while shut. Same end state as the old if (open); what moved is
    when the drop happens — after the animation rather than at the tap.
  • For later is shut on arrival, as the design has it; the parked brews were
    always visible before. Its count rides in the header so a shut list still
    says how much is behind it.
  • Reference's header now matches a module's — a 32-px glyph column, caption
    at the title's left edge. Its lock stays 16 where a module's is 13.
  • The header row centres its glyph. CrossAxisAlignment.baseline — the
    design's alignItems: 'baseline' — puts a child reporting no baseline at the
    top of the row, and every mark reports none. Proper baseline alignment lands
    within half a pixel of centre for a 16-px mark beside a 29-px title, so the
    row centres and a test holds it there.

Not here

Checks

Driven on a simulator and reviewed as pictures — Path, Today's practice list
and the FAQ — then thrown away.

Practice groups, Path's modules, Reference, For later and the FAQ all route through one Disclosure, which owns the design's 240ms panel and glyph turn, the caret/plus split, and the rule that a shut panel is not built at all. CaretMark retires into it.
The clip aligns its child, and an aligned child is laid out loose, so panel rows that fit their content centred themselves at x=361 instead of filling the row. Plus the changelog entry.
The new off-token never joined OffTokens.register, so neither register test saw it. The section caret's 16 was written twice, Reference's caption sat at a different inset from the module sub-line it copies, and the For later count rode in a trailing slot the design does not use. The header's fourteen forwarded fields collapse into methods on Disclosure.
The design draws a module you have not reached with its lessons showing and every row dead; the app hid them. Opening them needed a progression lock on the row itself, because PathLessonRow only knew about the purchase. A Semantics(label:) around an IconMark turns out to produce no node at all, so both locks now label themselves through IconMark.
headerAlign: CrossAxisAlignment.baseline put Path's caret and lock 6.5px above the title: Flutter positions a child reporting no baseline at offset 0, and every mark reports none. The design's alignItems: baseline lands within half a pixel of centre for a 16px mark beside a 29px title, so the row centres and the parameter goes, having no other user.
The design pins the module you are in open with no caret, which is the behaviour the owner ruled broken. Every reachable module now carries a caret and answers a tap; the active one still opens itself on arrival, and a locked one keeps neither caret nor lessons. Reverts the inert locked rows from the earlier reading.
@maximsan
maximsan merged commit 7cc171b into main Sep 12, 2026
7 checks passed
@maximsan
maximsan deleted the feat/one-disclosure branch September 12, 2026 18:24
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.

One disclosure draws every expandable section — practice groups, Path's modules, Reference, For later and the FAQ (11 Sep drop)

1 participant