Skip to content
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

[Backport 1.x] feat: use faster animations for modals, popovers, and tooltips #1289

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/modal/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
border-radius: $ouiBorderRadius;
z-index: $ouiZModal;
min-width: $ouiFormMaxWidth;
animation: ouiModal $ouiAnimSpeedSlow $ouiAnimSlightBounce;
animation: ouiModal $ouiAnimSpeedExtraFast $ouiAnimSlightBounce;
max-width: calc(100vw - #{$ouiSize});

// Remove the outline from the focusable container
Expand Down
10 changes: 5 additions & 5 deletions src/components/popover/_popover.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@
opacity: 0; /* 2 */
visibility: hidden; /* 2 */
transition: /* 2 */
opacity $ouiAnimSlightBounce $ouiAnimSpeedSlow,
visibility $ouiAnimSlightBounce $ouiAnimSpeedSlow;
opacity $ouiAnimSlightBounce $ouiAnimSpeedExtraFast,
visibility $ouiAnimSlightBounce $ouiAnimSpeedExtraFast;

// Don't animate when using the attached mode like for inputs
&:not(.ouiPopover__panel-isAttached) {
transform: translateY(0) translateX(0) translateZ(0); /* 2 */
transition: /* 2 */
opacity $ouiAnimSlightBounce $ouiAnimSpeedSlow,
visibility $ouiAnimSlightBounce $ouiAnimSpeedSlow,
transform $ouiAnimSlightBounce ($ouiAnimSpeedSlow + 100ms);
opacity $ouiAnimSlightBounce $ouiAnimSpeedExtraFast,
visibility $ouiAnimSlightBounce $ouiAnimSpeedExtraFast,
transform $ouiAnimSlightBounce ($ouiAnimSpeedExtraFast + 100ms);
}

&.ouiPopover__panel-isOpen {
Expand Down
8 changes: 0 additions & 8 deletions src/components/tool_tip/_tool_tip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,47 +86,39 @@
@keyframes ouiToolTipTop {
0% {
opacity: 0;
transform: translateY(-$ouiSize);
}

100% {
opacity: 1;
transform: translateY(0);
}
}

@keyframes ouiToolTipBottom {
0% {
opacity: 0;
transform: translateY($ouiSize);
}

100% {
opacity: 1;
transform: translateY(0);
}
}

@keyframes ouiToolTipLeft {
0% {
opacity: 0;
transform: translateX(-$ouiSize);
}

100% {
opacity: 1;
transform: translateY(0);
}
}

@keyframes ouiToolTipRight {
0% {
opacity: 0;
transform: translateX($ouiSize);
}

100% {
opacity: 1;
transform: translateY(0);
}
}
2 changes: 1 addition & 1 deletion src/global_styling/mixins/_tool_tip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
}

@mixin ouiToolTipAnimation($side: 'top') {
animation: #{map-get($ouiTooltipAnimations, $side)} $ouiAnimSpeedSlow ease-out 0s forwards;
animation: #{map-get($ouiTooltipAnimations, $side)} $ouiAnimSpeedExtraFast ease-out 0s forwards;
}


Expand Down
2 changes: 1 addition & 1 deletion src/themes/oui-next/global_styling/mixins/_tool_tip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
}

@mixin ouiToolTipAnimation($side: 'top') {
animation: #{map-get($ouiTooltipAnimations, $side)} $ouiAnimSpeedSlow ease-out 0s forwards;
animation: #{map-get($ouiTooltipAnimations, $side)} $ouiAnimSpeedExtraFast ease-out 0s forwards;
}


Expand Down
Loading