SIGN IN SIGN UP

story: Redesign the Collapsible story and improve DataTable cells (#2713)

Reworks two stories so they show the components the way they are
actually used, taking the [ReUI](https://reui.io) examples as the
reference.

## Collapsible

The story had two examples. It now has seven, one per pattern the
component gets used for:

- **Basic** — a trigger beside the title, with a summary row that stays
visible
- **Row trigger** — the whole row toggles, as FAQ entries do
- **Bottom trigger** — a round trigger sitting on the bottom edge of the
card it opens
- **Settings** — optional controls behind a full width trigger
- **Row actions** — actions beside the trigger, in the header and in
every row
- **Nested** — panels nested as a file tree
- **Profile** — an identity row with its details folded behind it

Each panel tracks its own open state by key, so the story no longer
needs one field per panel.

## DataTable

The cells said very little: most of them printed a bare `floor()`ed
number, and the red/green tint was hander out by `right_num % 3`, which
has nothing to do with the value.

- Rise/fall colors now follow the sign, and only on the columns that
carry a direction (Chg, Chg%, Year Chg%, pre/post market)
- Volume, turnover and the caps use a compact unit (`1.24B`), rate
columns carry their `%`, the rest share one decimal precision
- The row data is self-consistent: change is the percentage applied to
the price, previous close sits a change away from it,
bid/ask/open/high/low stay within a day's range, and magnitudes sit in
realistic ranges
- `price` was never assigned, so that column read `0.00` for every row —
fixed

Both stories only touch `crates/story`, so there is no public API
change.

## Test plan

- `cargo run -p gpui-component-story -- Collapsible` — every panel opens
and closes, nested folders included
- `cargo run -p gpui-component-story -- DataTable` — colors track the
sign, Options › Refresh Data keeps the rows consistent
- `cargo clippy -p gpui-component-story` and `cargo fmt --check` are
clean

Parts of this PR were written with Claude Code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
J
Jason Lee committed
137cc9433a7d83cda761259fa5744e89556d2aac
Parent: c7005a6
Committed by GitHub <noreply@github.com> on 8/14/2026, 4:47:14 PM