-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
[core] Use hidden
prop for keepMounted
elements
#815
base: master
Are you sure you want to change the base?
Conversation
if (transitionStatus !== 'entering') { | ||
setTransitionStatus('entering'); | ||
} |
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 is necessary after the change, and also seems to fix the CSS Transition Group demo in the popups experiment. Likely should have been the case originally.
Netlify deploy preview |
b11927a
to
14657b6
Compare
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.
Looks good overall. I have just some minor comments.
@@ -9,13 +9,15 @@ import type { | |||
import { mergeReactProps } from '../../utils/mergeReactProps'; | |||
import { useAnchorPositioning } from '../../utils/useAnchorPositioning'; | |||
import type { GenericHTMLProps } from '../../utils/types'; | |||
import { getInertValue } from '../../utils/getInertValue'; |
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.
Is getInertValue
still used anywhere? If not, we can remove it.
@@ -26,7 +28,7 @@ export function usePopoverPositioner( | |||
renderedSide, | |||
renderedAlignment, | |||
positionerContext, | |||
} = useAnchorPositioning(params); | |||
} = useAnchorPositioning({ ...params, mounted }); |
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.
Destructuring the object manually could be faster at runtime.
Popup animations: https://deploy-preview-815--base-ui.netlify.app/experiments/tooltip
keepMounted
by default[data-entering]
and wait 1 frame as well, oncehidden
gets removed on openinert
is no longer necessary for these componentskeepMounted
components, both on initial mount and for the lifetime of the mount