Repository navigation
fix: Apply parent theme located in project frontend folder - #16218
Conversation
aa9ece0 to
7275cf2
Compare
| } | ||
|
|
||
| // Secondly, add a link for the project's custom theme, if it exists | ||
| // Secondly, check if a parent theme is in the project's frontend/themes |
There was a problem hiding this comment.
Why do we need to check if it exists? Why don't we always load it?
There was a problem hiding this comment.
Parent theme can we in the frontend/themes or in the JAR, Flow doesn't know in advance.
This block of codes checks if the "parent": "my-parent-theme" is located in the frontend folder, and, if so, adds a link to it.
There was a problem hiding this comment.
What happens if it is in a jar? Isn't a link added to it then also?
There was a problem hiding this comment.
Is the theme loaded from different URLs depending on where it can be found? Sounds odd but the only reason I can come up with here
There was a problem hiding this comment.
What happens if it is in a jar? Isn't a link added to it then also?
Yes, the link is added also in this case. The code block for this is a few lines above.
There was a problem hiding this comment.
Is the theme loaded from different URLs depending on where it can be found? Sounds odd but the only reason I can come up with here
Doesn't depend, this can be refactored to visit all the possible locations with a common code/method.
There was a problem hiding this comment.
There might be a case when the parent theme in the frontend/themes extends another parent theme in frontend/themes. For this case the tag won't be added. I have to fix it.
There was a problem hiding this comment.
Better to make another PR for it IMO, because this one is already too big.
|
Kudos, SonarCloud Quality Gate passed!
|
* fix: Apply parent theme located in project frontend folder * Clarifications in comments and info message * extract a new method for frontend utils setup
…CP: 24.0) (#16263) * fix: Apply parent theme located in project frontend folder (#16218) * fix: Apply parent theme located in project frontend folder * Clarifications in comments and info message * extract a new method for frontend utils setup * fix version --------- Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com> Co-authored-by: Mikhail Shabarov <mikhail@vaadin.com>








Makes styles from parent theme apply properly if the parent theme is located in the project's folder, not in the JAR.
Re-bundles if the parent theme in frontend folder has new entries in theme.json.
Adds theme.json content to stats.json if parent theme is in the frontend folder.
Adds link tag to the styles.css of the parent theme onto the page.