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

refactor(table): change the paddings in the expandable content #1598

Merged
merged 12 commits into from Mar 27, 2019

Conversation

christiemolloy
Copy link
Member

fix #1507

@patternfly-build
Copy link

patternfly-build commented Mar 19, 2019

Deploy preview for pf-next ready!

Built with commit befe394

https://deploy-preview-1598--pf-next.netlify.com

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.
Copy link
Contributor

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"}}
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 add pf-m-no-padding to the compound expansion toggle cells? Doesn't look like they have any padding by default.

Copy link
Member Author

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"')}}
Copy link
Contributor

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

Suggested change
{{#> 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">
Copy link
Contributor

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.

Copy link
Member Author

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}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{{#> 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
Copy link
Contributor

mcoker commented Mar 25, 2019

Can you verify this is what it's supposed to look like on mobile?
Screen Shot 2019-03-25 at 2 06 15 PM

@christiemolloy
Copy link
Member Author

@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 ?

@christiemolloy
Copy link
Member Author

@mcoker updated spacing here after speaking with @kybaker

| `.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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
| `.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.

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.

nice!

@patternfly-build
Copy link

🎉 This PR is included in version 2.0.0 🎉

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants