Docs: Add StackBlitz edit button for examples#37233
Docs: Add StackBlitz edit button for examples#37233julien-deramond wants to merge 4 commits intomainfrom
Conversation
|
Before going further in the details of this PR, what do you think @twbs/js-review about this suggestion? |
|
@julien-deramond it would help a lot if you are able to separate the renaming changes, and continue with the functionality additions, |
Yes, if you're OK with the renaming for the consistency (and it's a bit mandatory to have a generic approach for those buttons), I can create a separate PR right now and then work on the addition of the StackBlitz edit buttons. |
|
At least for me, I prefer it, as it helps on files searching too |
2e86ecd to
f555231
Compare
f555231 to
c35148b
Compare
c35148b to
5267ef5
Compare
| <script src="https://cdn.jsdelivr.net/npm/@stackblitz/sdk@1/bundles/sdk.umd.js"></script> | ||
| {{- end }} | ||
|
|
||
| {{ if eq .Page.Layout "single" -}} |
There was a problem hiding this comment.
Isn't this duplicated in another layout file?
If so, we should deduplicate common code because it's a significant amount of it. Ideally, the inline JS should go into external JS files, but it won't be easy if we need Hugo to process them.
So, at least deduplicating common StackBlitz layout code this would be an improvement.
Related issues
Closes #36857
Description
This PR suggests to add a StackBlitz edit button for each Bootstrap example.
TODO: add more details to explain the technical solution
Motivation & Context
TODO
Type of changes
Checklist
npm run lint)Live previews
Manual tests
For each example, try the StackBlitz edit button and then check if the rendering is the same as within our docs: CSS, JS, etc.
.h-100forhtml.index.jsin StackBlitz is executed before the scripts in<script>(index.html)class="h-100"on thehtmltag which is not possible in StackBlitz since this class is overriden. Do we remove the StackBlitz edit button?Remaining things to do
fetch/docs/5.2/assets/brand/bootstrap-logo.svgin the bodymainwhen Rename examples CSS/JS files for consistency #37267 will be mergedbootstrap-bundle.min.jsin `<script> for navbars example for example; it causes an issue where the burger menu can't be closedstyle.css)