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

[Bug]: The Igloo css' are included multiple times when looking at the DevTools #651

Open
CarolineSabourin-Jean opened this issue Jan 23, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@CarolineSabourin-Jean
Copy link
Contributor

Contact Details

No response

What happened?

When we look at the css of all Igloo components via the DevTools, we can see that it is included multiple times. See an example with a Button:
ids-btn css

I expect to see the css there only one time.

Component

All the components

Component Version

0.0.0

Which browsers are you seeing the problem on?

No response

Mobile Device

No response

Relevant log output

No response

@CarolineSabourin-Jean CarolineSabourin-Jean added the bug Something isn't working label Jan 23, 2024
@vicky-comeau
Copy link
Collaborator

I'm pretty sure it has always been like this. This is really not ideal.
What happens is that a component's css file is included from its component and each component is included inside OV.
If an Igloo component includes another component like a Button, you will see the Button css for each Igloo component that includes it.
I'm not really sure how to go about fixing this for Igloo. I know hopper will not be like this thankfully.
Maybe @alexasselin008 has an idea of how we can easily improve this.

@fraincs
Copy link
Collaborator

fraincs commented Jan 24, 2024

It is the way it currently works due to the fact that each components are self contained. TagPicker has a peer dependency on the button component, therefore loading it's CSS.

Edit: when I published my comment Vicky's comment showed up. What she says.

We also have to take into consideration that one component can have a dependency on a particular version of another component, loading a single CSS file is not currently possible.

@alexasselin008
Copy link
Member

Since this issue has been present for all of igloo's existence, we will tolerate it for now. The plan would be to develop Hopper asap, and migrate Officevibe to it.

We'll make sure this kind of issue is not present in the next Design system.

I've talked with Alex Martel and he agrees with this course of action

@CarolineSabourin-Jean
Copy link
Contributor Author

Ok! Thank you all for your answers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants