Skip to content

Updates on theme.json are not reflected on stats.json  #16419

Closed

Description

@p-maraver

Description of the bug

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.

Versions

  • Vaadin / Flow version: v24.0.1
  • Java version: -
  • OS version: -
  • Browser version (if applicable): -
  • Application Server (if applicable): -
  • IDE (if applicable): -

Activity

  1. self-assigned this
    on Apr 19, 2023
  2. czp13 commented on Apr 19, 2023

    @czp13
    Contributor

    I could not reproduce it. Tried with 24.0.1 and 24.0.4 (the latest at https://github.com/vaadin/skeleton-starter-flow-spring/).

    Steps I did:

    1. Seems esg custom theme was added so I have added as well:
    2. Added to Application.java -> @Theme("esg"),
    3. And to frontend/themes/esg as well (with styles.css and theme.json)
    4. Used production profile to generate the stat.json (generated target/classes/META-INF/VAADIN/config/stats.json) with: mvn -Pproduction
    5. The stat.json was generated properly,
    6. 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?

  3. czp13 commented on Apr 28, 2023

    @czp13
    Contributor

    Update1:

    • 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.

    Update2:
    @p-maraver:

    1. The fix was merged into the main
    2. and soon will be merged into the 24 branch,
    3. and then will be released, and then it can be tested.

    Maybe would be good to notify the customer that we handled his requests, and thanks for both to the customer and you! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions