-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix: colorwheel stuck and table checkbox not aligned #9862
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
Changes from all commits
7c12109
9d4acfd
56a1ace
09d372b
22a258e
7775ed0
ae2596b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1112,12 +1112,11 @@ export const style = createTheme({ | |
| animationDuration: 150, | ||
| animationTimingFunction: 'default' | ||
| }), | ||
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
| truncate: (_value: true) => ({ | ||
| overflowX: 'hidden', | ||
| overflowY: 'hidden', | ||
| textOverflow: 'ellipsis', | ||
| whiteSpace: 'nowrap' | ||
| truncate: (value: boolean) => ({ | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure why i can't set these to undefined, or return an empty object |
||
| overflowX: value ? 'hidden' : 'visible', | ||
| overflowY: value ? 'hidden' : 'visible', | ||
| textOverflow: value ? 'ellipsis' : 'clip', | ||
| whiteSpace: value ? 'nowrap' : 'normal' | ||
| }), | ||
| font: (value: keyof typeof fontSize) => { | ||
| let type = value.split('-')[0]; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import {movePropToChildComponent, updatePropName} from '../../shared/transforms'; | ||
| import {NodePath} from '@babel/traverse'; | ||
| import * as t from '@babel/types'; | ||
|
|
||
| /** | ||
| * Transforms MenuTrigger: | ||
| * - Rename `closeOnSelect` to `shouldCloseOnSelect` and move it to the child `Menu`. | ||
| */ | ||
| export default function transformMenuTrigger(path: NodePath<t.JSXElement>): void { | ||
| updatePropName(path, {oldPropName: 'closeOnSelect', newPropName: 'shouldCloseOnSelect'}); | ||
|
|
||
| movePropToChildComponent(path, { | ||
| parentComponentName: 'MenuTrigger', | ||
| childComponentName: 'Menu', | ||
| propName: 'shouldCloseOnSelect' | ||
| }); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -237,21 +237,23 @@ export function useColorWheel(props: AriaColorWheelOptions, state: ColorWheelSta | |
| }, movePropsContainer); | ||
|
|
||
| let thumbInteractions = isDisabled ? {} : mergeProps({ | ||
| onMouseDown: (e: React.MouseEvent) => { | ||
| if (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey) { | ||
| return; | ||
| } | ||
| onThumbDown(undefined); | ||
| }, | ||
| onPointerDown: (e: React.PointerEvent) => { | ||
| if (e.pointerType === 'mouse' && (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey)) { | ||
| return; | ||
| } | ||
| onThumbDown(e.pointerId); | ||
| }, | ||
| onTouchStart: (e: React.TouchEvent) => { | ||
| onThumbDown(e.changedTouches[0].identifier); | ||
| } | ||
| ...(typeof PointerEvent !== 'undefined' ? { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. weird that always providing each of those handlers caused an issue in iOS, but I guess this follows how we did this for track interactions. What was the exact sequence of event that was clashing here?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure, i just matched colorArea |
||
| onPointerDown: (e: React.PointerEvent) => { | ||
| if (e.pointerType === 'mouse' && (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey)) { | ||
| return; | ||
| } | ||
| onThumbDown(e.pointerId); | ||
| }} : { | ||
| onMouseDown: (e: React.MouseEvent) => { | ||
| if (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey) { | ||
| return; | ||
| } | ||
| onThumbDown(undefined); | ||
| }, | ||
| onTouchStart: (e: React.TouchEvent) => { | ||
| onThumbDown(e.changedTouches[0].identifier); | ||
| } | ||
| }) | ||
| }, keyboardProps, movePropsThumb); | ||
| let {x, y} = state.getThumbPosition(thumbRadius); | ||
|
|
||
|
|
||
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.
Noticed the focus ring doesn't appear on the TableView's checkbox now. What is the root issue of the checkbox alignment issue?
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.
Honestly, I'm not entirely sure, something about alignContent worked to centre it everywhere except for in Safari mobile. Mostly seemed like a happy accident since there was no display flex or anything on the containing cell
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.
ok, it looks like it was previously depending on span being text aligned center, but safari ios just for some reason wouldn't do that. centering that way was always iffy, flex is better, more predictable
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.
gotcha, thanks for the explanation. Unrelated, I was hoping that these changes would also fix the weird FF select all check box cell sizing as a side effect but no luck :(
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.
yeah, i haven't had any thoughts on how to address that yet :-/