Repository navigation
feat(demo): a person open keeps the whole Roster in view (sc-102333) - #4288
realToluFash wants to merge 1 commit into
Conversation
realToluFash
left a comment
There was a problem hiding this comment.
Review (from lead)
Design pull request for sc-102333, reviewed against the story's Design section (there is no artboard yet; the demo is the specification). Web demo only, five files under apps/web/src/demo/, sample data, no API calls, built from the Roster's own components and the mn-panel / rs-* classes. Web demo tests (roster, briefing, Roster, Briefing): 130 passed at c6ec5b2. No lockfile change.
| What the Design line names | Code | ✓ |
|---|---|---|
| Docked from 1280, Station and Briefing give way, back when the panel closes | roster.css width >= 80rem + :has(> .mn-panel:not(.bf-panel)), rs-gives on th/td |
✓ (see should on Edit/Remove) |
| Briefing's own panels do not hide them | :not(.bf-panel) |
✓ |
| Details gain a Briefing line between Station and Mobile, with the cell's actions from 1280, words only below | Details brief, bf.fact, .bf-fact .rs-link-acts |
✓ |
| Focus after Send again / Copy / Mark lands in the details when the row is hidden | focusAfter → bf-fact-* via checkVisibility |
✓ |
| Card title keeps whole words, actions go under it docked | .sn-card-top wrap, .sn-card-names basis |
✓ |
| Docking still starts at 1280, panel 360 px, below 1280 unchanged | rules only inside the 80rem query | ✓ |
States: docked, dockedFrench/Spanish/Portuguese, dockedAdd, briefingDocked (+ locale), erasedDetails*, longWord |
roster.ts, briefing.ts (rosterStateOf gives briefingDocked), both listed on /demo |
✓ |
| Other rows' Briefing actions out of view while a person is open | consequence of the column hiding | ✓ |
Blocking: none.
2 should (held rows' colSpan counts the hidden columns; Edit and Remove also hide the columns, which the Design line does not say), 1 nit.
Review passed at c6ec5b2. Ready to merge.
| )} | ||
| </td> | ||
| {bf.on && <td>{bf.cell(one)}</td>} | ||
| {bf.on && <td className="rs-gives">{bf.cell(one)}</td>} |
There was a problem hiding this comment.
should: (the held rows, lines 629 and 634) still span bf.on ? 6 : 5 columns, but docked from 1280 px Station and Briefing are display: none, so the table has 4 (or 3) real columns and these rows ask for two that no longer exist. Scenario: dock Amina's details at 1280, press Copy link on a row whose copy is refused (?state=refused-style, or Briefing's Copy link from the details) and the held row's colSpan makes the table lay out extra anonymous columns, which is exactly the frame width this story measures. Count the visible columns while a Roster panel is docked, or give the held cell grid-column-free full width another way, and add the refused-copy case to a docked state so QA can see it. screen-from-design, "the numbers you take responsibility for by rendering them".
| } | ||
|
|
||
| @media (width >= 80rem) { | ||
| .rs .mn-split:has(> .mn-panel:not(.bf-panel)) .rs-frame > .rs-table .rs-gives { |
There was a problem hiding this comment.
should: :has(> .mn-panel:not(.bf-panel)) hides Station and Briefing for every Roster panel, so Edit and Remove hide them too, not only a person's details and Add a person as the AC and the Design line say. In Edit the details (and their new Briefing line) are gone, so the Briefing word is nowhere on screen while the person is being edited. Either say in the Design section that Edit and Remove give way too (it is likely the right call, Edit is the same 360 px panel), or scope the rule to the details and the add form.
| note: 'Open it at 1280 and 1440 × 800: Sade’s details docked, Station and Briefing give way, her Briefing in the details with Send again and Copy, Amina Copied and Emeka Shared whole in Link. Close the details and both columns are back.', | ||
| people: people().map((one) => | ||
| one.id === 'emeka' | ||
| ? { ...one, link: 'shared', trail: { by: 'Kemi Adeyemi', at: '19:12' } } |
There was a problem hiding this comment.
nit: the Emeka-shared mapping is written twice, here and in everyLink() in roster.ts. If one of them changes, the Briefing docked state and the Roster docked states stop showing the same Shared row the story says both have.
Description
The web's design demo only (
apps/web/src/demo/). With a person's details or Add a person docked beside the Roster (from 1280 px), the Station and Briefing columns give way so the table fits its frame and Link's Copy link and Mark as sent stay in view, in every language. The columns come back when the panel closes. The details already show Station; they now also show the person's Briefing, with its Send again, Copy link and Mark as sent where the column has given way. In French the card's actions go under its title rather than break "Liste du personnel" inside a word.New states:
?state=docked,dockedFrench,dockedSpanish,dockedPortuguese,dockedAdd, andbriefingDocked(with&locale=fr-FR,es-ESorpt-BR).Risks
Below 1280 px nothing changes: the rules sit in a
width >= 80remquery and only while the Roster's own panel is docked, not the Briefing's panel. Other rows' Briefing actions are out of view while a person is open, until the details close.References
Evidence of work
Measured in Chromium at 1280 × 800 and 1440 × 800, en, fr, es and pt: the frame's scrollWidth equals its clientWidth (513 and 528 px), no Link button past the frame's edge, no word broken inside itself in the card or the details, the page never wider than the window. With only Briefing gone, French was still 547 px in 513, so Station goes too.
longWordstill scrolls, as the AC asks.Tests: Roster, RosterText, roster, briefing, Briefing, demoStyles, wideDesk and Demo, 342 passing; typecheck and lint clean.
Next Steps
Lead review, then merge; the board is listed for drawing on page 34 · Staffing.