Skip to content

fix: handle shadow DOM stylesheets in production and dev bundle - #17776

Merged
mshabarov merged 3 commits into
mainfrom
issues/16407_bundle_theme_components
Oct 6, 2023
Merged

mshabarov merged 3 commits into
mainfrom
issues/16407_bundle_theme_components

Conversation

@mcollovati

Copy link
Copy Markdown
Collaborator

Description

The legacy shadow DOM stylesheets that can potentially be present in the 'theme//components/' folder are not considered when deciding if a new bundle needs to be created, so the application may miss custom components styles.
This change checks for the existence of theme components CSS, and it triggers a bundle rebuild if any are found.

Fixes #16407

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

Additional for Feature type of change

  • Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

The legacy shadow DOM stylesheets that can potentially be present in the
'theme/<themeName>/components/' folder are not considered when deciding
if a new bundle needs to be created, so the application may miss custom
components styles.
This change checks for existence of theme components CSS, and it triggers
a bundle rebuild if any is found.

Fixes #16407
@github-actions

github-actions Bot commented Oct 5, 2023 •

Copy link
Copy Markdown
Contributor

Test Results

1 008 files  +  1  1 008 suites  +1   1h 7m 31s ⏱️ + 3m 40s
6 462 tests +34  6 421 ✔️ +34  41 💤 ±0  0 ❌ ±0 
6 718 runs  +31  6 670 ✔️ +31  48 💤 ±0  0 ❌ ±0 

Results for commit 7dea676. ± Comparison against base commit ad75057.

♻️ This comment has been updated with latest results.

@mcollovati

Copy link
Copy Markdown
Collaborator Author

Picking to 24.2 should fail because of the newly added test module; the parent pom version must be manually fixed on the backport.

@sonarqubecloud

sonarqubecloud Bot commented Oct 6, 2023

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@mshabarov
mshabarov enabled auto-merge (squash) October 6, 2023 13:00
@mshabarov
mshabarov merged commit 9d5165b into main Oct 6, 2023
@mshabarov
mshabarov deleted the issues/16407_bundle_theme_components branch October 6, 2023 14:16
vaadin-bot pushed a commit that referenced this pull request Oct 6, 2023
* fix: handle shadow DOM stylesheets in production and dev bundle

The legacy shadow DOM stylesheets that can potentially be present in the
'theme/<themeName>/components/' folder are not considered when deciding
if a new bundle needs to be created, so the application may miss custom
components styles.
This change checks for existence of theme components CSS, and it triggers
a bundle rebuild if any is found.

Fixes #16407

* apply review suggestions

* apply review suggestions
vaadin-bot pushed a commit that referenced this pull request Oct 6, 2023
* fix: handle shadow DOM stylesheets in production and dev bundle

The legacy shadow DOM stylesheets that can potentially be present in the
'theme/<themeName>/components/' folder are not considered when deciding
if a new bundle needs to be created, so the application may miss custom
components styles.
This change checks for existence of theme components CSS, and it triggers
a bundle rebuild if any is found.

Fixes #16407

* apply review suggestions

* apply review suggestions
vaadin-bot added a commit that referenced this pull request Oct 6, 2023
…) (CP: 24.1) (#17798)

* fix: handle shadow DOM stylesheets in production and dev bundle (#17776)

* fix: handle shadow DOM stylesheets in production and dev bundle

The legacy shadow DOM stylesheets that can potentially be present in the
'theme/<themeName>/components/' folder are not considered when deciding
if a new bundle needs to be created, so the application may miss custom
components styles.
This change checks for existence of theme components CSS, and it triggers
a bundle rebuild if any is found.

Fixes #16407

* apply review suggestions

* apply review suggestions

* fixed parent pom version

---------

Co-authored-by: Marco Collovati <marco@vaadin.com>
vaadin-bot added a commit that referenced this pull request Oct 6, 2023
…) (CP: 24.2) (#17797)

* fix: handle shadow DOM stylesheets in production and dev bundle (#17776)

* fix: handle shadow DOM stylesheets in production and dev bundle

The legacy shadow DOM stylesheets that can potentially be present in the
'theme/<themeName>/components/' folder are not considered when deciding
if a new bundle needs to be created, so the application may miss custom
components styles.
This change checks for existence of theme components CSS, and it triggers
a bundle rebuild if any is found.

Fixes #16407

* apply review suggestions

* apply review suggestions

* fixed parent pom version

---------

Co-authored-by: Marco Collovati <marco@vaadin.com>
@vaadin-bot

Copy link
Copy Markdown
Collaborator

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

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

Projects

Development

Successfully merging this pull request may close these issues.

Bundle is not rebuilt if you change files in the theme/components folder

3 participants