Skip to content

fix(table): compact table expanded state styling#1563

Merged
christiemolloy merged 13 commits into
patternfly:masterfrom
mcoker:issue-1560
Mar 28, 2019
Merged

fix(table): compact table expanded state styling#1563
christiemolloy merged 13 commits into
patternfly:masterfrom
mcoker:issue-1560

Conversation

@mcoker

@mcoker mcoker commented Mar 12, 2019

Copy link
Copy Markdown
Contributor

fixes #1560

@patternfly-build

patternfly-build commented Mar 12, 2019

Copy link
Copy Markdown
Collaborator

Deploy preview for pf-next ready!

Built with commit 416c4a2

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

@@ -0,0 +1,87 @@
{{#> table table--id="compact-expandable-table" table--grid="true" table--modifier="pf-m-compact pf-m-grid-md" table--expandable="true" table--attribute='aria-label="Compact expandable table example"'}}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wonder if we should design if compact expandable tables need to have the border modifier (once we merge your PR that adds them).

This looks off, but it might just be me
Screen Shot 2019-03-13 at 3 03 21 PM

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

re: borders, I think so. Is what looks off the lack of a border? between the top row and expanded row?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

yeah exactly

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

but I think its a question from design, do you have the design specs?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No, @mceledonia just said that the left border should behave like the regular expanded table example, but I agree it does look weird. Also not sure about the shadow on the right of the expanded area. That shadow fits better when there is a top border.

FWIW, here's what the compact table looks like in a better example with collapsed/expanded rows.

Screen Shot 2019-03-13 at 3 06 01 PM

{{#> table-td table-td--check="true"}}
<input type="checkbox" name="check-all" aria-label="Select all rows">
{{/table-td}}
{{#> table-th table-th--attribute='scope="col"' table-th--sortable="true" table-th--modifier="pf-m-width-30" table-th--selected="true" table-th--desc="true"}}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I dont know if the compound expansion table needs the sortable feature in its demo

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed

@mcoker mcoker force-pushed the issue-1560 branch 2 times, most recently from 425aef1 to ee985d7 Compare March 13, 2019 19:55
@mcoker mcoker requested a review from mceledonia March 13, 2019 20:03
@mcoker

mcoker commented Mar 14, 2019

Copy link
Copy Markdown
Contributor Author

@mceledonia @christiemolloy updated the spacing and border between the expandable row and the expanded content.


.pf-c-table__expandable-row {
.pf-c-table__expandable-row-content {
--pf-c-table__expandable-row-content--PaddingTop: var(--pf-c-table--m-compact__expandable-row-content--PaddingTop);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The paddings on all expandable-row-contents should be 24px.

I had updated table-grid.scss to this, but for some reason the compact table is not assigning it to the only child example (second one).
tr > * { // Remove First child padding left &:first-child { --pf-c-table-cell--PaddingLeft: 0; } // Remove Last child padding right &:last-child { --pf-c-table-cell--PaddingRight: 0; } }
Screen Shot 2019-03-28 at 11 15 51 AM

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ah! Thanks. Updated, let me know if that addresses it :)

@@ -1,4 +1,4 @@
{{#> table newcontext table--id=table--id table--attribute=(concat table-nested--attribute ' id="' table--id '" aria-label="Nested table"') table--modifier="pf-m-compact" table--grid="true"}}
{{#> table newcontext table--id=table--id table--attribute=(concat table-nested--attribute ' id="' table--id '" aria-label="Nested table"') table--modifier="pf-m-compact pf-m-no-border-rows" table--grid="true"}}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What do you think about updating the border modifier to .pf-m-borderless-rows , .pf-m-no-border-rows sounds a little odd to me

@patternfly-build

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@mcoker mcoker deleted the issue-1560 branch December 16, 2019 22:44
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.

3 participants