-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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
"Edit" button on code examples #35638
Conversation
Hey, thanks for the PR, but this has many unrelated changes. |
Can you specify the unrelated changes? So I can rectify them |
Sorry, I don't have the time to clarify everything. For starters you are not running the lint scripts locally. Secondly, you are loading the SDK from unpkg. You should use a real CDN and pin the version. And finally, you have hardcoded stuff. |
Changed it from unkpg to jsdelivr I ran the lint scripts and fixed the issue with EOF on _clipboard-js.scss If you have time, can you specify what you mean by "hard-coded"? |
|
||
{{ printf .Site.Params.cdn.css | safeHTMLAttr }} | ||
|
||
<script src="https://cdn.jsdelivr.net/npm/@stackblitz/sdk@1.5.3/bundles/sdk.umd.min.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to load this in every page. Which probably means, you shouldn't add the logic in application.js.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which file do you suggest I add this logic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would adding a script tag to the example.html
partial and putting "open in stackblitz" logic there be fine?
Hi, I will close this PR and make a new one with new changes. I am having some issues in git locally |
New PR here #35644 |
Based on #35188, this PR adds the "Edit" button on code examples, clicking which will open up stackblitz editor in new tab with the code example in mind.
Here's a video:
CleanShot.2022-01-03.at.00.29.35.mp4