Repository navigation
chore(ui): bump the submodule for the Tabs.Content value prop removal - #918
Merged
Merged
Conversation
…#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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #906. Pointer bump for Scaffald/ui#42 (merged,
2f094f7).What the ui change does
TabContentProps.valueis 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:TabContentdecides purely onuseTabItemContext().isSelected. So a panel written in that shape rendered nothing, and writing it is now a type error instead:Tabsalso warns in development when it drops a direct child with noTabs.Triggeramong its children. That is the root defect: theif (trigger)branch skipped such a child with no render, no warning and no DOM, which is whyuseTabItemContext'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.Contentin this repo inside itsTabs.Item— including the fourth site it had originally missed, the IPIP share-link page — so:The only remaining uses are in the ui package's own stories, which use the nested form.
Verification
pnpm installdid not reset the pointer — staged the submodule before installing, since the rootpreparescript runsgit submodule update --init --recursiveand silently reverts a manual checkout otherwise.scf-coreandscaffald-apptypecheck 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/ui714 passed / 0 failed (5 new tests in fix(Tabs): drop the Contentvalueprop nothing read, and say when a child is ignored ui#42).pnpm prepushgreen.🤖 Generated with Claude Code