-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DS fixes and updates #1275
DS fixes and updates #1275
Conversation
resolves issue with `Calendar` elements within `Dialog` receiving incorrect props
the tray itself has a max-width, so we just strip it off the dialog grid in that case
🦋 Changeset detectedLatest commit: 2fd964e The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
// @ts-expect-error FIXME: not sure how to properly resolve this type issue | ||
useImperativeHandle(forwardedRef, () => ({ | ||
...triggerRef.current, | ||
focus() { | ||
state.setFocused(true); | ||
}, | ||
})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem right, forwardedRef
is already being passed to FieldPrimitive
? And what is being focused here? I assume not the trigger button since then overriding it here wouldn't change anything right? Also, not sure about spreading an HTMLElement
like this since i think lots of methods wouldn't work since the this
wouldn't be right + it would unnecessarily evaluate a bunch of getters, maybe something like this might make sense?
useImperativeHandle(forwardedRef, () => ({
get trigger() {
return triggerRef.currrent;
},
focus() {
state.setFocused(true);
},
}));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove this from the PR and we can revisit later 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit of context: Internally, spectrum packs and unpacks refs with useDOMRef
, which lets them target the focusable element. I'd like to avoid that awkwardness but may have been a bit hasty in my implementation.
revisit later
Some things I noticed while integrating with Keystone.
Updates:
Button
Checkbox
ActionButton
ActionBar
TextArea
min-height to 3 linesFixes:
Picker
refNavItem
stylesPicker
selected textContent
children—resolves issue withCalendar
elements withinDialog
receiving incorrect propsTray
when "size" provided toDialog
component