8000 fix(table): updated thead td to th by mattnolting · Pull Request #6689 · patternfly/patternfly · GitHub
[go: up one dir, main page]

Skip to content

fix(table): updated thead td to th#6689

Merged
mcoker merged 5 commits intopatternfly:v6from
mattnolting:fix-table-th-6272
Aug 29, 2024
Merged

fix(table): updated thead td to th#6689
mcoker merged 5 commits intopatternfly:v6from
mattnolting:fix-table-th-6272

Conversation

@mattnolting
Copy link
Collaborator
@mattnolting mattnolting commented May 23, 2024

closes #6272
closes #6643

Backstop Report

8/26 Update

Header shift is due to pf-v6-c-table__cell-empty and is expected

Backstop report

Favorites example shouldn't be sorted, this diff is expected

Screenshot 2024-08-26 at 12 44 03 PM

This PR creates a partial container for special table cells. The internals of the partials remain unchanged while the wrapping element detects IsThead and returns th if true, td if false. Empty cells' default screen reader text is set to "Action" (the most common use case) and optionally updated text via table-cell--text.

This shift is due to updating action empty th to pf-v6-c-table__cell-empty

Screenshot 2024-08-20 at 12 34 35 PM

This and all other search input shifts are due to button updates unrelated to this PR

Screenshot 2024-08-20 at 12 36 42 PM

@patternfly-build
Copy link
Collaborator
patternfly-build commented May 23, 2024

@mattnolting mattnolting force-pushed the fix-table-th-6272 branch 2 times, most recently from 33f6778 to 7beb642 Compare June 12, 2024 17:17
@kmcfaul kmcfaul linked an issue Jun 17, 2024 that may be closed by this pull request
3 tasks
@mattnolting mattnolting requested a review from thatblindgeye July 2, 2024 18:43
@mattnolting mattnolting force-pushed the fix-table-th-6272 branch 4 times, most recently from 8dec9b6 to 327813e Compare July 19, 2024 16:41
Copy link
Contributor
@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

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

Looking great ⭐ Just 1 last thing, the Favorites sortable example need an aria-label applied to the th element for the first column where the "favorite all" and "sort" buttons are (could use the screen reader text "Row favorited" from the previous example)

@mcoker
Copy link
Contributor
mcoker commented Aug 13, 2024

Attaching the backstop report - BackstopJS Report.pdf

Looks like there may at least be an issue with icons rendering in menu toggles. Here's a toolbar example that's rendering an empty toggle

Screenshot 2024-08-13 at 12 45 20 PM

@mcoker
Copy link
Contributor
mcoker commented Aug 20, 2024

@thatblindgeye would you mind reviewing this again? Particularly with the last changeset - 68bd944

Copy link
Contributor
@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

Left a couple of comments and attaching the backstop report:
table-8.19.24.pdf

Mostly it looks like these two things:

  • column widths changed (even when there are no empty headers, actions, or truncated test)
  • some <th> cells are no longer truncated by default

Are those to be expected?

If there are more updates, would you mind attaching visual regressions and leave a comment explaining the errors?

Comment on lines +469 to +470
:where(&) > :is(thead, tbody),
&.#{$table}__thead {
Copy link
Contributor

Choose a reason for hiding this comment

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

This compiles to

.pf-v6-c-table :where([class*=pf-v6-c-table]),
:where(.pf-v6-c-table) > :is(thead, tbody),
.pf-v6-c-table.pf-v6-c-table__thead

Just want to verify that's correct - particularly the last line? Curious when we have .pf-v6-c-table.pf-v6-c-table__thead if so.

{{#if toolbar-template--HasToggleGroup}}
{{#> toolbar-group toolbar-group--IsToggleGroup=true toolbar-group--modifier="pf-m-show-on-xl"}}
{{> toolbar-toggle}}
{{> toolbar-toggle menu-toggle-icon='filter'}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you mean to leave this in?

Suggested change
{{> toolbar-toggle menu-toggle-icon='filter'}}
{{> toolbar-toggle}}

Copy link
Contributor
@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

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

Other than the a11y failures this looks good

Copy link
Contributor
@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

@mattnolting LGTM, just want to confirm the changes in the backstop report are good.
BackstopJS Report.pdf

Particularly this change on the sortable favorites table example which changes the favorite button from a sorted state to not

Screenshot 2024-08-27 at 1 30 36 PM

Comment on lines -1093 to -1095
&.pf-m-border-row {
border-block-end: var(--#{$table}--border-width--base) solid var(--#{$table}--BorderColor);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Just want to make sure this is intentional? If so can you give a summary of why? Looks like we'll need a react update for this, too.

Copy link
Contributor
@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

🎃👍

@patternfly-build
Copy link
Collaborator

🎉 This PR is included in version 6.0.0-alpha.227 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

4 participants

0