-
Notifications
You must be signed in to change notification settings - Fork 107
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
Convert all demos to Stackblitz to prevent the auto-scrolling glitch #1415
Conversation
Performance comparison of head (4762263) vs base (b18f616)
|
Could you check if this resolves the issue eg |
@magierg could you verify everything is good from a docs perspective, thanks! |
I checked this. It doesn't work |
* Convert angular demo to stackblitz to fix no-automatic-preview codesandbox issue (#1405) * Convert all demos to Stackblitz to prevent the auto-scrolling glitch (#1415) * Convert basic operations demo to Stackblitz * Convert all the demos in the guides to Stackblitz * Set iframe height to 590px for all stackblitz demos
this has been verified both locally - all the demos work, but most of them (those build on parcel) have long loading time and throw console errors - fixing it will require updating these demos to newer version of parcel or (even better) to vite - this has been discussed with @evanSe as well |
Context
After analyzing the issue, I found that it's caused by Codesandbox, which, when embedded in an iframe, calls
Element.scrollIntoView()
or some similar API method to cause the entire page to scroll to the demo.In my opinion, the best solution is to convert all demos to Stackblitz, which doesn't do that and is, moreover, generally more reliable. @evanSe approved that solution.
Alternative solutions:
Work less reliably, delay must be pretty long, if a user scrolls to the demo before the timeout they won't see the iframe.
Auto-scrolling still happens, but only when the user scrolls the guide to a section close to the demo. For short guides (e.g., https://hyperformula.handsontable.com/guide/integration-with-vue.html), lazy-loading will work the same as the default loading.
How did you test your changes?
Tested locally. Verified that all demos in the guides:
Types of changes
Related issues:
#demo
on refresh #1412Checklist: