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
refactor(table): change the paddings in the expandable content #1598
Conversation
Deploy preview for pf-next ready! Built with commit befe394 |
td { | ||
&.pf-m-no-padding { | ||
padding: 0; | ||
padding-left: var(--pf-c-table__expandable-row--before--Width); // set padding-left to adjust for left border. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you write this as padding: 0 0 0 var(--pf-c-table__expandable-row--before--Width);
?
@@ -26,19 +26,19 @@ | |||
{{#> table-th table-th--data-label="Repository Name"}} | |||
<a href="#">siemur/test-space</a> | |||
{{/table-th}} | |||
{{#> table-td table-td--compound-expansion-toggle="true" table-td--modifier="pf-m-expanded" table-td--data-label="Branches"}} | |||
{{#> table-td table-td--compound-expansion-toggle="true" table-td--modifier="pf-m-expanded pf-m-no-padding" table-td--data-label="Branches"}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you mean to add pf-m-no-padding
to the compound expansion toggle cells? Doesn't look like they have any padding by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes that was a mistake thanks for catching that!
{{#> table-td table-td--attribute='colspan="7"'}} | ||
{{#> table-nested table--id=(concat table--id '-nested-table-1')}} | ||
{{#> table-td table-td--attribute='colspan="7"' table-td--modifier="pf-m-no-padding"}} | ||
{{#> table-nested table--id=(concat table--id '-nested-table-1"')}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to remove the extra double quotes in all of these nested table table--id
's. those were fixed in https://github.com/patternfly/patternfly-next/pull/1614/files
{{#> table-nested table--id=(concat table--id '-nested-table-1"')}} | |
{{#> table-nested table--id=(concat table--id '-nested-table-1')}} |
{{#> table-td table-td--attribute=(concat 'colspan="7" id="' table--id '-content1"')}} | ||
{{#> table-td}}{{/table-td}} | ||
{{#> table-td}}{{/table-td}} | ||
{{#> table-td table-td--attribute=(concat 'colspan="4 id="' table--id '-content1"')}} | ||
<div class="pf-c-table__expandable-row-content"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we create an hbs file for this? we use it a lot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes created one
{{#> table-tr}} | ||
{{#> table-td table-td--toggle="true" table-td--button--attribute=(concat 'aria-labelledby="' table--id '-node2 expandable-toggle2" id="expandable-toggle2" aria-label="Details" aria-controls="' table--id '-content2"')}}{{/table-td}} | ||
{{#> table-td table-td--toggle="true" table-td--button--attribute=(concat 'aria-labelledby="' table--id '-node1 expandable-toggle2" id="expandable-toggle2" aria-label="Details" aria-controls="' table--id '-content2"')}}{{/table-td}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{{#> table-td table-td--toggle="true" table-td--button--attribute=(concat 'aria-labelledby="' table--id '-node1 expandable-toggle2" id="expandable-toggle2" aria-label="Details" aria-controls="' table--id '-content2"')}}{{/table-td}} | |
{{#> table-td table-td--toggle="true" table-td--button--attribute=(concat 'aria-labelledby="' table--id '-node2 expandable-toggle2" id="expandable-toggle2" aria-label="Details" aria-controls="' table--id '-content2"')}}{{/table-td}} |
@mcoker checked designs, I think its meant to be 32px padding left/right for the expandable content. As before it was 32px padding-left/right for the main content, then 64px for the expandable content. But after the change to 16px padding-left/right, I assume it will still be double padding. @kybaker can you review this padding on desktop and mobile ? |
| `.pf-c-table__expandable-row` | `<tr>` | Initiates an expandable row. | | ||
| `.pf-c-table__expandable-row-content` | `.pf-c-table__expandable-row` > `<td>` > `<div>` | Initiates an expandable row content wrapper. | | ||
| `.pf-m-expanded` | `.pf-c-table__toggle` > `.pf-c-button`, `.pf-c-table__expandable-row` | Modifies for expanded state. | | ||
| `.pf-m-no-padding` | `.pf-c-expandable-row` > `<td>` | Modifies the expandable row to have no padding. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `.pf-m-no-padding` | `.pf-c-expandable-row` > `<td>` | Modifies the expandable row to have no padding. | |
| `.pf-m-no-padding` | `.pf-c-table__expandable-row` > `<td>` | Modifies the expandable row to have no padding. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
fix #1507