Repository navigation
fix(site): search results are links, arrows flip in RTL, prose copy buttons named by language - #161
Merged
Merged
Conversation
parsePage turns every fence into an md-code component labelled at build time: "Copy code, <lang>", numbered from 1 when a language repeats on the page. A test runs every content page through ambiguousIn.
# Conflicts: # docs/ARCHITECTURE.md
Owner
Author
|
Verifier: PASS on behavior at 24503fd (search results are links; Enter and click navigate once; modified and middle clicks open a new tab; agent run navigates; RTL arrow flips; prose copy names unique in prerendered HTML, server names match hydrated). The FAIL was a stale ARCHITECTURE.md Command row, fixed in 00214ed; conflict with #160 resolved by merge in 10628b9. Lead re-ran check and test on the merge with ui-sdk 44adbad (tree 7ddc789a): 75 files, 664 passed. |
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.
Why
Goal: fix every bug on
ui-sdkthat we can fix on our side, so the branch is ready to land with no known issues. This PR fixes three docs-site bugs:What changed
search.tsx. Each result renders as a TanStack RouterLink, following ui-sdkcommand.md"Custom Rendering".Linknavigates once, and search closes.onSelectdoesn't run.runhas no click, soonSelectnavigates.data-rtl-flip.parse-page.ts(new, used bytomekit.config.ts). It turns every fence into anmd-codecomponent and labels it at build time.plaintextortextgives "text". Rendering is unchanged:langstill reaches the block as before.prose.tsx.md-coderenders the block. Thecodeoverride now handles only inline code, and theprepassthrough is gone.Tradeoffs
node.meta, a workaround. Rejected: keys built from lang and value, because 4 pages have identical fences. principle-model-the-domain: the page's labels come from one pass over the whole document.agent-names.tsword containment ("Input" sits inside "Input Group").onSelectruns beforeLink's handler and gets the real click event. Tests fail ifnavigatealso runs on clicks (two navigations) or if the agent path drops it. principle-prove-it-works.Verification
vpr check,vpr test(68 files, 636 passed + 1 expected fail) andvpr buildpass on head24503fd7after mergingorigin/ui-sdk.search.test.tsxuses a real memory router. It covers: the result is an<a href>; click and Enter each navigate once and close search; four modifier clicks don't navigate and leave search open; an agentrunnavigates once, and the snapshot names the items.parse-page.test.tscovers the label rule and runs every content page throughambiguousIn./docs/components/button, history grew by 1, search closed./docs/components/badge. The current tab didn't move and search stayed open.Awithhref.matrix(-1, 0, 0, 1, 0, 0)in light and dark. Screenshots are in the owner'sshots/D-search/after-rtl-{light,dark}.png.vpr agent-audit: 13 pages with ambiguous names before and after. The audit only scans demos, so prose collisions never counted there. The new content test covers them.Tracker
run()doesn't follow anchor items the way Enter does (command-api.jsrun(key, {})), so link items must navigate inonSelectfor agents.demos/code-block.tsx:61. It appears once per page and is outside this unit.