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

Datagrid: hiding the last column adds whitespaces at the end and shows scrollbar #1501

Closed
fichtip opened this issue Jul 31, 2024 · 2 comments
Assignees

Comments

@fichtip
Copy link

fichtip commented Jul 31, 2024

This is a bug report for the @clr Angular or UI versions of the design system.
For the web-component implementation of Clarity (@cds), visit vmware-clarity/core.

If you are a VMware employee or a contractor in VMware, please use our support space in Google Chat to raise Clarity issues.

Describe the bug

Hiding the last column of a datagrid ends up in showing some whitespaces a the end of the datagrid in addition to the scrollbar.

Showing all columns
grafik

Hiding non-last column
grafik

Hiding last column
grafik

How to reproduce

This behavior can also be seen with the provided example in the documentation.

Steps to reproduce the behavior:

  1. Open link of documentation from above
  2. Click on 'Manage Column'
  3. unselect 'Favorite color'

Expected behavior

No whitespaces and no scrollbar when hiding the last element.

Versions

Clarity version:

"@cds/core": "^6.12.0",
"@clr/angular": "^17.2.1",
"@clr/ui": "^17.2.1",

Framework version:

"@angular/core": "~17.1.2",

Device:

  • Type: Lenovo ThinkPad P53
  • OS: Windows 11
  • Browser Firefox, Edge
  • Version FF 128.0.3, Edge 127.0.2651.74

Additional notes

Add any other notes about the problem here.

@dtsanevmw dtsanevmw self-assigned this Oct 2, 2024
dtsanevmw added a commit that referenced this issue Oct 14, 2024
## PR Checklist

Please check if your PR fulfills the following requirements:

- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
- [ ] If applicable, have a visual design approval

## PR Type

What kind of change does this PR introduce?

<!-- Please check the one that applies to this PR using "x". -->

- [X] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] Other... Please describe:

## What is the current behavior?

Currently we have a CSS selector for `:last-child` to hide the separator
from the column but when the last column gets hidden that's happening
only visually and it's still in the DOM so that's not working.

<!-- Please describe the current behavior that you are modifying, or
link to a relevant issue. -->

Issue Number: CDE-2317, #1501 

## What is the new behavior?

Update showSeparator states when hidden state changes.

## Does this PR introduce a breaking change?

- [ ] Yes
- [X] No

<!-- If this PR contains a breaking change, please describe the impact
and migration path for existing applications below. -->

## Other information
github-actions bot pushed a commit that referenced this issue Oct 14, 2024
## PR Checklist

Please check if your PR fulfills the following requirements:

- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
- [ ] If applicable, have a visual design approval

## PR Type

What kind of change does this PR introduce?

<!-- Please check the one that applies to this PR using "x". -->

- [X] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] Other... Please describe:

## What is the current behavior?

Currently we have a CSS selector for `:last-child` to hide the separator
from the column but when the last column gets hidden that's happening
only visually and it's still in the DOM so that's not working.

<!-- Please describe the current behavior that you are modifying, or
link to a relevant issue. -->

Issue Number: CDE-2317, #1501

## What is the new behavior?

Update showSeparator states when hidden state changes.

## Does this PR introduce a breaking change?

- [ ] Yes
- [X] No

<!-- If this PR contains a breaking change, please describe the impact
and migration path for existing applications below. -->

## Other information

(cherry picked from commit b4a4935)
@dtsanevmw
Copy link
Contributor

Fixed in b4a4935 and it will be in the next release.

dtsanevmw added a commit that referenced this issue Oct 14, 2024
…to 16.x) (#1591)

Backport b4a4935 from #1584. <br> ## PR
Checklist

Please check if your PR fulfills the following requirements:

- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
- [ ] If applicable, have a visual design approval

## PR Type

What kind of change does this PR introduce?

&lt;!-- Please check the one that applies to this PR using
&quot;x&quot;. --&gt;

- [X] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] Other... Please describe:

## What is the current behavior?

Currently we have a CSS selector for `:last-child` to hide the separator
from the column but when the last column gets hidden that&#39;s
happening only visually and it&#39;s still in the DOM so that&#39;s not
working.

&lt;!-- Please describe the current behavior that you are modifying, or
link to a relevant issue. --&gt;

Issue Number: CDE-2317, #1501 

## What is the new behavior?

Update showSeparator states when hidden state changes.

## Does this PR introduce a breaking change?

- [ ] Yes
- [X] No

&lt;!-- If this PR contains a breaking change, please describe the
impact and migration path for existing applications below. --&gt;

## Other information

Co-authored-by: Daniel Tsanev <127101685+dtsanevmw@users.noreply.github.com>
Copy link
Contributor

Hi there 👋, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed issues after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants