Skip to content
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: fix StackBlitz examples needing icons #39505

Closed

Conversation

julien-deramond
Copy link
Member

@julien-deramond julien-deramond commented Dec 18, 2023

Description

This PR takes into account the issue reported in #39499 (the issue has been closed by OP but is still there in our documentation).

As explained in #39499 (comment), the problem is that we don't embed the icons in these cases that come from site/layouts/partials/icons.html.

The idea of this PR is to add a parameter to handle this specific use case like it's done for the optional JavaScript snippet.
Whenever an {{ example }} needs the icons, we only need to use the new stackblitz_add_icons parameter and set it to true like this: {{< example stackblitz_add_icons="true" >}}.

Note: I haven't checked the whole documentation to add this parameter, only the icon-link page.

Type of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • I have updated the documentation accordingly
  • (N/A) I have added tests to cover my changes
  • All new and existing tests passed

Live previews

Related issues

Closes #39499

@louismaximepiton
Copy link
Member

Haven't checked in details but what would you think about an approach like in Alerts (2nd example) ?

@mdo
Copy link
Member

mdo commented Mar 18, 2024

I'm probably more in favor of what @louismaximepiton suggested—it's a good point that makes these snippets easier to copy-paste across a number of environments. Thoughts?

@julien-deramond
Copy link
Member Author

Thanks for your suggestions, I'm closing this PR in favour of #39799 that supersedes it taking in account your comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The "<use xlink:href>" code in the icon-link examples do not work
3 participants