-
Notifications
You must be signed in to change notification settings - Fork 195
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
fix(tooltip): custom animation distance overrides overlay value #2266
Conversation
🚀 Deployed on https://pr-2266--spectrum-css.netlify.app |
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.
It would be useful to compare the actual output here for review, to ensure we're not seeing any values forced on us from the mixins leveraged here?
Is there benefit from using --spectrum-overlay-animation-distance
or a similar value in the various directions rather than all of var(--mod-tooltip-animation-distance, var(--spectrum-tooltip-animation-distance))
each time?
@Westbrook hello! Yes, below is the dist output on prod vs this PR. Before this PR, we were relying on some transform values in Instead of trying to force the animation-distance to be something different than in Let me know what other questions you have. |
components/tooltip/index.css
Outdated
@@ -122,6 +119,7 @@ governing permissions and limitations under the License. | |||
} | |||
|
|||
&.is-open { | |||
--spectrum-overlay-animation-distance: var(--mod-tooltip-animation-distance, var(--spectrum-tooltip-animation-distance)); |
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.
Overwriting this value in the .is-open
state means that JS application will not have access to this value while the Tooltip is closed. I can't remember right off why someone was asking about that recently, but would it be that different to move this onto the default rule?
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 either didn't send this earlier or it disappeared, so for posterity:
Good catch! We don't need this overwrite since we've refactored the transforms so I removed it.
08e2112
to
b9aa8b1
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.
LGTM!
b9aa8b1
to
e8ac3ad
Compare
e8ac3ad
to
8916055
Compare
Description
Per issue #2156, Tooltips (all variants except the hover variant) were inheriting the wrong animation distance (6px instead of the 4px that is noted in the spec). This work adjusts the animation distance for the component.
How and where has this been tested?
Please tag yourself on the tests you've marked complete to confirm the tests have been run by someone other than the author.
Validation steps
--spectrum-tooltip-animation-distance
token.Regression testing
Validate:
Screenshots
To-do list