test: reduce test-lumo Lumo to a Vaadin-free stub#24439
Open
Artur- wants to merge 1 commit into
Open
Conversation
85ac95d to
f4879b4
Compare
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.
bc1bd62 to
13a29cf
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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:
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.
in styles.css, define .text-primary directly, and rename
lumoUtils_customStylesHaveBeenExpanded to
utilityClass_themeCssIsAppliedToElement.
injectedGlobalCss count from 4 to 2 (the two missing injections were
Lumo's), and remove the now-vacuous
lumoImports_doNotLeakEmbeddingPage test.
@vaadin/vaadin-lumo-styles/lumo.css?inline import from ts-component.ts,
inline the badge background-color rule, and rename
lumoBadgeIsRenderedCorrectly to inlineComponentStylesApplied.
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.