-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Custom components within other custom components: occasionally not loaded "in time" and ignoring css #1639
Comments
UPDATE Apparently initializing the custom Switch under a
on loaded event of top-level container, seems to have solved the problem (except for the CSS issue) |
I am experiencing the same CSS issue. That is: CSS files for "2nd level" custom components are not being loaded (or at the very least, not being applied). I have an app that has a structure like this:
CSS is being properly loaded and applied to the root Page and elements in the 1st level custom components from their respective stylesheets. CSS is NOT being properly loaded and applied from the 2nd level custom components stylesheets. I tried "forcing" the 2nd level CSS to load by using the If I manually copy the styles from the 2nd level stylesheet and paste them in the root stylesheet ( I would like to keep my styles separated for better maintenance, so any idea why these 2nd level stylesheets are not being loaded/applied? @tjvantoll @jlooper Have you encountered this yet? |
Doing some digging in the {N} source, I think this could be happening when loading custom components in Views that do not have a Page element. The For example:
views/myView.xml
views/widgets/myWidget.xml
CSS loads fine for I don't know enough about the loading system to fix this bug, but hopefully this "inspires" someone that knows more to take a closer look. |
@toddanglin I personally haven’t hit this before. I’ve only nested custom components with Angular, and with ng2 in the mix this all works differently. I’m not super familiar with this area of the code, but at a glance I think you’re right—it looks like the parent page is not getting preserved, so the custom CSS gets lost. |
Has there been any progress with this CSS issue? I've just come across the same situation. |
Same issue here |
I will take a look... |
I verified that this is indeed an issue. Will try to resolve it. |
… not loaded "in time" and ignoring css Resolves #1639
Thanks, Rossen! Looks like the fix will land in the next release. For future Google searches: Using nested components with CSS files should start working as expected after 2.4.1. |
@toddanglin I am not sure whether it will land in the next release. We have to merge a huge refactoring into master first and then I will be able to merge my 5-6 pull requests. |
…ot loaded "in time" and ignoring css Resolves #1639
@tsonevn This still isn't working right in 3.0.1 even though it's marked fixed and closed. No CSS files are applied from the 2nd level and further on. "Error: CSS file found but no page specified. Please specify page in the options!" is shown in the logs. Should I open a new bug report?
|
Confirmed that this still isn't working as expected for 2nd level CSS with {N} 3.3.0. @vchimev Any updates? |
I'm facing the same issue with {N} 4.0.0 |
I'm facing the same issue with {N} 4.2.0 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I have a page where a custom component is included within another custom component as follows
With 1st-level only custom components I do not have the following issues, but with nested ones yes. Particularly:
Note: I tried to apply loaded=loaded event in <switchComponent:switchComponent id="first-switch" /> in pagePart.xml but it's not triggered (I guess because that applies only to )
Here is an overview of the code:
main-page.xml
includes/customComponents/pagePart.xml
includes/customComponents/pagePart.ts
includes/customComponents/switchComponent.xml
includes/customComponents/switchComponent.css
The text was updated successfully, but these errors were encountered: