Commit 917e39f
fix(dropdown,box): drop menu-item prop leak; restore Box filter coverage
Two follow-ups from the PR 1150 review:
- Dropdown: DropdownMenuItemStyled spread `{...item}`, forwarding the Item
fields (name/selected/label) onto the <li> as invalid DOM attributes.
The spread was redundant — onClick already flows through getItemProps and
label is rendered as children — so it is removed. Verified no consumer
repo or test selects menu items by those attributes. (@ts-nocheck left in
place; making the class compile-visible is tracked separately.)
- Box: restore Box.test.tsx as behavioural coverage for the shouldForwardProp
filter — the one place the migration diverges from the mechanical rename.
Asserts the migration contract (styled-system props stay out of the HTML),
that genuine a11y attributes + click handlers still reach the element, and
that polymorphic `as` works. Drives the click with userEvent.
tsc clean, 477/477 tests pass.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent fff9c13 commit 917e39f
2 files changed
Lines changed: 54 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
167 | 166 | | |
168 | 167 | | |
169 | 168 | | |
| |||
0 commit comments