Skip to content

docs(hooks): add useInputContainer Search Field example block - #10139

Closed
Sainath-Reddy7 wants to merge 1 commit into
meta:mainfrom
Sainath-Reddy7:gh-9568-useInputContainer-example
Closed

Sainath-Reddy7 wants to merge 1 commit into
meta:mainfrom
Sainath-Reddy7:gh-9568-useInputContainer-example

Conversation

@Sainath-Reddy7

Copy link
Copy Markdown
Contributor

Reader impact

The useInputContainer docsite 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

Correction

Adds the missing example: a TextInput/useInputContainerHookUsage block pair (exampleFor: 'useInputContainer'). The block imports only public entry points; the visible behavior comes from the hook's handlers — removing useInputContainer leaves 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.js regenerates the route wrapper deterministically (all existing wrappers byte-identical).
  • Prettier (repo config) passes on both new files; the route lock keeps its generator formatting.
  • Acceptance criteria from docs(useInputContainer): add a minimal live example #9568: exampleFor names the hook; removing the hook breaks what the example shows; no unrelated UI or styling.

Scope

  • This PR changes documentation only, or names every necessary generated artifact.
  • Runtime, API, visual, and policy changes were removed or split.
  • Public text and artifacts contain no internal Meta context.

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.

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
@vercel

vercel Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 5, 2026 6:21pm UTC

Request Review

@astracat-bot

astracat-bot Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
⏳ Waiting for review (for maintainers only) Nov 5, 2026, 6:21 PM UTC

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 5, 2026
@github-actions github-actions Bot added community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge needs:design-review Affects visuals — Design should review labels Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 39fae55

This branch's preview address cannot be known in advance; open it from Vercel's comment.

Current run: The current CI run concluded failure. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@Sainath-Reddy7

Copy link
Copy Markdown
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

1 active deployment
Preview — 39fae55c Deployed Nov 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(useInputContainer): add a minimal live example

1 participant