-
Notifications
You must be signed in to change notification settings - Fork 909
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
427 add info button and tooltip #22009
base: trunk
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 557765baca9041e958d9ce92ff2c01e25aef83d6Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Co-authored-by: Paolo L. Scala <[email protected]>
|
||
--yst-display-tooltip: none; | ||
|
||
&:hover, &:focus-within { | ||
--yst-display-tooltip: inline-block; | ||
} |
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 variable is used in the tooltip CSS:
display: var(--yst-display-tooltip, inline-block); |
import Tooltip from "../../elements/tooltip"; | ||
import { useToggleState } from "../../hooks"; | ||
|
||
const GRACE_MRGIN = 10; |
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.
const GRACE_MRGIN = 10; | |
const GRACE_MARGIN = 10; |
aria-describedby={ ariaDescribedby } | ||
aria-disabled={ true } | ||
onMouseEnter={ show } |
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.
Should this be onPointerEnter
?
@@ -38,12 +45,14 @@ Tooltip.propTypes = { | |||
children: PropTypes.node, | |||
className: PropTypes.string, | |||
position: PropTypes.oneOf( Object.keys( positionClassNameMap ) ), | |||
variant: PropTypes.oneOf( [ "dark", "light" ] ), |
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.
variant: PropTypes.oneOf( [ "dark", "light" ] ), | |
variant: PropTypes.oneOf( Object.keys( variantClassNameMap ) ), |
document.removeEventListener( "pointermove", handleMouseMove ); | ||
handleMouseMove.cancel(); | ||
}; | ||
}, [ show, hide, triggerRef, tooltipPosition, isVisible ] ); |
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 don't think triggerRef
every changes. Do you mean triggerRef.current
to verify the DOM node / memory address?
Context
Summary
This PR can be summarized in the following changelog entry:
Relevant technical choices:
Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
info-dummy-data.patch.
UI Library - Tooltip container component
Relevant test scenarios
Test instructions for QA when the code is in the RC
QA can test this PR by following these steps:
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
UI changes
Other environments
[shopify-seo]
, added test instructions for Shopify and attached theShopify
label to this PR.Documentation
Quality assurance
Innovation
innovation
label.Fixes Add info button and tooltip