patternfly / patternfly

This repo contains core (HTML/CSS) implementation for PatternFly. Issues related to CSS/HTML and layout should be filed here.
https://patternfly.org
MIT License
705 stars 96 forks source link

Bug - Table - misalignment when only some headers are sortable #7220

Open thatblindgeye opened 6 days ago

thatblindgeye commented 6 days ago

Describe the problem This is an issue with

Please give a clear and concise description of the problem. Which components are affected? Table with sortable headers

How do you reproduce the problem? Provide steps to reproduce. A codepen or codesandbox demonstrating the problem is appreciated.

Go to the React nested expandable table example and make only one of the header cells sortable. You can just pass sort={{columnIndex: 0}} to one of the <Th components that has a visible text label, do this for both the outermost table and the nested table.

Notice that the text for the sortable header button is misaligned compared to the NON-sortable header cells (see screenshot below):

Image

Expected behavior A clear and concise description of the expected behavior. All cells would be veritcally aligned regardless of the amount of sortable header cells

Is this issue blocking you? List the workaround if there is one.

Screenshots If applicable, add screenshots to help explain the issue.

What is your environment?

What is your product and what release date are you targeting? This was found during updates being made to RHOAI for v6 migration.

Any other information?

mattnolting commented 1 day ago

This bug refers to padding settings and negative margining of buttons as noted here: https://github.com/patternfly/patternfly/pull/7050 and is solved by normalizing line-height, padding, and margining on cells containing buttons.

Example of table__sort in a nested table.

Image