-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Docs: Add StackBlitz edit button for examples #37233
base: main
Are you sure you want to change the base?
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
@@ -9,6 +9,10 @@ | |||
<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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-100
forhtml
.index.js
in StackBlitz is executed before the scripts in<script>
(index.html
)class="h-100"
on thehtml
tag 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.svg
in the bodymain
when Rename examples CSS/JS files for consistency #37267 will be mergedbootstrap-bundle.min.js
in `<script> for navbars example for example; it causes an issue where the burger menu can't be closedstyle.css
)