Skip to content

chore(ui): bump the submodule for the Tabs.Content value prop removal - #918

Merged
thinkclay merged 1 commit into
mainfrom
fix/ui-tabs-pointer
Sep 26, 2026
Merged

thinkclay merged 1 commit into
mainfrom
fix/ui-tabs-pointer

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

Closes #906. Pointer bump for Scaffald/ui#42 (merged, 2f094f7).

What the ui change does

TabContentProps.value is gone. It was documented as associating a panel with a trigger "for Radix-style API — when the active tab value matches, this content is shown", and nothing read it: TabContent decides purely on useTabItemContext().isSelected. So a panel written in that shape rendered nothing, and writing it is now a type error instead:

error TS2322: Type '{ children: string; value: string; }' is not assignable
  to type 'IntrinsicAttributes & TabContentProps'

Tabs also warns in development when it drops a direct child with no Tabs.Trigger among its children. That is the root defect: the if (trigger) branch skipped such a child with no render, no warning and no DOM, which is why useTabItemContext's own 'must be used within a TabItem' throw never fired, and why four screens shipped a tab strip over empty space (#896).

I chose removing the prop over honouring it. Honouring it would make the docstring true but leave two supported shapes to maintain forever, and every example, story and call site already uses the nested form — the prop only ever added a way to be wrong. Full reasoning in Scaffald/ui#42.

Why this is safe

No call sites change. #899 already nested every Tabs.Content in this repo inside its Tabs.Item — including the fourth site it had originally missed, the IPIP share-link page — so:

$ grep -rn "Tabs.Content value" packages apps
(no matches)

The only remaining uses are in the ui package's own stories, which use the nested form.

Verification

  • pnpm install did not reset the pointer — staged the submodule before installing, since the root prepare script runs git submodule update --init --recursive and silently reverts a manual checkout otherwise.
  • scf-core and scaffald-app typecheck clean against the new ui. This is the check that matters: removing a public prop would surface as a type error at any call site still using it.
  • @scaffald/ui 714 passed / 0 failed (5 new tests in fix(Tabs): drop the Content value prop nothing read, and say when a child is ignored ui#42).
  • pnpm prepush green.

🤖 Generated with Claude Code

…#906)

Scaffald/ui#42 is merged. `TabContentProps.value` is gone — the prop that was
documented as associating a panel with a trigger and that nothing ever read —
so writing `<Tabs.Content value="x">` is now a type error rather than an
element silently discarded before it renders.

`Tabs` also warns in development when it drops a direct child that has no
`Tabs.Trigger` among its children. That is the root defect #906 was about: the
`if (trigger)` branch used to skip such a child with no render, no warning and
no DOM, which is why `useTabItemContext`'s "must be used within a TabItem"
throw never fired and four screens shipped a tab strip over empty space (#896).

No call sites change. #899 already nested every `Tabs.Content` in this repo
inside its `Tabs.Item`, including the fourth site it had missed — the IPIP
share-link page — so `Tabs.Content value=` appears nowhere outside the ui
package's own stories, which use the nested form.

Co-Authored-By: Claude Opus 5 <[email protected]>
@thinkclay
thinkclay merged commit e675422 into main Sep 26, 2026
9 checks passed
@thinkclay
thinkclay deleted the fix/ui-tabs-pointer branch September 26, 2026 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ui): Tabs.Content declares a value prop that nothing reads, and a bare one is dropped without a warning

1 participant