Skip to content

refactor!: move button and drop label to light DOM - #4857

Merged
web-padawan merged 4 commits into
masterfrom
refactor/upload-slots
Oct 28, 2022
Merged

web-padawan merged 4 commits into
masterfrom
refactor/upload-slots

Conversation

@web-padawan

Copy link
Copy Markdown
Member

Description

Fixes #4281

  1. Moved add-button, drop-label and drop-label-icon elements to slots using SlotController,
  2. Created vaadin-upload-icon element for default upload icon (so that we can apply styles to it),
  3. Removed an extra <div id="addFiles"> wrapping the button, as it doesn't seem to be needed.

Type of change

  • Breaking change

Comment on lines -27 to -30
[part='primary-buttons'] > * {
display: inline-block;
white-space: nowrap;
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

These styles don't seem to be needed anymore, because the vaadin-button already has them built-in:

display: inline-block;
position: relative;
outline: none;
white-space: nowrap;

Comment on lines -26 to -30
/* TODO(jouni): unsupported selector (not sure why there's #addFiles element wrapping the upload button) */
[part='primary-buttons'] > * {
display: block;
flex-grow: 1;
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removing flex-grow: 1 doesn't seem to affect anything, as the container uses display: inline-flex.

Comment thread packages/upload/src/vaadin-upload.d.ts Resolved
Comment thread packages/upload/src/vaadin-upload.js Resolved
@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 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@vaadin-bot

Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with Vaadin 24.0.0.

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.

[upload] Create slotted elements in light DOM instead of using fallback content

3 participants