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

Remove delay when isAnimated: false #1605

Merged
merged 1 commit into from
Nov 15, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function AnimatedArea({

const springConfig = useSpringConfig({
shouldAnimate: !immediate,
animationDelay: delay,
animationDelay: immediate ? 0 : delay,
mountedSpringConfig: LINES_TRANSITION_CONFIG,
unmountedSpringConfig: LINES_LOAD_ANIMATION_CONFIG,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function AnimatedLine({

const springConfig = useSpringConfig({
shouldAnimate: !immediate,
animationDelay: delay,
animationDelay: immediate ? 0 : delay,
mountedSpringConfig: LINES_TRANSITION_CONFIG,
unmountedSpringConfig: LINES_LOAD_ANIMATION_CONFIG,
});
Expand Down
6 changes: 5 additions & 1 deletion packages/polaris-viz/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

<!-- ## Unreleased -->
## Unreleased

### Fixed

- Fixed issue where stacked `<BarChart />`, `<AnimatedLine />` & `<AnimatedArea />` would still have a staggered delay when rendering bars/groups if `isAnimated: false`.

## [9.18.1] - 2023-11-14

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function AnimatedArea({

const springConfig = useSpringConfig({
shouldAnimate,
animationDelay: delay,
animationDelay: shouldAnimate ? delay : 0,
mountedSpringConfig: AREAS_TRANSITION_CONFIG,
unmountedSpringConfig: AREAS_LOAD_ANIMATION_CONFIG,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function Stack({
transform: `scale(1, 1)`,
},
config: BARS_TRANSITION_CONFIG,
delay: animationDelay,
delay: shouldAnimate ? animationDelay : 0,
default: {immediate: !shouldAnimate},
});

Expand Down
Loading