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

Issue with auto-scroll to components based on URL hash #59

Closed
matt-west opened this issue Aug 17, 2016 · 3 comments
Closed

Issue with auto-scroll to components based on URL hash #59

matt-west opened this issue Aug 17, 2016 · 3 comments
Assignees
Labels
Projects

Comments

@matt-west
Copy link
Contributor

Tell us about the issue you are experiencing

Astrum is not scrolling to the correct component when the pattern library is visited with a component in the URL hash. This appears to be an issue when testing Astrum with a large number of components and groups.

What behaviour would you expect?

Astrum should scroll to the specified component.

How can this issue be replicated?

@RyanHavoc Check the pattern library for SBL.

Screenshots / Screencast

N/A

@matt-west
Copy link
Contributor Author

@RyanHavoc
Copy link
Member

@matt-west I've added an additional check to ensure the document is ready before triggering the scroll to. This fixes the problem, but not entirely in our case with SBL.

See the bug/59 branch.

The issue we have with SBL is we're loading additional Vue components into the library. Astrum triggers the scrollTo once it's completely loaded. You can see the "Done" on the screenshot below:

developer tools - http sbl loc pattern-library

Then additional components render after they hit the endpoints which throws off the viewing position after it's been scrolled to.

I can't think how we could work around this. It's a bit of an edge case for us mind...

@matt-west
Copy link
Contributor Author

@RyanHavoc I agree that this is an edge case. Happy to go with the solution you've put together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Bug Fixes
Complete
Development

No branches or pull requests

2 participants