Hey I do have a problem with Subthemes. I do have the following project setup:
core
basic
customer
The customer project depends on the basic project and the basic project depends on the core project. Each project has a theme.
In the theme.json of the customer project I added the parent: { "parent": "basic-project" } (same for the basic project with the core theme).
When I start the basic project everything works as expected. The core theme is used as a parent with the basic theme on top.
But if I start the customer project, it seems to load only the basic theme without the core theme.
What would be the correct way to do this? Can I define multiple parents or is it possible to load it manually somehow?
In the frontend/generated/jar-resources/themes folder of my customer project both themes (core and basic) are present… i think it just needs to be loaded?
Iam using Vaadin Flow 24.2.2 with Spring Boot 3.1.5
You could try adding some console.logs to /{build|target}/plugins/application-theme-plugin/theme-handle.js#collectParentThemes to see if it is actually finding the parent theme.
Yes thats most likely my problem. The theme.json’s are missing on my customer project in the frontend/generated/jar-resources/themes
They are present in the jar, but are not copied into the generated folder. If I manually add them and run the vite build, it looks like everything works then… Any idea what iam missing?
I created a minimal reproducible example. It seems to work when there are no extra NpmPackages in the project. The core theme got loaded as expected. But as soon as I added a NpmPackage it does no longer load the core theme.
Sounds like a good investigation to be posted on GitHub to be checked by the flow team. All my custom parent themes also contain only “static” code and no external npm stuff
I uploaded the example project to Github: https://github.com/DerAzubi/vaadin-subtheme-problem
Should I open a issue in the vaadin flow repo or should I wait until someone responses here? Iam not really sure, if its a bug or if Iam just stupid/doing something wrong. Dont wanna waste other peoples time
So many moving parts and way too many things I haven’t expected from parent themes spring boot Dependency, same package names (core and core) different AppShells etc. this looks like something unexpected to happen