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

chore(table): table selectors #5558

Merged
merged 9 commits into from
May 16, 2023

Conversation

mattnolting
Copy link
Contributor

@mattnolting mattnolting commented May 10, 2023

closes #5549

What this PR does

  • Adds .#{$table}__tr, .#{$table}__th, and .#{$table}__td selectors.
  • Adds direct child ex: .#{$table} > thead combinator to elements without an applied class (tbody, thead, *)
  • Adds a :where() :pseudo to retain specificity while adding versioned class to tr, th, and td

tbody and thead are ignored in this class update in that they can be targeted with a direct child pseudo. tr is updated as adding a I saw tr:where(.#{$table}__tr to be preferable over :where(.#{$table}) > tbody > tr

@patternfly-build
Copy link

patternfly-build commented May 11, 2023

@mattnolting mattnolting force-pushed the chore-table-selectors-5547 branch 2 times, most recently from 1fbe292 to 3a227a9 Compare May 11, 2023 14:10
@mattnolting
Copy link
Contributor Author

@mcoker @srambach Wdyt about this approach to table style versioning without changing specificity?

What this PR does

  • Adds .#{$table}__tr, .#{$table}__th, and .#{$table}__td selectors.
  • Adds direct child ex: .#{$table} > thead combinator to elements without an applied class (tbody, thead, *)
  • Adds a :where() :pseudo to retain specificity while adding versioned class to tr, th, and td

@mattnolting mattnolting force-pushed the chore-table-selectors-5547 branch from 396684c to 5af6426 Compare May 11, 2023 15:57
@mattnolting mattnolting requested a review from mcoker May 11, 2023 15:59
@mattnolting mattnolting marked this pull request as ready for review May 11, 2023 15:59
@mattnolting mattnolting force-pushed the chore-table-selectors-5547 branch from 8241072 to 01815c9 Compare May 11, 2023 16:08
Copy link
Member

@srambach srambach left a comment

Choose a reason for hiding this comment

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

Looks good afaict 👍

@mattnolting mattnolting changed the title Chore table selectors 5547 chore(table): table selectors May 15, 2023
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.

Lookin good! Lots of little bugs, most have created visual discrepancies (how I found them), but all CSS and can be cleaned up later except for the table grid one. Depending on what you want to do there, that might require markup changes. Lemme know if I can help.

Also... can we still run screenshot tests? I think I found all the issues, but this would be a great case for screenshot comparisons to find issues.

And this one is not tied to a prefixed class, but I didn't see the change in the changeset, so leaving it here -

should probably be

tr:where(.#{$table}__tr).pf-m-striped { // tr

@mattnolting mattnolting force-pushed the chore-table-selectors-5547 branch from 01815c9 to 77a0a58 Compare May 16, 2023 12:57
@mattnolting mattnolting force-pushed the chore-table-selectors-5547 branch from a458ecf to a6687fe Compare May 16, 2023 13:52
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

🎉 This PR is included in version 5.0.0-alpha.55 🎉

The release is available on:

Your semantic-release bot 📦🚀

@mcoker mcoker mentioned this pull request May 16, 2023
mattnolting added a commit to mattnolting/patternfly that referenced this pull request May 18, 2023
mattnolting added a commit to mattnolting/patternfly that referenced this pull request Dec 12, 2023
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.

Update Table descendent elements have versioned classnames
5 participants