-
Notifications
You must be signed in to change notification settings - Fork 103
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
Scoped CSS capabilities per-component #75
Comments
@seangates I am not sure if this is needed for core components? If scoping is needed, application teams can create their own wrapper. Core components are the default mechanisms, where we reserve the namespace. |
@senthilp The issue is when someone uses a component, there is a peer dependency for Skin, which is un-scoped. Therefore, we still get the un-scoped CSS bundled. Mostly, we just need a better solve for the scoping issue for the Global Header team. What we currently have provided them through Skin is not sufficient. |
@seangates For core components, this is expected. Skin classes should come as un-scoped. The Global Header is a special case and also a temporary one. My only concern is that we should not be spending the time to come up with an elegant solution for Global Header, instead, have the GH team put some overrides on their end. |
Sure, but at the same time I would like to reduce bloat, which could be a real concern. |
So I think this issue may not be isolated to global header and might warrant some more discussion. Currently Anton from myebay c2c selling is running into a similar issue because their page is a SPA and both the skin ds6 and ds4 styles are loaded while you are navigating on the page. |
I also discussed this with Anton and the proper solution for his scenario is to upgrade his SPA to DS6 and always pass the |
No, they would not have an issue if they upgraded all pages. |
@senthilp - Based the initial discussion, any page can work with ds6 and ds4 without conflicting each other to gracefully migrate to ds6 and ebayui components. if thats true, then we may have to consider this to address it. As of now, we tend to copy the ebayui components to Global header repo which is not good and scalable |
@RajaRamu What do you mean "scalable"? For the GH team? For eBayUI? |
My 2 cents: We currently have a use case in which we inject modules into any page (ds4, ds6, or no skin at all) through AJAX. We also are using ds6 in our modules. The first problem we ran into was that with our own GH developed modules, when including skin, we were affecting the host page's style (grids, buttons, etc styles would change). This is where the scoped skin solution came in handy. When we require modules that also bundle skin by themselves, such as the ebayUI core components, we are also bundling the I have a proposed solution that has not been mentioned and I hope it's not too hairy: This might work, but I don't really see how this could be useful to anyone else. It is almost anti-pattern-y. I'm happy to continue discussions of other proposals as well |
So, something like a |
Yeah. Or maybe. 'no-skin', although that doesn't sound very good. But you
get the point.
On Wed, Apr 4, 2018, 5:12 PM Sean Gates ***@***.***> wrote:
So, something like a no-style lasso flag?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#75 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADI549vLByhwDOoMXde_HT9r6Mah-_SYks5tlTcFgaJpZM4TFWgG>
.
--
Diego Berrocal
http://diegoberrocal.com
|
@seangates - Not scalable* - For every change on ebay-*components, we will have to copy it over. this may lead to feature disparity as feature grows. |
Sorry, that still doesn't make sense, @RajaRamu. Are you trying to say: if you folks make overrides, and we update Skin, you'll have to match the code written in GH styles? |
Just to update, the MyEbay application now has these components copied into their project because they need to remove the skin css and replace it with a scoped version to support multiple pages with different design systems. A |
@mlrawlings That is the wrong way of doing it. This is just unnecessary tech debt. Let me have a chat with MyeBay team and see what we can do. Having said that, I still like the solution proposed by @CestDiego I would go with a |
Per discussion - |
Done in 0.2.0 release. |
The current Skin scoped CSS does not provide scoping for individual components which are used from the eBayUI Core library. It only provides scoping when Skin is used in isolation (no eBayUI components).
Therefore, we need to provide a way to scope the individual components when they are used within a project.
Some ideas:
.ds6
version of the Skin css within each componentPlease let me know if any of you have questions about the reasons, and please chime in if you have an idea about possible solutions.
The text was updated successfully, but these errors were encountered: