Skip to content

test: reduce test-lumo Lumo to a Vaadin-free stub#24439

Open
Artur- wants to merge 1 commit into
mainfrom
drop-vaadin-lumo-deps
Open

test: reduce test-lumo Lumo to a Vaadin-free stub#24439
Artur- wants to merge 1 commit into
mainfrom
drop-vaadin-lumo-deps

Conversation

@Artur-

@Artur- Artur- commented May 25, 2026

Copy link
Copy Markdown
Member

Many Flow test modules pull in flow-test-lumo just so Flow's classpath
detection (AbstractDependenciesScanner.LUMO) finds a class named
com.vaadin.flow.theme.lumo.Lumo and treats it as the default theme.
Until now that class also declared four annotations that pulled in
@vaadin/vaadin-themable-mixin and @vaadin/vaadin-lumo-styles plus the
companion CssImport/JsModule, multiplying Vaadin npm deps across ~20
modules that depend on flow-test-lumo.

Reduce the Lumo class to the bare classpath-detection contract: an
AbstractTheme implementation with LIGHT/DARK variants and nothing else.
Drop the four Vaadin npm declarations.

Part of removing TestVersion.VAADIN usages from Flow's test tree.

Fallout in modules that used to get Vaadin Lumo CSS via the stub:

  • test-themes: drop lumoImports from app-theme and parent-theme
    theme.json, remove @CssImport("@vaadin/vaadin-lumo-styles/utility.css")
    from AppShell, delete the parentTheme_lumoStyleAppliedFromParentTheme
    test, and drop the lumo / cssImportVsLumo entries from CssLoadingView's
    priority map. Also clean dead .bg-contrast-* rules in theme/webapp
    CSS that were paired with the now-absent Lumo rules.
  • test-theme-no-polymer / test-legacy-frontend: drop the Lumo https://github.com/import
    in styles.css, define .text-primary directly, and rename
    lumoUtils_customStylesHaveBeenExpanded to
    utilityClass_themeCssIsAppliedToElement.
  • test-embedding/test-embedding-application-theme: update the
    injectedGlobalCss count from 4 to 2 (the two missing injections were
    Lumo's), and remove the now-vacuous
    lumoImports_doNotLeakEmbeddingPage test.
  • test-application-theme/test-theme-reusable-vite: drop the
    @vaadin/vaadin-lumo-styles/lumo.css?inline import from ts-component.ts,
    inline the badge background-color rule, and rename
    lumoBadgeIsRenderedCorrectly to inlineComponentStylesApplied.
  • test-application-theme/test-theme-component-live-reload: change the
    BORDER_RADIUS / OTHER_BORDER_RADIUS / PARENT_BORDER_RADIUS test
    constants from 3/6/9px to 11/17/23px, since without Lumo the
    @vaadin/text-field default border-radius now collides with 3px/6px
    and breaks the initial "no custom style yet" assertion.

Also drops the now-unused https://github.com/NpmPackage("@vaadin/vaadin-themable-mixin",
TestVersion.VAADIN) declarations from these modules' AppShells.

vite-basics/package.json is regenerated as a byproduct: three Vaadin
deps drop out, the bundle hash updates, and Flow's package management
picks up unrelated minor version bumps for transitive dev deps (lit,
react, vite, etc.) that happened to be current on npm at regeneration
time.

@github-actions

github-actions Bot commented May 25, 2026

Copy link
Copy Markdown

Test Results

 1 439 files  ±0   1 439 suites  ±0   1h 18m 21s ⏱️ - 3m 54s
10 114 tests  - 3  10 046 ✅  - 3  68 💤 ±0  0 ❌ ±0 
10 586 runs   - 3  10 517 ✅  - 3  69 💤 ±0  0 ❌ ±0 

Results for commit 13a29cf. ± Comparison against base commit 979e73a.

♻️ This comment has been updated with latest results.

@Artur- Artur- force-pushed the drop-vaadin-lumo-deps branch from 85ac95d to f4879b4 Compare June 9, 2026 11:28
Many Flow test modules pull in flow-test-lumo just so Flow's classpath
detection (AbstractDependenciesScanner.LUMO) finds a class named
com.vaadin.flow.theme.lumo.Lumo and treats it as the default theme.
Until now that class also declared four annotations that pulled in
@vaadin/vaadin-themable-mixin and @vaadin/vaadin-lumo-styles plus the
companion CssImport/JsModule, multiplying Vaadin npm deps across ~20
modules that depend on flow-test-lumo.

Reduce the Lumo class to the bare classpath-detection contract: an
AbstractTheme implementation with LIGHT/DARK variants and nothing else.
Drop the four Vaadin npm declarations.

Part of removing TestVersion.VAADIN usages from Flow's test tree.

Fallout in modules that used to get Vaadin Lumo CSS via the stub:

- test-themes: drop lumoImports from app-theme and parent-theme
  theme.json, remove @CssImport("@vaadin/vaadin-lumo-styles/utility.css")
  from AppShell, delete the parentTheme_lumoStyleAppliedFromParentTheme
  test, and drop the lumo / cssImportVsLumo entries from CssLoadingView's
  priority map. Also clean dead .bg-contrast-* rules in theme/webapp
  CSS that were paired with the now-absent Lumo rules.
- test-theme-no-polymer / test-legacy-frontend: drop the Lumo @import
  in styles.css, define .text-primary directly, and rename
  lumoUtils_customStylesHaveBeenExpanded to
  utilityClass_themeCssIsAppliedToElement.
- test-embedding/test-embedding-application-theme: update the
  injectedGlobalCss count from 4 to 2 (the two missing injections were
  Lumo's), and remove the now-vacuous
  lumoImports_doNotLeakEmbeddingPage test.
- test-application-theme/test-theme-reusable-vite: drop the
  @vaadin/vaadin-lumo-styles/lumo.css?inline import from ts-component.ts,
  inline the badge background-color rule, and rename
  lumoBadgeIsRenderedCorrectly to inlineComponentStylesApplied.
- test-application-theme/test-theme-component-live-reload: change the
  BORDER_RADIUS / OTHER_BORDER_RADIUS / PARENT_BORDER_RADIUS test
  constants from 3/6/9px to 11/17/23px, since without Lumo the
  @vaadin/text-field default border-radius now collides with 3px/6px
  and breaks the initial "no custom style yet" assertion.

Also drops the now-unused @NpmPackage("@vaadin/vaadin-themable-mixin",
TestVersion.VAADIN) declarations from these modules' AppShells.

vite-basics/package.json is regenerated as a byproduct: three Vaadin
deps drop out, the bundle hash updates, and Flow's package management
picks up unrelated minor version bumps for transitive dev deps (lit,
react, vite, etc.) that happened to be current on npm at regeneration
time.
@Artur- Artur- force-pushed the drop-vaadin-lumo-deps branch from bc1bd62 to 13a29cf Compare June 10, 2026 10:22
@Artur- Artur- changed the title Reduce test-lumo Lumo to a Vaadin-free stub test: reduce test-lumo Lumo to a Vaadin-free stub Jun 10, 2026
@Artur- Artur- marked this pull request as ready for review June 10, 2026 10:23
@sonarqubecloud

Copy link
Copy Markdown

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant