fix(core): forward pass-through props on six more BaseProps components - #5656
Open
harjothkhara wants to merge 1 commit into
Open
fix(core): forward pass-through props on six more BaseProps components#5656harjothkhara wants to merge 1 commit into
harjothkhara wants to merge 1 commit into
Conversation
Layout, MetadataList, NavHeadingMenuItem, RadioList, TimeInput, and TopNavMegaMenuItem declared extends BaseProps but destructured a closed set of props with no rest spread, so aria-*, id, data-*, and event handlers type-checked and silently never reached the DOM. Forward the rest object to the element each ref targets, composing consumer handlers in front of component-owned ones with composeEventHandlers (RadioList onFocus; TimeInput onFocus/onBlur/onKeyDown). Same class and same fix shape as the facebook#5254 batches (facebook#5288, facebook#5493, facebook#5563); these six were not in that issue's tarball-derived list. PowerSearch shares the shape and is deliberately left out - its forwarding target is an API decision.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsLayout (@astryxdesign/core) · View in Storybook
MetadataList (@astryxdesign/core) · View in Storybook
NavMenu (@astryxdesign/core) · View in Storybook
RadioList (@astryxdesign/core) · View in Storybook
TimeInput (@astryxdesign/core) · View in Storybook
TopNav (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: 1 accessibility violation(s) found — 1 serious. RadioList - 1 issue(s)
Visual Regression1274 added · 0 removed. View the report To accept these exact frames: Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
harjothkhara
marked this pull request as ready for review
August 29, 2026 02:36
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.



Summary
Six components declared
extends BasePropsbut destructured a closed set of props with no rest spread, soaria-*,id,data-*, and event handlers type-checked and silently never reached the DOM. This forwards them, following the exact pattern of the three earlier batches for this class (#5288, #5493, #5563).Case
#5254 found ten components with this shape against the 0.4.5 tarball; #5563 closed it as the final batch. Sweeping current
main(1b706d5d2) the same way — everypackages/core/srccomponent whose props interface extendsBaseProps, checked for a rest element in its destructure — finds seven more that were not in #5254's list:Layout.tsx:238— root<div>(Layout.tsx:264) gets nothing;Layoutdoes not even acceptdata-testidtodayMetadataList.tsx:190— root<div>(MetadataList.tsx:282) gets nothing, whileMetadataListItemwas fixed in fix(core): forward pass-through props on seven BaseProps components #5563NavHeadingMenuItem.tsx:120— item element gets nothing, whileNavHeadingMenuwas fixed in fix(core): forward pass-through props on seven BaseProps components #5563RadioList.tsx:191— therole="radiogroup"element (RadioList.tsx:377) gets nothingTimeInput.tsx— the native<input>(TimeInput.tsx:650) gets nothing; consumeronFocus/onBlur/onKeyDownare also dropped because the input's own handlers occupy those slotsTopNavMegaMenuItem.tsx:183— both drawer and default mode elements get nothing, whileTopNavMegaMenuwas fixed in fix(core): forward pass-through props on seven BaseProps components #5563PowerSearch.tsx— same shape, deliberately not fixed here (see Scope)Fix
Each component forwards the rest object to the element its
reftargets, spread so contract-owned attributes (role, computedaria-labelledby/aria-describedby, the rovingtabIndex) cannot be clobbered. Where the component already owns a handler for the same event, the caller's handler is composed in front withcomposeEventHandlers, per the existing convention:RadioListcomposesonFocuswith its tooltip-anchor focus handlingTimeInputcomposesonFocus,onBlur, andonKeyDownwith its formatting and arrow-key stepping handlers, so a caller handler runs first and stepping still works (asserted in the tests)Scope
PowerSearchis left out on purpose: it is a composite of a Tokenizer, a listbox, and an edit popover, and which element should receive pass-throughs is an API decision, not a mechanical fix. Called out here rather than guessed at.Layoutis listed in the Standardize layout component props: derive a shared prop set for Stack/Grid/Center/Section/Layout/FormLayout #3223 prop-standardization discussion; this change only forwards whatLayoutPropsalready publicly accepts and does not touch its typed surface, but flagging the overlap.Testing
pnpm -F @astryxdesign/core test): 12890 passed with this change vs 12875 at base — the only delta is the 15 new tests. 31 failures appear in both runs identically (Dialog/Toast motion,packages/buildvite layers, CLI doc tests); the same 7 files pass 170/170 when run standalone at base, so they are full-suite-only and pre-existing, not from this change.@astryxdesign/coretypecheck: passing.node scripts/check-changesets.mjs: 74 changesets valid.Changeset:
.changeset/baseprops-passthrough-batch-four.md(@astryxdesign/core: patch).Refs #5254 (the original report for this class; its list predates these six)