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
Create playground #469
Comments
@daun I have created a playground over at codesandbox: https://codesandbox.io/s/swup-test-case-template-6ci5si I like this approach a lot, since the test case is instantly available online for everyone to see. If you also like it, we could add a link to this sandbox to the template for new issues. |
Thanks; great work! Nice and simple. A few questions:
|
I actually tried to keep it as simple as possible. Added the nav to the container to enable the "is-active" class. But maybe adding the nav as a second
Great idea! I would only install DebugPlugin by default, though – this is meant for reduced test cases, after all.
I also thought about this, but same argument as above, I would prefer to keep as many complexities as possible out of this.
I saw it being used by the statamic docs, so I think it is copyright-free. Still I actually just removed it, though – following my above reasoning I think is was too distracting. |
Ok, added a few things:
Let me know what you tink. |
Beautiful 🥬 I'll add it to the issue template. Is the URL final? |
Actually, I would like to take care of a few last improvements before we add it to the template. The URL is final, except if you have other suggestions? I would then really like a tag "needs testcase" for the issues, this could help us a lot with the communication. |
...I just noticed a possible deal-breaker for codesandbox: The scrollRestauration seems to not be working in the fake (preview) browser. Maybe then we should try if glitch.com is able to handle this properly? |
No problem, let me know when you feel it's ready. The URL is fine! I added a new issue label needs reproduction. That's the most common one I found across a few popular projects. You're right that scroll restoration seems broken on CodeSandbox. I think it's not a blocker for now but we can move to Glitch whenever convenient. |
I'll start a list of alternatives:
|
I just tried a few:
Error in /turbo_modules/swup@2.0.18/lib/helpers/getDataFromHtml.js (30:40)
Cannot read properties of null (reading 'innerText')
I would say, let's stay with Codesandbox, for now. I will add a little disclaimer to the template that it doesn't cover every aspect. But the lively discussion over at #475 wouldn't have been possible without the test case I guess, so it's a big win, already! |
That runtime error means the document is missing a |
Yes, I agree it's a great tool for debugging already! |
Hmm, but actually every file has a title tag: |
Looks like StackBlitz is not returning the actual original document on ajax requests. The swup containers are missing as well. |
StackBlitz doesn't serve raw html apparently. The response for <!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" media="screen" href="..." />
<script src="..." crossorigin="anonymous"></script>
<script>(function(){_preboot("https://l.staticblitz.com/b/v1/swup-test-case-template/d83ad5f4d33", {"p":"stackblitz","a":"SuRrSps-HjMVg","o":true,"u":"example","$":false})})()</script>
</head>
<body></body>
</html> |
Thanks for checking it. Lets just stick to CodeSandbox for now, ok? I already added the disclaimer to it. Ready for the issue template from my side! |
This is now linked in the issue template for bug reports. |
Set up a simple test site with basic setup and transitions for people to try out swup.
Options:
npx serve
The text was updated successfully, but these errors were encountered: