Skip to content

feat: port grid Lumo styles to CSS files #9520

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

Merged
merged 8 commits into from
Jun 26, 2025

Conversation

vursen
Copy link
Contributor

@vursen vursen commented Jun 20, 2025

Description

Part of #9082

Type of change

  • Feature

@vursen vursen force-pushed the port-lumo-styles-to-css-files_grid branch 2 times, most recently from d83978b to 40e8fb6 Compare June 20, 2025 13:33
Copy link
Contributor Author

@vursen vursen Jun 20, 2025

Choose a reason for hiding this comment

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

For some reason, when item names start with a capital "V" letter, the tests fail with a strange visual difference:

image

This only happens when running the tests with CSS files and is consistently reproducible both locally and on Sauce Labs. After hours of debugging, I'm still unable to see the cause. Changing Very to A very or simply to very works around the problem. It also doesn't appear to be related to any animation or transition

cursor: pointer;
cursor: default;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
cursor: pointer;
cursor: default;
cursor: default;

See:

:host(:not([leaf])) {
cursor: default;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

-webkit-tap-highlight-color: transparent;
}

:host([dir='rtl']) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could be moved to /* RTL specific styles */

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm getting some rendering differences when testing with the dev page.

Old:

Bildschirmfoto 2025-06-24 um 19 17 27

New:

Bildschirmfoto 2025-06-24 um 19 17 38

Differences:

  • Different size for the selection column
  • Sorter icons seem broken

Copy link
Contributor Author

@vursen vursen Jun 25, 2025

Choose a reason for hiding this comment

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

Sorter icons seem broken

Confirmed: a font containing the sorter icons was missing from the CSS files. The visual tests didn't catch this, likely because the difference was too subtle to trigger a failure. I've pushed a fix.

Different size for the selection column

This is due to the asynchronous loading of Lumo CSS files – recalculateColumnWidths is done before the styles are fully loaded. I'll check if this also happens when adding Lumo through a <link> tag in the <head>

Copy link
Contributor Author

@vursen vursen Jun 26, 2025

Choose a reason for hiding this comment

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

I'll check if this also happens when adding Lumo through a tag in the

No, the issue no longer occurs if I replace

import '@vaadin/vaadin-lumo-styles/lumo.css'

with

<link rel="stylesheet" href="/packages/vaadin-lumo-styles/lumo.css" />

added to the <head>.

@vursen vursen force-pushed the port-lumo-styles-to-css-files_grid branch from 40e8fb6 to 460fc1d Compare June 25, 2025 11:02
Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@vursen vursen merged commit db479e7 into main Jun 26, 2025
9 of 10 checks passed
@vursen vursen deleted the port-lumo-styles-to-css-files_grid branch June 26, 2025 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants