Repository navigation
docs(hooks): add useInputContainer Search Field example block - #10139
Closed
Sainath-Reddy7 wants to merge 1 commit into
Closed
Sainath-Reddy7 wants to merge 1 commit into
Sainath-Reddy7 wants to merge 1 commit into
Conversation
Fulfills INV28 for useInputContainer: a custom search field whose leading icon, padding and trailing Clear button live in one wrapper. The hook's onClick/onMouseUp focus the input when non-interactive areas are clicked, while the nested Clear button keeps its own click. Adds the block's sandbox export route and its generated registry entry to the checked route lock. Fixes meta#9568
Sainath-Reddy7
requested review from
cixzhang,
imdreamrunner and
josephfarina
as code owners
November 5, 2026 17:53
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
AI review status for this pull request.
|
github-actions
Bot
requested review from
cvkxx,
ernestt,
kentonquatman and
rubyycheung
November 5, 2026 17:53
4 tasks
Contributor
PR Analysis Report🔎 Preview ·
|
3 tasks done
Contributor
Author
|
Closing this one — #9619 covers the same #9568 spec and was opened three days earlier, and it's already through review. Credit to @MannXo; keepers, feel free to borrow the generated-artifact placement here (both route entries are in sort order) if any of it is useful. Apologies for the duplicate — I missed the earlier PR when checking the issue. |
This branch was successfully deployed
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.
Reader impact
The
useInputContainerdocsite page had no live example (INV28). Readers can now see the exact scenario the hook's docs describe: a wrapper where clicking the leading icon or the padding focuses the input, while a nested Clear button keeps its own click.Source of truth
packages/core/src/hooks/useInputContainer.ts(its@exampleblock shows this same shape)packages/core/src/hooks/useInputContainer.doc.mjsdocs/architecture/knowledge-contracts.mdCorrection
Adds the missing example: a
TextInput/useInputContainerHookUsageblock pair (exampleFor: 'useInputContainer'). The block imports only public entry points; the visible behavior comes from the hook's handlers — removinguseInputContainerleaves the icon/padding clicks doing nothing. Includes both generated artifacts the docs build checks: the sandbox export oracle route and the shadcn registry lock entry (inserted in the lock's sort order with generator formatting left untouched).Evidence
node scripts/sync-templates.jsregenerates the route wrapper deterministically (all existing wrappers byte-identical).exampleFornames the hook; removing the hook breaks what the example shows; no unrelated UI or styling.Scope
Testing
Generated-artifact determinism and formatting verified locally; docs build and the export-oracle contract run in CI.
Fixes #9568
AI assistance disclosure: prepared with an AI coding agent (GLM-5.3) under my direction; I reviewed each line, ran the sync determinism check and formatting, and stand behind the change.