You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Updates on theme.json are not reflected on stats.json #16419
Updates on theme.json are not reflected on stats.json
Step1
theme.json "lumoImports": [ "typography", "badge" ]
Entries in stats.json
"themeJsonContents": {
"esg": "{\n\t"lumoImports": [\n\t\t"typography",\n\t\t"badge"\n\t]\n}"
},
Step2
theme.json "lumoImports": [ "typography" ]
entries in stats.json
"themeJsonContents": {
"esg": "{\n\t"lumoImports": [\n\t\t"typography",\n\t\t"badge"\n\t]\n}"
},
correct would be
"themeJsonContents": {
"esg":"{"lumoImports":[\n\t"typography"\n\t]\n}"
},
The badge entry should be removed.
Expected behavior
Updates on theme.json should be reflected on stats.json
Minimal reproducible example
Step1
theme.json "lumoImports": [ "typography", "badge" ]
Entries in stats.json
"themeJsonContents": {
"esg": "{\n\t"lumoImports": [\n\t\t"typography",\n\t\t"badge"\n\t]\n}"
},
Step2
theme.json "lumoImports": [ "typography" ]
entries in stats.json
"themeJsonContents": {
"esg": "{\n\t"lumoImports": [\n\t\t"typography",\n\t\t"badge"\n\t]\n}"
},
correct would be
"themeJsonContents": {
"esg":"{"lumoImports":[\n\t"typography"\n\t]\n}"
},
The badge entry should be removed.
Seems esg custom theme was added so I have added as well:
Added to Application.java -> @Theme("esg"),
And to frontend/themes/esg as well (with styles.css and theme.json)
Used production profile to generate the stat.json (generated target/classes/META-INF/VAADIN/config/stats.json) with: mvn -Pproduction
The stat.json was generated properly,
Changed the frontend/themes/esg/theme.json, and tried deleting the target directory and tried only with stat.json deletion, after building again with the production profile. It was the same and picked up the changes.
I tried 5-6 times, deleting directories, and files, and modifying themes, but could not reproduce.
We can catch up sometime/tomorrow, maybe I do something differently.
Maybe it was expected that the stat.json is changing without triggering a build, on the fly?
We discussed this some days ago with @p-maraver. This happens when the dev bundle build happens, so triggering it is a must-have to reproduce the issue, then the listed steps work.
Activity
czp13 commentedon Apr 19, 2023
I could not reproduce it. Tried with
24.0.1and24.0.4(the latest at https://github.com/vaadin/skeleton-starter-flow-spring/).Steps I did:
esgcustom theme was added so I have added as well:Application.java->@Theme("esg"),frontend/themes/esgas well (withstyles.cssandtheme.json)stat.json(generatedtarget/classes/META-INF/VAADIN/config/stats.json) with:mvn -Pproductionstat.jsonwas generated properly,frontend/themes/esg/theme.json, and tried deleting the target directory and tried only withstat.jsondeletion, after building again with the production profile. It was the same and picked up the changes.I tried 5-6 times, deleting directories, and files, and modifying themes, but could not reproduce.
We can catch up sometime/tomorrow, maybe I do something differently.
Maybe it was expected that the
stat.jsonis changing without triggering a build, on the fly?fix: Handling cases when theme.json change is not triggering dev bund…
czp13 commentedon Apr 28, 2023
Update1:
Update2:
@p-maraver:
main24branch,Maybe would be good to notify the customer that we handled his requests, and thanks for both to the customer and you! 😊
fix: Handling cases when theme.json change is not triggering dev bund…
Fix: theme change should trigger dev bundle build in all cases (#16667)…