Unanswered
Dynamically load Tecton design system
Is there a way to dynamically load the Tecton design system?
We're going to have a full page iframed extension (similar to the SSO example) that will be using our own theming. It seems like Q2 is automatically loading the Tecton design system when we load the extension in the dashboard and overriding some of our styles.
I saw the loadDesignSystem docs but it seems to be loading the design system regardless of whether I use the loadDesignSystem method or not.
164 Views
0
Answers
4 years ago
4 years ago
Tags
Hi David,
The iframe your module loads within does grab a good chunk of CSS from our CDN to try and make the your module look like a cohesive part of the platform application. However, the vast majority of that CSS is only applied when the
data-tecton-moduleattribute is added to thebodytag of your HTML. If you remove that, almost all of our CSS is no longer applied.Is this something that would help in your situation?
— Kristopher Van Houten 4 years agoOk I do see that if I remove
data-tecton-modulefrom the body then it doesn't apply the styles. However, it looks like thedata-tecton-moduleattribute is being added automatically.I am using the
— David Maksimov 4 years agoq2-tecton-sdkmodule instead of the CDN.David, we had not considered that use case but I think it makes sense. I'll get that into a feature request to put infront of the team, we will discuss it next week.
For now, just use some JS on load to remove that attribute.
<script>document.body.removeAttribute('data-tecton-module');</script>
I've created a ticket for that request: https://staging.q2developer.com/support/ticket/SDK-9191
— Ryan Hollister 4 years agoOk I'll give that a shot. Thank you!
— David Maksimov 4 years agoRyan's link seems to be broken, so here is a new one for those that may be looking: https://q2developer.com/support/ticket/SDK-9191
— Trey Teter 4 years ago