Repository navigation
spec(interaction-modality): wrapper focus rings come from one shared owner module - #9183
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
…vate-attribute owners
|
/approve-spec 6fee387 |
PR Analysis Report
📚 Storybook Preview🧪 Sandbox PreviewNo new or modified components detected. Bundle Size SummaryNo component packages changed. Published Package SizeNo published package changed size (11 measured). Download is the gzip tarball npm fetches; unpacked is what lands in Accessibility AuditStatus: Accessibility did not run on this pull request; add Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
There was a problem hiding this comment.
Changes requested: the INV3 direction is approved, but the record names privateAttributes/focusOwner.stylex.ts, which doesn't exist yet, while Item, Token, the clickable and selectable cards, Thumbnail, the Selectors and SideNavItem still write their own ring conditions. Please mark that as an implementation gap in INV3 and open the INV3 verification row's new cases with an evidence-gap note, as the INV11 row and INV13 already do, or land the module together with the record. Please also redo the ## Writing rubric results lines using the six R1–R6 items from the specification template, saying what each pass found.
[Automated review]
| | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | INV1, INV2 | Programmatic-focus cases after keyboard and pointer input in representative component tests | Programmatic focus invents a modality, or pointer history paints the keyboard indicator | | ||
| | INV3 | Direct-owner, wrapper-owner, replaceable-indicator, and nested-action cases | No indicator, two indicators, or replacement content can opt out | | ||
| | INV3 | Direct-owner, wrapper-owner, replaceable-indicator, and nested-action cases, including a Token inside an Item and a control inside a card, with the wrapper ring from `privateAttributes/focusOwner.stylex.ts` | No indicator, two indicators, replacement content that can opt out, or a component that writes the focus-owner attribute or selector itself | |
There was a problem hiding this comment.
This row and INV3 (lines 118–123) cite privateAttributes/focusOwner.stylex.ts, which doesn't exist yet, while ten wrapper sites still use focusWithin, focusWithinFirstChild or focusWithinCombobox. Suggest opening the new cases the way the INV11 row does ("Evidence gap: the focus-owner module and its adopters are pending. Then: …"), plus an implementation-gap note in INV3 naming the wrappers still on focusOutline.stylex.ts.
|
/approve-spec d1920d3 |
There was a problem hiding this comment.
Changes requested: the INV3 direction is approved, and the gap marking and rubric results now read correctly, but the INV3 implementation-gap sentence leaves out the Chat composer. ChatComposer's body rings for its editor among the header, footer and send actions with its own state-gated condition (packages/core/src/Chat/ChatComposer.tsx:552-561), which is exactly the wrapper INV3 now covers, so please add it to the gap sentence or say why it sits outside INV3. Separately, when the module lands, astryx swizzle will need a way to carry it, since the record keeps it unexported and swizzle rewrites cross-directory .stylex imports to package subpaths.
[Automated review]
| gap: the module does not exist yet, and Item, Token, the clickable and | ||
| selectable cards, Thumbnail, the Selectors, and SideNavItem write their own | ||
| ring conditions. |
There was a problem hiding this comment.
This list leaves out the Chat composer: its body rings for the editor among the header, footer and send actions, and it writes its own condition (hasKeyboardEditorFocus && focusOutlineStyles.focusWithin, packages/core/src/Chat/ChatComposer.tsx:552-561). Suggest adding "the Chat composer's body" here, or stating why it is outside INV3.
|
/approve-spec 4db674d |
There was a problem hiding this comment.
Recommending approval: the INV3 focus-owner rule is approved by an engineering owner at this head, and its implementation-gap sentence now names every wrapper that still writes its own ring condition, the Chat composer's body included. Nothing more is needed in this pull request; the owner module, its adopters, the swizzle carry and the new INV3 verification cases (a Token inside an Item, a control inside a card) follow with the implementation.
[Automated review]
|
/approve-spec eecb7ac |
Maintainer impact
Item, Token, the clickable and selectable cards, Thumbnail and the Selector triggers paint a ring on their wrapper for one primary control while other controls sit inside them. Today a nested control can light both rings, or each component writes its own copy of the wiring. This record makes every such wrapper take one shared ring style and one private owner attribute from a single internal module, so keyboard users see exactly one ring and the ring has one definition.
Decision
interaction-modalityINV3: a Core wrapper that paints the ring for one primary control takes the one shared focus-owner style and owner attribute fromprivateAttributes/focusOwner.stylex.ts; the wrapper rings only while that control has keyboard focus, a nested owner or a sibling control rings itself, and no component writes the attribute or its selector itself.privateAttributes/focusOwner.stylex.ts, which is not exported from the package.The module follows the private-attribute owner-module convention (public-component-api INV23, proposed alongside it), so it lives in that convention's folder.
Evidence
Writing rubric results