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

Add sidebarAnimations config prop #1601

Conversation

michaltaberski
Copy link
Contributor

@michaltaberski michaltaberski commented Aug 5, 2017

Issue:

What I did

add option sidebarAnimations which allows to disable sidebar tree animation. By default animations are enabled

How to test

import { setOptions } from '@storybook/addon-options';

setOptions({
  sidebarAnimations: false,
});

@codecov
Copy link

codecov bot commented Aug 5, 2017

Codecov Report

Merging #1601 into master will decrease coverage by 0.62%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1601      +/-   ##
==========================================
- Coverage   21.05%   20.42%   -0.63%     
==========================================
  Files         244      241       -3     
  Lines        5311     5254      -57     
  Branches      669      666       -3     
==========================================
- Hits         1118     1073      -45     
+ Misses       3670     3654      -16     
- Partials      523      527       +4
Impacted Files Coverage Δ
lib/ui/src/modules/api/index.js 0% <ø> (ø) ⬆️
...b/ui/src/modules/ui/components/left_panel/index.js 100% <ø> (ø) ⬆️
...les/ui/components/left_panel/stories_tree/index.js 100% <100%> (ø) ⬆️
lib/ui/src/modules/ui/containers/left_panel.js 25.71% <50%> (+0.71%) ⬆️
lib/ui/src/modules/ui/components/search_box.js 16.66% <0%> (-67.71%) ⬇️
lib/ui/src/modules/ui/containers/search_box.js 33.33% <0%> (-66.67%) ⬇️
lib/ui/src/compose.js 20% <0%> (-13.34%) ⬇️
...ponents/left_panel/stories_tree/tree_decorators.js 29.57% <0%> (-3.76%) ⬇️
lib/ui/src/modules/ui/containers/routed_link.js
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f36dac3...cee0081. Read the comment docs.

Copy link
Member

@Hypnosphi Hypnosphi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Hypnosphi
Copy link
Member

In fact, we can think about using CSS transitions instead of JS animation provided by react-treebeard to make things less laggy with heavy stories. But an ability to completely opt out of animations won't hurt anyway

@ndelangen ndelangen merged commit e01fd7a into storybookjs:master Aug 5, 2017
@usulpro
Copy link
Member

usulpro commented Aug 5, 2017

whether it will lead to the fact that in the future we will have a bunch of options for tweaking UI? I guess we'll able to provide the same options via UI components when it's ready

@ndelangen
Copy link
Member

Indeed @usulpro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants