Leave the resolved decisions showing, and remember the choice #3
- KC
The sidecar kept everything resolved behind a closed disclosure, on the grounds that it was worth keeping and not worth scrolling past. But it is the record of what the room settled, and a decision nobody can see is one that gets made a second time. The pane's own argument for putting questions and accepted comments in one list is that both are decisions — and it was then hiding half of them by default.
So the list starts open. The disclosure stays, because resolved threads are kept forever and a plan worked on for any length of time will out-scroll the pane; somebody who wants only what is still blocking them should be able to say so.
Which way it is left is remembered, beside the pane widths. Collapsing it and finding it open again on the next load reads as a toggle that does not work. Anything other than the one stored string means open, so an absent key and a corrupt one both give the default rather than a pane that starts closed for a reason nobody can find. The hook is duplicated rather than shared with `usePaneWidth`, which lives in `apps/web` and cannot be reached from a package.
`aria-expanded` goes on the button while it is being touched — the ▾/▸ was the only thing saying which way it was, which is nothing at all to a screen reader. The `reveal` scroll also loses a trap it had not yet sprung: it is a `querySelector`, and a settled questionnaire behind a closed disclosure has no element to find, though everything that asks for one today asks for an unanswered one.
Nothing here is tested. The pane needs a DOM to render into and the test runtime has none, which is the same reason `card.test.ts` covers only its timestamp formatter. `bun run types`, `bun run ci` and `bun test` (412) are clean.
Left alone deliberately: `localStorage` is read without a guard, so it throws where storage is disabled. `usePaneWidth` has the identical exposure and would take the whole app down before this could take the sidecar down, so guarding one and not the other buys nothing.
Krzysztof-Cieslakmerged 6b147f5525633 months ago on GitHub
Krzysztof-Cieslakhead-ref-deleted3 months ago on GitHub
MaggieAppletonreferenced this in Replace the native link prompt with an inline link popover #298last month on GitHub