Skip to content
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

fix: make auto-width and text-align usable in custom slot #6602

Merged
merged 4 commits into from
Oct 9, 2023

Conversation

DiegoCardoso
Copy link
Contributor

Description

Fix issues when vaadin-grid is used in a custom component and its column defined via <slot>:

  • Check for assignedSlot when transversing the parent tree to calculate intrinsic width when auto-width is used
  • Check for this._grid when the text-align is set, because the parent custom component might not be defined by the time the vaadin-grid-column is attached to the DOM

Fixes #6475

Type of change

  • Bugfix
  • Feature

packages/grid/src/vaadin-grid-mixin.js Show resolved Hide resolved
packages/grid/test/grid-wrapper.test.js Outdated Show resolved Hide resolved
packages/grid/test/grid-wrapper.test.js Outdated Show resolved Hide resolved
packages/grid/test/grid-wrapper.common.js Outdated Show resolved Hide resolved
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 9, 2023

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

@DiegoCardoso DiegoCardoso force-pushed the fix/grid/slotted-column branch from b5bda95 to 6562ebe Compare October 9, 2023 14:35
@DiegoCardoso DiegoCardoso merged commit b3b9528 into main Oct 9, 2023
9 checks passed
@DiegoCardoso DiegoCardoso deleted the fix/grid/slotted-column branch October 9, 2023 14:46
@vaadin-bot
Copy link
Collaborator

Hi @DiegoCardoso and @DiegoCardoso, when i performed cherry-pick to this commit to 24.2, i have encountered the following issue. Can you take a look and pick it manually?
Error Message:
Error: Command failed: git cherry-pick b3b9528
error: could not apply b3b9528... fix: make auto-width and text-align usable in custom slot (#6602)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

@vaadin-bot
Copy link
Collaborator

Hi @DiegoCardoso and @DiegoCardoso, when i performed cherry-pick to this commit to 24.1, i have encountered the following issue. Can you take a look and pick it manually?
Error Message:
Error: Command failed: git cherry-pick b3b9528
error: could not apply b3b9528... fix: make auto-width and text-align usable in custom slot (#6602)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

@vaadin-bot
Copy link
Collaborator

Hi @DiegoCardoso and @DiegoCardoso, when i performed cherry-pick to this commit to 23.3, i have encountered the following issue. Can you take a look and pick it manually?
Error Message:
Error: Command failed: git cherry-pick b3b9528
error: could not apply b3b9528... fix: make auto-width and text-align usable in custom slot (#6602)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

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.

Cannot use auto-width on column, when passed via <slot>
3 participants