Skip to content

feat: port upload Lumo styles to CSS files #9483

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

Open
wants to merge 1 commit into
base: port-lumo-styles-to-css-files_progress-bar
Choose a base branch
from

Conversation

vursen
Copy link
Contributor

@vursen vursen commented Jun 17, 2025

Description

Part of #9082

Type of change

  • Feature

@vursen vursen force-pushed the port-lumo-styles-to-css-files_upload branch 2 times, most recently from 7ca2ac6 to 951c692 Compare June 17, 2025 14:10
@vursen vursen force-pushed the port-lumo-styles-to-css-files_progress-bar branch from 9b13e49 to b95fc10 Compare June 17, 2025 14:13
@vursen vursen force-pushed the port-lumo-styles-to-css-files_upload branch from 38ea23f to cce7084 Compare June 17, 2025 14:19
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 requested review from jouni and Copilot and removed request for Copilot June 18, 2025 08:49
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR ports the Lumo upload component’s styles into standalone CSS files, injects them at runtime in the upload elements, and updates imports in the theme and visual tests.

  • Extract separate CSS modules for upload, upload-icon, upload-file, and upload-file-list under vaadin-lumo-styles.
  • Enhance upload element classes with CSSInjectionMixin to apply the new CSS modules.
  • Update the Lumo theme entry, visual regression test imports, and demo page to include the new CSS.

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/vaadin-lumo-styles/src/components/upload.css New host-level styles for <vaadin-upload>
packages/vaadin-lumo-styles/src/components/upload-icon.css New icon pseudo-element styles
packages/vaadin-lumo-styles/src/components/upload-file.css New styles for individual upload-file items
packages/vaadin-lumo-styles/src/components/upload-file-list.css New list-level styles for upload-file-list
packages/vaadin-lumo-styles/components/upload.css Theme entry imports for the new CSS modules
packages/upload/src/vaadin-upload.js Added CSSInjectionMixin to <vaadin-upload>
packages/upload/test/visual/lumo/upload.test.js Updated test imports to load the new Lumo upload CSS
Comments suppressed due to low confidence (1)

packages/upload/test/visual/lumo/upload.test.js:5

  • Visual tests currently cover the main upload surface; consider adding snapshots or scenarios that exercise the upload-file-list and individual upload-file states (e.g., error, complete) to ensure the new styles are rendered correctly.
import '@vaadin/vaadin-lumo-styles/components/upload.css';

}

[hidden] {
display: none;
Copy link
Preview

Copilot AI Jun 18, 2025

Choose a reason for hiding this comment

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

Consider adding !important to the [hidden] rule (e.g. display: none !important;) to match the pattern used in other components and ensure it always overrides.

Suggested change
display: none;
display: none !important;

Copilot uses AI. Check for mistakes.

}

[part='status'],
[part='error'] {
Copy link
Preview

Copilot AI Jun 18, 2025

Choose a reason for hiding this comment

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

There are two separate [part='error'] blocks (this one at line 43 and another at line 123) with different colors. Consider merging them into one rule or reorganizing to avoid duplication.

Copilot uses AI. Check for mistakes.

[part$='icon'] {
margin-right: var(--lumo-space-xs);
font-size: var(--lumo-icon-size-m);
font-family: 'lumo-icons';
Copy link
Preview

Copilot AI Jun 18, 2025

Choose a reason for hiding this comment

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

[nitpick] The font-family value is quoted here but unquoted in upload-icon.css. For consistency, unify quoting across your CSS modules.

Copilot uses AI. Check for mistakes.

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.

1 participant