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

Don't scroll story on knob change #3639

Merged
merged 1 commit into from
May 23, 2018
Merged

Don't scroll story on knob change #3639

merged 1 commit into from
May 23, 2018

Conversation

Hypnosphi
Copy link
Member

Issue: When changing knobs, example is scrolled to top

@codecov
Copy link

codecov bot commented May 23, 2018

Codecov Report

Merging #3639 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3639      +/-   ##
==========================================
- Coverage   39.99%   39.98%   -0.01%     
==========================================
  Files         481      481              
  Lines        5248     5249       +1     
  Branches      862      863       +1     
==========================================
  Hits         2099     2099              
  Misses       2631     2631              
- Partials      518      519       +1
Impacted Files Coverage Δ
lib/core/src/client/preview/start.js 0% <0%> (ø) ⬆️

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 2c24c45...bb00773. Read the comment docs.

@ndelangen ndelangen merged commit 79375c2 into master May 23, 2018
@ndelangen ndelangen deleted the knob-no-scroll branch May 23, 2018 22:20
@Hypnosphi
Copy link
Member Author

Released as 4.0.0-alpha.8

@Primigenus
Copy link
Contributor

I don't know if this change is what caused it, but now I'm seeing the page scroll to the bottom (in fact, all scrollable elements on the page get scrolled to the bottom/to the right) when changing a knob. From your code change it doesn't seem like it would be related, but perhaps the reason the code was there was to offset this behavior?

@Hypnosphi
Copy link
Member Author

I can't reproduce it in our official examples, can you?

@ndelangen
Copy link
Member

I can't either

@Primigenus
Copy link
Contributor

Hmm. I did some testing to figure out what's different on my end and it looks like it's the addon-a11y decorator, which is running each re-render and causing everything to scroll. Has something changed about it recently? I've had the addon since I started this storybook and it's only recently started doing this. (There is also a significant performance hit associated with axe running each time you change a knob -- ah, just found #3683)

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.

3 participants