Repository navigation
refactor(core): share per-instance warning dedupe and temporary focus targets - #10655
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Requesting changes. The new helpers are internal and leave every shipped component's behavior unchanged, but two things need fixing first:
useDevWarningnow keeps its dedupe closure inuseMemo(packages/core/src/hooks/useDevWarning.ts:59), so every Fast Refresh of a component that calls it replaces the closure and prints the warning again without a remount (once on the base, four times after three hot updates), andconst [warn] = useState(createDevWarnings);keeps it once per mount.- This PR makes
createDevWarningsandfocusForLastInputTemporarilythe owners of per-instance warning deduplication and temporary tab stops, but Chat'sparkFocus(packages/core/src/Chat/useChatKeyboard.ts:152-166) and the per-instance warning flags increateResizable/resolveBound,DialogandTabListkeep their own copies, so please route them through the new owners or say in the PR why an owner cannot serve one of them.
Two comment wordings could also be tightened (non-blocking; see the inline notes on useDevWarning.ts:44 and focusReturn.ts:93).
[Automated review]
f0103e8 to
b50c5cb
Compare
There was a problem hiding this comment.
Requesting changes. The Fast Refresh repeat in useDevWarning is fixed and both comment wordings are updated; one item from the last review remains:
- This PR makes
createDevWarningsandfocusForLastInputTemporarilythe owners of per-instance warning deduplication and temporary tab stops, but Chat'sparkFocus(packages/core/src/Chat/useChatKeyboard.ts:152-166) and the per-instance warning flags increateResizable/resolveBound,DialogandTabListstill keep their own copies, so please route them through the new owners or say in the PR why an owner cannot serve one of them.
[Automated review]
b50c5cb to
5cad527
Compare
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet; it runs once this pull request targets main.
The earlier request is resolved: Resizable, Dialog and TabList now dedupe through createDevWarnings, and Chat's Done park goes through focusForLastInputTemporarily, so each concern has one owner. Warning text and Chat's park (focus target, tab stop and ring) are unchanged, and the new helpers stay internal.
- Non-blocking:
exposes a shared instance warning factoryinpackages/core/src/utils/devWarning.test.tsonly checks the export's type, which the next test already covers. - Non-blocking: the description's "381 authored lines" predates the call-site changes; the count is 498 now.
[Automated review]
5cad527 to
4ba4cc4
Compare
… targets devWarning owns per-instance warning deduplication for the render-safe hooks and for imperative callers; useDevWarningPerMessage dedupes per message. focusReturn owns temporary focusability for an owner that is not focusable, released when focus moves on or the owner is removed. Resizable, Dialog and TabList now dedupe through createDevWarnings, and Chat's Done park focuses its region through focusForLastInputTemporarily, so each concern has one owner. Warning text, prefixes, production silence and Chat's focus target and ring are unchanged. This diff was generated with AI assistance (Navi). Tags: ai-generated
4ba4cc4 to
cd4865a
Compare
There was a problem hiding this comment.
Approved. createDevWarnings and focusForLastInputTemporarily are now the single owners of per-instance warning deduplication and temporary focus targets, and Resizable, Dialog, TabList and Chat's Done park call them with the same warning text and the same Done park behavior. There are no blocking findings.
- Non-blocking: the
exposes a shared instance warning factorytest inpackages/core/src/utils/devWarning.test.tsonly checks that the export is a function, which every other test in that block already proves; it can go.
[Automated review]
| it('exposes a shared instance warning factory', () => { | ||
| instanceWarnings(); | ||
| }); |
There was a problem hiding this comment.
Non-blocking: this test only checks that createDevWarnings is a function, and every other test in this block already calls it through instanceWarnings(). It proves nothing new and can go.
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| ChatLayout | 79.7 kB (+349 B) · 10.5 kB CSS (0) | — | ✓ · ✓ · — |
| LayoutPanel | 21.3 kB (+288 B) · 4.9 kB CSS (0) | — | — · — · — |
| Collapsible | 27.1 kB (+269 B) · 4.5 kB CSS (0) | — | — · — · — |
146 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| TreeList | 44.2 kB (+266 B) · 5.6 kB CSS (0) | — | — · — · — |
| DateInput | 183.2 kB (+173 B) · 16.9 kB CSS (0) | — | — · — · — |
| PowerSearch | 282.9 kB (+165 B) · 23.7 kB CSS (0) | — | — · — · — |
| ContextMenuItem | 28.9 kB (+155 B) · 6.3 kB CSS (0) | — | — · — · — |
| AppShell | 89.8 kB (+129 B) · 13.4 kB CSS (0) | — | — · — · — |
| SideNav | 111.1 kB (+110 B) · 11.3 kB CSS (0) | — | — · — · — |
| ComplexSelector | 69.8 kB (+54 B) · 11.7 kB CSS (0) | — | — · — · — |
| TabMenu | 70.7 kB (+50 B) · 11.0 kB CSS (0) | — | ✓ · ✓ · ✓ |
| Popover | 88.0 kB (+48 B) · 14.1 kB CSS (0) | — | — · — · — |
| Selector | 98.4 kB (+45 B) · 17.3 kB CSS (0) | — | — · — · — |
| TopNavMegaMenu | 68.6 kB (+43 B) · 11.7 kB CSS (0) | — | — · — · — |
| CheckboxListItem | 69.8 kB (+42 B) · 11.3 kB CSS (0) | — | — · — · — |
| MultiSelector | 93.6 kB (+42 B) · 16.8 kB CSS (0) | — | — · — · — |
| ChatComposer | 76.8 kB (+41 B) · 12.0 kB CSS (0) | — | ✓ · ✓ · — |
| Typeahead | 78.5 kB (+41 B) · 12.4 kB CSS (0) | — | — · — · — |
| ListItem | 68.7 kB (+40 B) · 11.3 kB CSS (0) | — | — · — · — |
| NumberInput | 70.6 kB (+39 B) · 11.4 kB CSS (0) | — | — · — · — |
| TextInput | 66.6 kB (+39 B) · 11.1 kB CSS (0) | — | — · — · — |
| AvatarGroupOverflow | 47.2 kB (+37 B) · 5.5 kB CSS (0) | — | — · — · — |
| DropdownMenu | 95.7 kB (+37 B) · 17.3 kB CSS (0) | — | — · — · — |
| FileInput | 68.1 kB (+37 B) · 10.9 kB CSS (0) | — | — · — · — |
| ResizeHandle | 21.5 kB (+37 B) · 4.3 kB CSS (0) | — | ✓ · ✓ · ✓ |
| DropdownMenuSubMenu | 69.1 kB (+36 B) · 9.7 kB CSS (0) | — | — · — · — |
| Table | 116.5 kB (+36 B) · 17.9 kB CSS (0) | — | — · — · — |
| TopNavMenu | 73.5 kB (+36 B) · 11.1 kB CSS (0) | — | — · — · — |
| Pagination | 108.5 kB (+35 B) · 17.7 kB CSS (0) | — | — · — · — |
| RadioListItem | 66.2 kB (+35 B) · 10.1 kB CSS (0) | — | — · — · — |
| BaseTypeahead | 70.0 kB (+34 B) · 10.9 kB CSS (0) | — | — · — · — |
| Timestamp | 32.3 kB (+34 B) · 10.2 kB CSS (0) | — | — · — · — |
| BreadcrumbItem | 83.5 kB (+33 B) · 12.1 kB CSS (0) | — | — · — · — |
| ContextMenu | 106.3 kB (+32 B) · 17.2 kB CSS (0) | — | — · — · — |
| MoreMenu | 96.0 kB (+32 B) · 17.3 kB CSS (0) | — | — · — · — |
| Tab | 14.4 kB (+32 B) · 4.2 kB CSS (0) | — | ✓ · ✓ · ✓ |
| Tokenizer | 90.2 kB (+32 B) · 18.5 kB CSS (0) | — | — · — · — |
| Avatar | 41.6 kB (+31 B) · 5.5 kB CSS (0) | — | — · — · — |
| SideNavHeading | 74.4 kB (+31 B) · 11.2 kB CSS (0) | — | — · — · — |
| TableCell | 107.6 kB (+31 B) · 17.6 kB CSS (0) | — | — · — · — |
| TableHeaderCell | 107.1 kB (+31 B) · 17.3 kB CSS (0) | — | — · — · — |
| AlertDialog | 104.2 kB (+30 B) · 14.3 kB CSS (0) | — | — · — · — |
| List | 17.7 kB (+30 B) · 651 B CSS (0) | — | — · — · — |
| SideNavItem | 69.4 kB (+30 B) · 11.0 kB CSS (0) | — | — · — · — |
| Item | 17.4 kB (+28 B) · 5.5 kB CSS (0) | — | — · — · — |
| TextArea | 61.2 kB (+28 B) · 9.3 kB CSS (0) | — | — · — · — |
| Thumbnail | 63.6 kB (+28 B) · 11.5 kB CSS (0) | — | — · — · — |
| DropdownMenuCheckboxItem | 22.7 kB (+27 B) · 6.6 kB CSS (0) | — | — · — · — |
| Field | 53.7 kB (+27 B) · 7.2 kB CSS (0) | — | — · — · — |
| OverflowList | 10.5 kB (+27 B) · 3.6 kB CSS (0) | — | — · — · — |
| TabList | 42.3 kB (+27 B) · 6.5 kB CSS (0) | — | ✓ · ✓ · ✓ |
| ChatComposerTokenElement | 74.5 kB (+26 B) · 11.2 kB CSS (0) | — | ✓ · ✓ · — |
| CommandPalette | 72.4 kB (+26 B) · 12.5 kB CSS (0) | — | — · — · — |
| InputGroup | 55.4 kB (+26 B) · 7.8 kB CSS (0) | — | — · — · — |
| Slider | 106.1 kB (+26 B) · 8.8 kB CSS (0) | — | — · — · — |
| TopNavHeading | 73.8 kB (+25 B) · 11.0 kB CSS (0) | — | — · — · — |
| BottomSheet | 65.8 kB (+24 B) · 7.6 kB CSS (0) | — | — · — · — |
| ChatComposerInput | 74.5 kB (+24 B) · 11.2 kB CSS (0) | — | ✓ · ✓ · — |
| Drawer | 49.4 kB (+24 B) · 8.3 kB CSS (0) | — | — · — · — |
| DropdownMenuRadioItem | 22.7 kB (+24 B) · 6.6 kB CSS (0) | — | — · — · — |
| DropdownMenuItem | 21.9 kB (+22 B) · 6.3 kB CSS (0) | — | — · — · — |
| Carousel | 68.7 kB (+21 B) · 10.9 kB CSS (0) | — | — · — · — |
| DateTimeInput | 204.8 kB (+21 B) · 18.6 kB CSS (0) | — | — · — · — |
| DateRangeInput | 91.2 kB (+20 B) · 12.4 kB CSS (0) | — | — · — · — |
| RadioList | 55.1 kB (+20 B) · 7.2 kB CSS (0) | — | — · — · — |
| Markdown | 179.6 kB (+19 B) · 20.2 kB CSS (0) | — | — · — · — |
| SelectorOption | 20.8 kB (+19 B) · 6.1 kB CSS (0) | — | — · — · — |
| CheckboxList | 68.0 kB (+17 B) · 8.1 kB CSS (0) | — | — · — · — |
| TimeInput | 158.6 kB (+17 B) · 15.9 kB CSS (0) | — | — · — · — |
| AvatarGroup | 44.4 kB (+10 B) · 5.6 kB CSS (0) | — | — · — · — |
| Dialog | 23.7 kB (+10 B) · 6.7 kB CSS (0) | — | ✓ · ✓ · — |
| MobileNavToggle | 59.5 kB (+4 B) · 9.9 kB CSS (0) | — | — · — · — |
| CommandPaletteInput | 31.0 kB (+2 B) · 7.5 kB CSS (0) | — | — · — · — |
| DialogHeader | 62.0 kB (+2 B) · 11.4 kB CSS (0) | — | ✓ · ✓ · ✓ |
| Token | 28.4 kB (+2 B) · 4.7 kB CSS (0) | — | — · — · — |
| BottomSheetSwitcher | 17.9 kB (+1 B) · 3.4 kB CSS (0) | — | — · — · — |
| Calendar | 70.2 kB (+1 B) · 10.5 kB CSS (0) | — | — · — · — |
| ChatMessageList | 27.5 kB (+1 B) · 7.0 kB CSS (0) | — | ✓ · ✓ · — |
| Citation | 20.5 kB (+1 B) · 4.4 kB CSS (0) | — | — · — · — |
| Spinner | 24.1 kB (+1 B) · 6.2 kB CSS (0) | — | — · — · — |
| Banner | 61.2 kB (0) · 10.4 kB CSS (0) | — | — · — · — |
| Breadcrumbs | 16.4 kB (0) · 3.4 kB CSS (0) | — | — · — · — |
| Button | 59.2 kB (0) · 9.9 kB CSS (0) | — | — · — · — |
| ButtonGroup | 41.6 kB (0) · 3.7 kB CSS (0) | — | — · — · — |
| ChatComposerDrawer | 17.9 kB (0) · 4.7 kB CSS (0) | — | ✓ · ✓ · — |
| ChatDictationButton | 59.7 kB (0) · 10.0 kB CSS (0) | — | ✓ · ✓ · — |
| ChatLayoutScrollButton | 59.7 kB (0) · 10.1 kB CSS (0) | — | ✓ · ✓ · — |
| ChatMessageBubble | 7.5 kB (0) · 3.7 kB CSS (0) | — | ✓ · ✓ · ✓ |
| ChatMessageMetadata | 20.2 kB (0) · 4.1 kB CSS (0) | — | ✓ · ✓ · — |
| ChatSendButton | 59.6 kB (0) · 9.9 kB CSS (0) | — | ✓ · ✓ · — |
| ChatSystemMessage | 7.0 kB (0) · 3.8 kB CSS (0) | — | ✓ · ✓ · — |
| ChatTokenizedText | 7.2 kB (0) · 4.0 kB CSS (0) | — | ✓ · ✓ · — |
| ChatToolCalls | 31.4 kB (0) · 8.3 kB CSS (0) | — | ✓ · ✓ · — |
| CheckboxInput | 63.2 kB (0) · 9.1 kB CSS (0) | — | — · — · — |
| CodeBlock | 73.9 kB (0) · 11.2 kB CSS (0) | — | — · — · — |
| CommandPaletteFooter | 17.4 kB (0) · 3.7 kB CSS (0) | — | — · — · — |
| CommandPaletteList | 16.3 kB (0) · 3.4 kB CSS (0) | — | — · — · — |
| DrawerHeader | 62.2 kB (0) · 12.9 kB CSS (0) | — | — · — · — |
| FieldLabel | 49.8 kB (0) · 5.7 kB CSS (0) | — | — · — · — |
| IconButton | 59.2 kB (0) · 9.9 kB CSS (0) | — | — · — · — |
| InfoTip | 45.4 kB (0) · 5.3 kB CSS (0) | — | — · — · — |
| Kbd | 17.1 kB (0) · 3.6 kB CSS (0) | — | — · — · — |
| LayoutContent | 17.7 kB (0) · 1.7 kB CSS (0) | — | — · — · — |
| MetadataList | 17.1 kB (0) · 3.7 kB CSS (0) | — | — · — · — |
| MobileNav | 69.5 kB (0) · 10.5 kB CSS (0) | — | — · — · — |
| Outline | 24.8 kB (0) · 4.1 kB CSS (0) | — | — · — · — |
| SegmentedControl | 92.5 kB (0) · 6.8 kB CSS (0) | — | — · — · — |
| SideNavCollapseButton | 60.0 kB (0) · 10.0 kB CSS (0) | — | — · — · — |
| StackItem | 16.3 kB (0) · 219 B CSS (0) | — | — · — · — |
| Stepper | 60.8 kB (0) · 10.1 kB CSS (0) | — | — · — · — |
| Switch | 100.7 kB (0) · 9.9 kB CSS (0) | — | — · — · — |
| Toast | 97.0 kB (0) · 10.2 kB CSS (0) | — | — · — · — |
| ToggleButton | 85.7 kB (0) · 10.0 kB CSS (0) | — | — · — · — |
| Toolbar | 42.3 kB (0) · 8.1 kB CSS (0) | — | — · — · — |
| TopNav | 71.2 kB (0) · 10.9 kB CSS (0) | — | — · — · — |
| ChatMessage | 17.1 kB (−1 B) · 3.7 kB CSS (0) | — | ✓ · ✓ · ✓ |
| Link | 52.0 kB (−1 B) · 7.0 kB CSS (0) | — | — · — · — |
| NavHeadingMenu | 16.2 kB (−1 B) · 3.5 kB CSS (0) | — | — · — · — |
| Step | 30.9 kB (−1 B) · 5.6 kB CSS (0) | — | — · — · — |
| TableSelectionToolbar | 69.4 kB (−3 B) · 13.1 kB CSS (0) | — | — · — · — |
| Lightbox | 119.4 kB (−4 B) · 10.5 kB CSS (0) | — | — · — · — |
| charts/Chart | 197.9 kB (new) · 494 B CSS (new) | — | — · — · — |
| charts/ChartLegend | 48.5 kB (new) · 224 B CSS (new) | — | — · — · — |
| chat | — | — | — · ✓ · — |
| Chat | — | — | ✓ · ✓ · — |
| lab/ChatEmojiPicker | 102.5 kB (new) · 773 B CSS (new) | — | — · — · — |
| lab/ChatReactionBar | 103.6 kB (new) · 1.1 kB CSS (new) | — | — · — · — |
| lab/ChatTypingIndicator | 25.3 kB (new) · 612 B CSS (new) | — | — · — · — |
| lab/CommentComposer | 147.4 kB (new) · 1.9 kB CSS (new) | — | — · — · — |
| lab/CommentPin | 55.5 kB (new) · 1.2 kB CSS (new) | — | — · — · — |
| lab/Comments | 339.6 kB (new) · 2.5 kB CSS (new) | — | — · — · — |
| lab/CommentThread | 332.7 kB (new) · 2.4 kB CSS (new) | — | — · — · — |
| lab/DialogHeroHeader | 81.8 kB (new) · 372 B CSS (new) | — | — · — · — |
| lab/DiffViewer | 85.6 kB (new) · 2.1 kB CSS (new) | — | — · — · — |
| lab/EmojiPicker | 85.2 kB (new) · 751 B CSS (new) | — | — · — · — |
| lab/ListInput | 100.5 kB (new) · 1.6 kB CSS (new) | — | — · — · — |
| lab/NavigationScreen | 80.1 kB (new) · 1.5 kB CSS (new) | — | — · — · — |
| lab/NavigationStack | 80.1 kB (new) · 1.5 kB CSS (new) | — | — · — · — |
| lab/PageControl | 73.1 kB (new) · 709 B CSS (new) | — | — · — · — |
| lab/Schedule | 104.6 kB (new) · 3.9 kB CSS (new) | — | — · — · — |
| lab/SelectableCardGroup | 63.1 kB (new) · 162 B CSS (new) | — | — · — · — |
| lab/TabBar | 74.7 kB (new) · 1.8 kB CSS (new) | — | — · — · — |
| lab/TabBarItem | 3.8 kB (new) · 1.8 kB CSS (new) | — | — · — · — |
| lab/TourStep | 94.3 kB (new) · 590 B CSS (new) | — | — · — · — |
| lab/TransferList | 106.5 kB (new) · 1.7 kB CSS (new) | — | — · — · — |
| lab/TransferListSelector | 113.1 kB (new) · 1.9 kB CSS (new) | — | — · — · — |
| richtext/RichTextEditor | 295.6 kB (new) · 2.6 kB CSS (new) | — | — · — · — |
| richtext/RichTextEditorToolbar | 276.1 kB (new) · 454 B CSS (new) | — | — · — · — |
| richtext/RichTextView | 274.9 kB (new) · 2.3 kB CSS (new) | — | — · — · — |
Package size: measured; main has no measurement of the merge base to compare yet.
API changes: cli +22 · ~7 · −0 (against the merge base's committed report); theme-butter +1 · ~0 · −0 (against the merge base's committed report); theme-y2k +1 · ~0 · −0 (against the merge base's committed report)
Committed API report behind this build: cli 29 rows, core 35 rows, theme-butter 1 row, theme-y2k 1 row; run pnpm api:report.
31 API changes (advisory)
| Package | Where | Signature | Usage | |
|---|---|---|---|---|
| + | cli |
./api · Functions · function exportSearchIndex |
function exportSearchIndex @experimental: (options?: { cwd?: string | undefined; package?: string | undefined }) => Promise<SearchIndex> |
import {exportSearchIndex} from '@astryxdesign/cli/api'; exportSearchIndex(…) |
| + | cli |
./api · Functions · function rankSearchIndex |
function rankSearchIndex @experimental: (query: string, indexes: SearchIndex | SearchIndex[], options?: { type?: SearchDomain | undefined; limit?: number | undefined }) => Promise<SearchResponse> |
import {rankSearchIndex} from '@astryxdesign/cli/api'; rankSearchIndex(…) |
| + | cli |
./api · Types · type DocsListChild |
type DocsListChild = DocsNodeChild & { topic: string; description: string; children?: DocsListChild[]; childCount?: number } |
import type {DocsListChild} from '@astryxdesign/cli/api' |
| + | cli |
./api · Types · type DocsListNamespace |
childCount?: number | undefined |
import type {DocsListNamespace} from '@astryxdesign/cli/api'; const x: DocsListNamespace = {childCount: …} |
| + | cli |
./api · Types · type DocsListNamespace |
children?: DocsListChild[] | undefined |
import type {DocsListNamespace} from '@astryxdesign/cli/api'; const x: DocsListNamespace = {children: …} |
| + | cli |
./api · Types · type SearchIndex |
type SearchIndex |
import type {SearchIndex} from '@astryxdesign/cli/api' |
| + | cli |
./api · Types · type SearchResultEntry |
deprecated?: ComponentDeprecation | undefined |
import type {SearchResultEntry} from '@astryxdesign/cli/api'; const x: SearchResultEntry = {deprecated: …} |
| + | cli |
./authoring · Types · interface ComponentDeprecation |
interface ComponentDeprecation |
import type {ComponentDeprecation} from '@astryxdesign/cli/authoring' |
| + | cli |
./authoring · Types · interface ComponentIconSlotDoc |
interface ComponentIconSlotDoc |
import type {ComponentIconSlotDoc} from '@astryxdesign/cli/authoring' |
| + | cli |
./authoring · Types · interface ComponentIconSlotStateDoc |
interface ComponentIconSlotStateDoc |
import type {ComponentIconSlotStateDoc} from '@astryxdesign/cli/authoring' |
| + | cli |
./authoring · Types · interface MultiComponentDoc |
deprecated?: ComponentDeprecation |
import type {MultiComponentDoc} from '@astryxdesign/cli/authoring'; const x: MultiComponentDoc = {deprecated: …} |
| + | cli |
./authoring · Types · interface SingleComponentDoc |
deprecated?: ComponentDeprecation |
import type {SingleComponentDoc} from '@astryxdesign/cli/authoring'; const x: SingleComponentDoc = {deprecated: …} |
| + | cli |
./doc · Types · interface ComponentBaseDoc |
deprecated?: ComponentDeprecation |
import type {ComponentBaseDoc} from '@astryxdesign/cli/doc'; const x: ComponentBaseDoc = {deprecated: …} |
| + | cli |
./doc · Types · interface SubComponentDoc |
deprecated?: ComponentDeprecation |
import type {SubComponentDoc} from '@astryxdesign/cli/doc'; const x: SubComponentDoc = {deprecated: …} |
| + | cli |
./doc · Also exported from an earlier entry point · ComponentDeprecation |
ComponentDeprecation (./authoring) |
import {ComponentDeprecation} from '@astryxdesign/cli/doc' |
| + | cli |
./doc · Also exported from an earlier entry point · ComponentIconSlotDoc |
ComponentIconSlotDoc (./authoring) |
import {ComponentIconSlotDoc} from '@astryxdesign/cli/doc' |
| + | cli |
./doc · Also exported from an earlier entry point · ComponentIconSlotStateDoc |
ComponentIconSlotStateDoc (./authoring) |
import {ComponentIconSlotStateDoc} from '@astryxdesign/cli/doc' |
| + | cli |
./json · Also exported from an earlier entry point · DocsListChild |
DocsListChild (./api) |
import {DocsListChild} from '@astryxdesign/cli/json' |
| + | cli |
./json · Also exported from an earlier entry point · SearchIndex |
SearchIndex (./api) |
import {SearchIndex} from '@astryxdesign/cli/json' |
| + | cli |
./template · Also exported from an earlier entry point · ComponentDeprecation |
ComponentDeprecation (./authoring) |
import {ComponentDeprecation} from '@astryxdesign/cli/template' |
| + | cli |
./template · Also exported from an earlier entry point · ComponentIconSlotDoc |
ComponentIconSlotDoc (./authoring) |
import {ComponentIconSlotDoc} from '@astryxdesign/cli/template' |
| + | cli |
./template · Also exported from an earlier entry point · ComponentIconSlotStateDoc |
ComponentIconSlotStateDoc (./authoring) |
import {ComponentIconSlotStateDoc} from '@astryxdesign/cli/template' |
| ~ | cli |
./api · Functions · function search |
function search: (query: string, options?: { cwd?: string | undefined; type?: "template" | "component" | "hook" | "theme" | "doc" | undefined; limit?: number | undefined }) => Promise<SearchResponse> → function search: (query: string, options?: { cwd?: string | undefined; type?: "template" | "component" | "doc" | "theme" | "hook" | undefined; limit?: number | undefined }) => Promise<SearchResponse> |
import {search} from '@astryxdesign/cli/api'; search(…) |
| ~ | cli |
./api · Types · type SwizzleCopyResponse |
data: { component: string; package: string; outputDir: string; filesCopied: number; files: string[]; usesStyleX: boolean; feedback?: SwizzleFeedback | undefined } → data: { component: string; package: string; outputDir: string; filesCopied: number; files: string[]; usesStyleX: boolean; dependencies: Record<string, string>; marker … #84d9505b |
import type {SwizzleCopyResponse} from '@astryxdesign/cli/api'; const x: SwizzleCopyResponse = {data: …} |
| ~ | cli |
./authoring · Types · interface MultiComponentDoc |
theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[] } → theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[]; componentIcons?: ComponentIconSlotDoc[] } |
import type {MultiComponentDoc} from '@astryxdesign/cli/authoring'; const x: MultiComponentDoc = {theming: …} |
| ~ | cli |
./authoring · Types · interface SingleComponentDoc |
theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[] } → theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[]; componentIcons?: ComponentIconSlotDoc[] } |
import type {SingleComponentDoc} from '@astryxdesign/cli/authoring'; const x: SingleComponentDoc = {theming: …} |
| ~ | cli |
./authoring · Types · type TemplateCategory |
type TemplateCategory = | 'Dashboard - Analytics' | 'Dashboard - Comparison' | 'Dashboard - KPI Summary' | 'Dashboard - Monitoring' | 'Dashboard - Executive Summary' | 'Dashboard - Sco … #e7c18378 → type TemplateCategory = | 'Dashboard - Analytics' | 'Dashboard - Comparison' | 'Dashboard - KPI Summary' | 'Dashboard - Monitoring' | 'Dashboard - Executive Summary' | 'Dashboard - Sco … #a8be998f |
import type {TemplateCategory} from '@astryxdesign/cli/authoring' |
| ~ | cli |
./doc · Types · interface ComponentBaseDoc |
theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[] } → theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[]; componentIcons?: ComponentIconSlotDoc[] } |
import type {ComponentBaseDoc} from '@astryxdesign/cli/doc'; const x: ComponentBaseDoc = {theming: …} |
| ~ | cli |
./doc · Types · interface SubComponentDoc |
theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[] } → theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[]; componentIcons?: ComponentIconSlotDoc[] } |
import type {SubComponentDoc} from '@astryxdesign/cli/doc'; const x: SubComponentDoc = {theming: …} |
| + | theme-butter |
Public attributes · attr data-astryx-pressable |
attr data-astryx-pressable (public data attribute) |
[data-astryx-pressable] { … } |
| + | theme-y2k |
Public attributes · attr data-astryx-pressable |
attr data-astryx-pressable (public data attribute) |
[data-astryx-pressable] { … } |
Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.
Generated by PR Enrichment workflow | View full report
main moved Resizable's warnings to per-instance createDevWarnings and made QUIET null (#10655). This branch moves readWindowExtent to utils/windowExtent; the merge keeps both.
…t holds its width (#10577) * fix(Table): an unbounded column's resize handle announces a range that holds its width A column-resize separator on a column with no maximum width rendered no aria-valuemax, so assistive technology assumed ARIA's default of 100 and read the width past it. Such a handle now announces the window's inline extent as its maximum, floored at its value and minimum, as an unbounded Resizable region does, and its width in words ("133 pixels"), since that maximum stands in for a missing limit. The server render carries no maximum until hydration reads the window. A column with maxWidth is unchanged. Record: useTableColumnResize AR7 and its verification row. Adds the @astryx.table.columnResize.widthValue catalog string. * fix(Table): one shared window-width store; plural value text; record Addresses review on the separator range: - The window width every unbounded handle announces comes from one shared store in utils/windowExtent.ts, with one resize listener and a stable snapshot, so render and commit read no layout (INV18). Resizable's stand-in maximum calls the same readWindowExtent and standInMaximum, so the two share one rule; its behavior is unchanged. - The value text is plural-aware: "{width, number} {width, plural, one {pixel} other {pixels}}". - Record: AR1 points at AR7 for the value bounds; Compatibility records the changed announced range; AR7 says the handle announces its value in words and names the known gap (the value is the minimum until a first resize). The changeset says the same. * review: the width store follows a root observation; whole-pixel value text - The window-width store is fed by the shared resize observer on the root element and reads innerWidth inside its report, so no resize event reads layout (INV18). The snapshot stays stable. - The value text says a whole number of pixels: a 202.656 px column reads "203 pixels". Tests: no window resize listener, and the fractional case. * Merge branch 'main' into fix/table-resize-separator-range * Merge main into the Table resize range announcement main moved Resizable's warnings to per-instance createDevWarnings and made QUIET null (#10655). This branch moves readWindowExtent to utils/windowExtent; the merge keeps both. * docs(Table): name the fallback maximum as assistive technology's, not a default
…dth (#10593) * fix(Table): an unbounded column's resize handle announces a range that holds its width A column-resize separator on a column with no maximum width rendered no aria-valuemax, so assistive technology assumed ARIA's default of 100 and read the width past it. Such a handle now announces the window's inline extent as its maximum, floored at its value and minimum, as an unbounded Resizable region does, and its width in words ("133 pixels"), since that maximum stands in for a missing limit. The server render carries no maximum until hydration reads the window. A column with maxWidth is unchanged. Record: useTableColumnResize AR7 and its verification row. Adds the @astryx.table.columnResize.widthValue catalog string. * fix(Table): a column resize handle announces the column's rendered width Until a column was first resized, its handle's aria-valuenow was the column's minimum width, so a screen reader read a 200px column as 60px. The handle now reads its column's width from the shared resize observer after layout (never in render) and announces it, following the column as it is resized; until the first measurement it falls back to the width the table asked for, then the minimum. Record: useTableColumnResize AR8 and its verification row; a jsdom case and a Chromium accessibility-tree case. * fix(Table): one shared window-width store; plural value text; record Addresses review on the separator range: - The window width every unbounded handle announces comes from one shared store in utils/windowExtent.ts, with one resize listener and a stable snapshot, so render and commit read no layout (INV18). Resizable's stand-in maximum calls the same readWindowExtent and standInMaximum, so the two share one rule; its behavior is unchanged. - The value text is plural-aware: "{width, number} {width, plural, one {pixel} other {pixels}}". - Record: AR1 points at AR7 for the value bounds; Compatibility records the changed announced range; AR7 says the handle announces its value in words and names the known gap (the value is the minimum until a first resize). The changeset says the same. * Merge branch 'fix/table-resize-separator-range' into fix/table-resize-rendered-width Takes #10577's review round (shared window-width store, plural value text, AR1/AR7 record). AR7 drops its known-gap sentence: AR8 closes it. * review: the width store follows a root observation; whole-pixel value text - The window-width store is fed by the shared resize observer on the root element and reads innerWidth inside its report, so no resize event reads layout (INV18). The snapshot stays stable. - The value text says a whole number of pixels: a 202.656 px column reads "203 pixels". Tests: no window resize listener, and the fractional case. * review: the announced range holds the rendered width; ref-owned observation - A column the layout renders past its maxWidth, or under its minWidth, announces a range widened to hold the width it reports: aria-valuemax is at least the value, aria-valuemin at most. Test: a 180 px column under maxWidth 150 (fails on the previous head, where max stayed 150). - The header cell's resize observation lives in a stable callback ref on the separator that returns its unsubscribe, not a mount-only Effect. - Record: AR7 says what a column rendered past its limits announces; the compatibility bullet names AR8's value change; the AR8 verification row gives the Chromium case two ArrowRight presses, which the spec now runs. - The changeset covers the bounded case. * Merge #10577 (root-observer width store, whole-pixel value text) into the rendered-width fix * changeset: drop the "until first resized" sentence, which this PR replaces This stack ships both changesets; the rendered-width fix here makes the separator-range note's "until a column is first resized, that value is still its minimum width" untrue, so it goes. * Merge branch 'main' into fix/table-resize-separator-range * Merge main into the Table resize range announcement main moved Resizable's warnings to per-instance createDevWarnings and made QUIET null (#10655). This branch moves readWindowExtent to utils/windowExtent; the merge keeps both. * Merge the updated range announcement (with main) into the rendered-width change * docs(Table): name the fallback maximum as assistive technology's, not a default * Merge the reworded range announcement record into the rendered-width change * Merge main (with #10577 squash-merged) into the rendered-width change The base branch merged as one squash commit, so this merge takes main's tree and reapplies only this change's own diff on top of it.
Stack
Row virtualization is split into eight stacked PRs, each under the 2,000-line limit. Each PR's base is the one above it, so review and merge from the top of this list down.
Two record amendments the stack relies on: #10665 (Table adopts the shared list-windowing module first) and #10666 (a windowed row-number column fits its last position).
Maintainer impact
Windowed Table rows (later in this stack) need two shared owners that exist today only in part: per-instance warning deduplication for code that cannot call hooks, and a temporary focus target when the focused row unmounts. Copying either into Table would create a second owner, and Resizable, Dialog, TabList and Chat already keep their own copies.
Intended invariant
One owner for each concern:
devWarningowns per-instance deduplication for both the render-safeuseDevWarninghook and imperative callers, andfocusReturnowns where focus goes and any temporary focusability it adds.Change
utils/devWarning.ts: a small factory that dedupes warnings per instance and per key.useDevWarningnow uses it, and a newuseDevWarningPerMessagededupes per message. Each hook keeps its factory in state, so Fast Refresh keeps the dedupe. Public warning text, prefixes and production silence are unchanged.utils/focusReturn.ts: when focus has to move to an owner that is not focusable, such as a scroll region, the owner gets a temporarytabindexthat is released when focus moves on or the owner is removed (focusForLastInputTemporarily,releaseTemporaryFocus).createResizable/resolveBound,DialogandTabListdedupe their per-instance warnings throughcreateDevWarnings, with the same text and once-per-instance behavior.focusForLastInputTemporarily, with the same focus target, and keeps the focus ring hidden for a pointer or touch press.[chore] InternalChangeset names@astryxdesign/core.Evidence
useDevWarning, Resizable, Dialog, TabList and Chat tests pass unchanged.Scope
Testing
--max-warnings=0) on every changed file, andpnpm typecheckinpackages/corepass on this exact head.vitest run --project ui packages/coreat the top of this stack: 20,720 tests pass. The Resizable, Dialog, TabList, Chat, hooks and utils suites pass on this PR's own head. Four locale time-format tests (DateTimeInput,TimeInput,timeFormat) fail on the local machine's ICU data and pass in CI; they do not touch Table.node scripts/pre-review.mjs --base <the branch below>: 381 authored lines.main, that is, after the PRs below it merge.This PR was generated with AI assistance (Navi).