Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PiT 24.4] a theme loading delay can be observed with hilla-react-gradle starter #19265

Closed
Tracked by #5012
ZheSun88 opened this issue Apr 26, 2024 · 8 comments · Fixed by #19266 or #19274
Closed
Tracked by #5012

[PiT 24.4] a theme loading delay can be observed with hilla-react-gradle starter #19265

ZheSun88 opened this issue Apr 26, 2024 · 8 comments · Fixed by #19266 or #19274

Comments

@ZheSun88
Copy link
Contributor

Describe the bug

with the Vaadin 24.4.0.alpha24, there is an notable delay on applying the theme when start the hilla-react-gradle starter

theme-react-gradle

Expected-behavior

this is the behavior on alpha23, i think it should be look like this
theme-react-gradle-alpha23

Reproduction

use the attached app or do the following steps

   git clone https://github.com/vaadin/skeleton-starter-hilla-react-gradle.git
   cd skeleton-starter-hilla-react-gradle
   perl -pi -e 's|\s*(hillaVersion)\s*([=:]).*|${1}${2}24.4.0.alpha24|g' gradle.properties
   # Patching Gradle project
   perl -pi -e 's|dev\.hilla:hilla-bom|com.vaadin:vaadin-bom|' build.gradle
   perl -pi -e 's|dev\.hilla:hilla-(react-)?spring-boot-starter|com.vaadin:vaadin-spring-boot-starter|' build.gradle
   perl -pi -e 's|hillaVersion|vaadinVersion|' build.gradle settings.gradle gradle.properties
   perl -pi -e 's|dev\.hilla|com.vaadin|' build.gradle settings.gradle
   find src/main -name '*.java' -exec perl -pi -e 's/import dev.hilla/import com.vaadin.hilla/g' '{}' ';'
   find frontend '(' -name '*.ts' -o -name '*.tsx' ')' -exec perl -pi -e 's|\@hilla/form|\@vaadin/hilla-lit-form|g' '{}' ';'
   find frontend '(' -name '*.ts' -o -name '*.tsx' ')' -exec perl -pi -e 's|Frontend/generated/dev/hilla|Frontend/generated/com/vaadin/hilla|g' '{}' ';'
   find frontend '(' -name '*.ts' -o -name '*.tsx' ')' -exec perl -pi -e 's|\@hilla/frontend|\@vaadin/hilla-frontend|g' '{}' ';'
   find frontend '(' -name '*.ts' -o -name '*.tsx' ')' -exec perl -pi -e 's|\@hilla/react-form|\@vaadin/hilla-react-form|g' '{}' ';'
   find frontend '(' -name '*.ts' -o -name '*.tsx' ')' -exec perl -pi -e 's|\@hilla/|\@vaadin/|g' '{}' ';'
  mv frontend src/main/frontend

run ./gradlew bootRun and observe the initial load

skeleton-starter-hilla-react-gradle.zip

System Info

tested on both mac and windows, behave the same
version: Vaadin 24.4.0.alpha24

@ZheSun88 ZheSun88 added bug hilla Issues related to Hilla labels Apr 26, 2024
@ZheSun88 ZheSun88 changed the title [PiT] a theme loading delay can be observed with hilla-react-gradle starter [PiT 24.4] a theme loading delay can be observed with hilla-react-gradle starter Apr 26, 2024
@mshabarov
Copy link
Contributor

This seems to be a regression after #19221.
I tested alpha24 with and without this change and it clearly happens when I have this change.

@mshabarov mshabarov transferred this issue from vaadin/hilla Apr 26, 2024
mcollovati added a commit that referenced this issue Apr 29, 2024
When using an exported a themed Flow web-component, Lumo style may leak
the embedding document, causing invalid CSS rules to be applied.
This change prevents applying Lumo global imports when the theme is
applied to a web-component.

Fixes #12704
Fixes #19265
@ZheSun88 ZheSun88 reopened this Apr 29, 2024
@mshabarov
Copy link
Contributor

@ZheSun88 is bug reproducible with 24.4.0.alpha25? I tested with hybrid app and couldn't see it.

@mcollovati
Copy link
Collaborator

Isn't alpha25 the version with the revert?

@mshabarov
Copy link
Contributor

mshabarov commented Apr 29, 2024

Yes, it has a revert already. But just wondered, was this issue opened because it was reproduced after revert, or it was re-opened for tracking other branches that have no revert and no second fix yet.

@ZheSun88
Copy link
Contributor Author

it was re-opened for tracking other branches that have no revert and no second fix yet.

ah.. this one..

mcollovati added a commit that referenced this issue May 2, 2024
When using an exported a themed Flow web-component, Lumo style may leak
the embedding document, causing invalid CSS rules to be applied.
This change prevents applying Lumo global imports when the theme is
applied to a web-component.

Fixes #12704
Fixes #19265
mcollovati added a commit that referenced this issue May 2, 2024
When using an exported a themed Flow web-component, Lumo style may leak
the embedding document, causing invalid CSS rules to be applied.
This change prevents applying Lumo global imports when the theme is
applied to a web-component.

Fixes #12704
Fixes #19265
mcollovati added a commit that referenced this issue May 3, 2024
When using an exported a themed Flow web-component, Lumo style may leak
the embedding document, causing invalid CSS rules to be applied.
This change prevents applying Lumo global imports when the theme is
applied to a web-component.

Fixes #12704
Fixes #19265
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.3.11.

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.4.0.beta2 and is also targeting the upcoming stable 24.4.0 version.

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.5.0.alpha1 and is also targeting the upcoming stable 24.5.0 version.

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