One disclosure draws every expandable section - #599
Merged
Conversation
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.
4 tasks
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Closes #596. Five hand-rolled expanders, four timings and two marks between
them, become one
Disclosure.Watch for
disclosure.jsxtiescollapsible={false}to panel open, so the module you are working throughwas 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.
DisclosurestatesisOpenrather than inferring it fromcollapsible,which is where it departs from
disclosure.jsx. That inference is what brokePath, and it misfires at the design's own Reference site too: it passes
shut-while-locked and the component overrules it.
finishes, so
PathChallengeNodeand the guide rows stop watching theirproviders while shut. Same end state as the old
if (open); what moved iswhen the drop happens — after the animation rather than at the tap.
always visible before. Its count rides in the header so a shut list still
says how much is behind it.
at the title's left edge. Its lock stays 16 where a module's is 13.
CrossAxisAlignment.baseline— thedesign's
alignItems: 'baseline'— puts a child reporting no baseline at thetop 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
would, adds "{n} more unlock as you learn" under a caption that already
says it — and that caption is
ADR-0016's,
so it wants a ruling rather than a side effect.
scope).
padding, min height, glyph size, trailing gap, panel padding — is on the
widget.
Checks
Driven on a simulator and reviewed as pictures — Path, Today's practice list
and the FAQ — then thrown away.