Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[PBNTR-786] Custom Header in Tables POC #4319

Closed
wants to merge 5 commits into from

Conversation

ElisaShapiro
Copy link
Contributor

@ElisaShapiro ElisaShapiro commented Feb 25, 2025

What does this PR do? A clear and concise description with your runway ticket url.
PBNTR-786 asks for a POC PR and huddle doc addressing a build plan to make custom headers for tables.
The main principles are the following:

  • headers can be borderless.
  • headers can have a custom background color and blend in with the background of the element they are nested within
  • the PR addresses how to achieve the desired look with both the "PB wrapper" and "Subcomponent" version of the table kit for both React and Rails.
  • the final build looks slightly different from the mock in the ticket - having the first row of the table body adopt the same border radius curvature as the table card/table header itself caused issues with the nested table appearance because the tiny cut off corner remained a small speck of white.
  • huddle doc has a lot more info.

Screenshots: Screenshots to visualize your addition/change
rails
for PR base doc ex 1 rails
for PR base doc ex 2 rails
react
for PR base doc ex 1 react
for PR base doc ex 2 react

How to test? Steps to confirm the desired behavior:

  1. Go to table kit page, custom header doc example (rails react links to come).
  2. See multiple table variations within the doc example with markdown explaining both props and how to achieve background color.

Checklist:

  • LABELS Add a label: enhancement, bug, improvement, new kit, deprecated, or breaking. See Changelog & Labels for details.
  • DEPLOY I have added the milano label to show I'm ready for a review.
    - [ ] TESTS I have added test coverage to my code.

@ElisaShapiro ElisaShapiro added milano 20 MAX - Deploy this PR to a review environment via Milano minor Semver Target POC POC, do not merge labels Feb 25, 2025
@ElisaShapiro ElisaShapiro self-assigned this Feb 25, 2025
@powerhome-portal
Copy link

A change to documentation files was detected in your PR. Please visit this link to preview changes: https://portal-staging.powerapp.cloud/docs?filters[kind]=all&filters[user]=all&filters[namespaceFilter]=pbntr-786-table-custom-header-poc

.header-borderless-nested > tbody > tr:first-child > td,
.header-borderless-nested > .pb_table_tbody > .pb_table_tr:first-child > .pb_table_td {
border-top: 1px solid $border_light !important;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In a last minute update yesterday I accidentally removed the code to flatten out the borderlessNested corners (to avoid little white spot). In final PR don't forget:

.header-borderless-nested > thead > tr:first-child > th:first-child,
.header-borderless-nested > .pb_table_thead > .pb_table_tr:first-child > .pb_table_th:first-child {
  border-top-left-radius: 0 !important;
}

.header-borderless-nested > thead > tr:first-child > th:last-child,
.header-borderless-nested > .pb_table_thead > .pb_table_tr:first-child > .pb_table_th:last-child {
  border-top-right-radius: 0 !important;
}

@ElisaShapiro ElisaShapiro removed the milano 20 MAX - Deploy this PR to a review environment via Milano label Feb 26, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
minor Semver Target POC POC, do not merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant