Skip to content

fix: Do not import Lumo twice for the document - #16243

Merged
mshabarov merged 4 commits into
mainfrom
remove-duplicate-lumo
Mar 14, 2023
Merged

mshabarov merged 4 commits into
mainfrom
remove-duplicate-lumo

Conversation

@Artur-

@Artur- Artur- commented Mar 13, 2023 •

Copy link
Copy Markdown
Member

All Lumo modules except utility are loaded and injected into by https://github.com/vaadin/flow-components/blob/main/vaadin-lumo-theme-flow-parent/vaadin-lumo-theme-flow/src/main/java/com/vaadin/flow/theme/lumo/Lumo.java We should not do that another time

This does not guarantee that the utility classes are injected before other styles but they are not meant to be overridden either

@Artur-
Artur- requested a review from mshabarov March 13, 2023 11:55
@github-actions

github-actions Bot commented Mar 13, 2023 •

Copy link
Copy Markdown
Contributor

Test Results

   951 files  ±0     951 suites  ±0   54m 59s ⏱️ -4s
6 036 tests ±0  6 001 ✔️ ±0  35 💤 ±0  0 ❌ ±0 
6 291 runs   - 3  6 249 ✔️  - 3  42 💤 ±0  0 ❌ ±0 

Results for commit 0e8bcd3. ± Comparison against base commit c55e06d.

♻️ This comment has been updated with latest results.

@Artur-
Artur- enabled auto-merge (squash) March 13, 2023 12:15
@Artur-
Artur- disabled auto-merge March 13, 2023 12:33
@Artur-

Artur- commented Mar 13, 2023

Copy link
Copy Markdown
Member Author

This depends on #16230 for the test

@Artur-

Artur- commented Mar 13, 2023

Copy link
Copy Markdown
Member Author

Scrap that, it does not need that test nor does it yet resolve #16231. That needs another PR

@mshabarov mshabarov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any test covering this patch?

…n/theme-generator.js

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
@Artur-

Artur- commented Mar 14, 2023

Copy link
Copy Markdown
Member Author

All existing tests that use Lumo pass so they should test that Lumo still works. I would not add a test that Lumo is not loaded twice because that tests the code and not any feature.

The real problem that should be resolved is #16231, which has a disabled test in #16241. It can be fixed more easily once the test and this PR have been merged. It is an attempt to keep PRs reasonably sized

@mshabarov
mshabarov enabled auto-merge (squash) March 14, 2023 09:03
@Artur-

Artur- commented Mar 14, 2023

Copy link
Copy Markdown
Member Author

Do we need this for 24.0? I think the theme loading changes that are needed are not in general suitable for a bugfix release

@mshabarov

Copy link
Copy Markdown
Contributor

Do we need this for 24.0? I think the theme loading changes that are needed are not in general suitable for a bugfix release

Since this patch fixes what was recently added to 24.0, I assumed 24.0 deserves this fix, especially that the codebase is almost equivalent and this won't require any additional maintenance effort from us.

@mshabarov mshabarov closed this Mar 14, 2023
auto-merge was automatically disabled March 14, 2023 09:08

Pull request was closed

@mshabarov mshabarov reopened this Mar 14, 2023
@mshabarov
mshabarov enabled auto-merge (squash) March 14, 2023 09:09
@sonarqubecloud

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 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@mshabarov
mshabarov merged commit 9fd804d into main Mar 14, 2023
@mshabarov
mshabarov deleted the remove-duplicate-lumo branch March 14, 2023 09:41
vaadin-bot pushed a commit that referenced this pull request Mar 14, 2023
* fix: Do not import Lumo twice for the document

All Lumo modules except utility are loaded and injected into <head> by https://github.com/vaadin/flow-components/blob/main/vaadin-lumo-theme-flow-parent/vaadin-lumo-theme-flow/src/main/java/com/vaadin/flow/theme/lumo/Lumo.java
We should not do that another time

* Update flow-server/src/main/resources/plugins/application-theme-plugin/theme-generator.js

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>

---------

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
vaadin-bot added a commit that referenced this pull request Mar 14, 2023
* fix: Do not import Lumo twice for the document

All Lumo modules except utility are loaded and injected into <head> by https://github.com/vaadin/flow-components/blob/main/vaadin-lumo-theme-flow-parent/vaadin-lumo-theme-flow/src/main/java/com/vaadin/flow/theme/lumo/Lumo.java
We should not do that another time

* Update flow-server/src/main/resources/plugins/application-theme-plugin/theme-generator.js



---------

Co-authored-by: Artur <artur@vaadin.com>
Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Artur- added a commit that referenced this pull request Mar 22, 2023
mshabarov pushed a commit that referenced this pull request Mar 22, 2023
* Revert "fix: Load badge when requested (#16286) (#16288)"

This reverts commit e6a27e0.

* Revert "fix: Do not import Lumo twice for the document (#16243) (#16257)"

This reverts commit 29259ea.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants