-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Update page component (and some data view elements) spacing metrics #61333
Changes from 14 commits
d45b50b
975b3b2
afc52a1
6f15aa3
dae0d7b
9dcfa7c
8599ed4
3c7a9c7
12a916f
756bb45
6d27cf4
0292095
244ffd6
1000a17
94806b1
122a91a
d8ea7e4
f466e32
efb40c9
7f7de3b
b17ba83
4145fe6
beeef7b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,11 +7,12 @@ | |
|
||
.dataviews-filters__view-actions { | ||
box-sizing: border-box; | ||
padding: $grid-unit-15 $grid-unit-40 0; | ||
margin-bottom: $grid-unit-15; | ||
padding: $grid-unit-20 $grid-unit-60; | ||
flex-shrink: 0; | ||
position: sticky; | ||
left: 0; | ||
transition: padding ease-out 0.2s; | ||
@include reduce-motion("transition"); | ||
|
||
.components-search-control { | ||
.components-base-control__field { | ||
|
@@ -21,12 +22,11 @@ | |
} | ||
|
||
.dataviews-filters__container { | ||
padding-right: $grid-unit-40; | ||
|
||
.dataviews-filters__reset-button[aria-disabled="true"] { | ||
&, | ||
&:hover { | ||
opacity: 0; | ||
padding: 0; | ||
} | ||
|
||
&:focus { | ||
|
@@ -44,10 +44,12 @@ | |
bottom: 0; | ||
left: 0; | ||
background-color: $white; | ||
padding: $grid-unit-15 $grid-unit-40; | ||
padding: $grid-unit-20 $grid-unit-60; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
border-top: $border-width solid $gray-100; | ||
color: $gray-700; | ||
flex-shrink: 0; | ||
transition: padding ease-out 0.2s; | ||
@include reduce-motion("transition"); | ||
} | ||
|
||
.dataviews-pagination__page-selection { | ||
|
@@ -102,7 +104,7 @@ | |
|
||
td:first-child, | ||
th:first-child { | ||
padding-left: $grid-unit-40; | ||
padding-left: $grid-unit-60; | ||
|
||
.dataviews-view-table-header-button, | ||
.dataviews-view-table-header { | ||
|
@@ -112,7 +114,7 @@ | |
|
||
td:last-child, | ||
th:last-child { | ||
padding-right: $grid-unit-40; | ||
padding-right: $grid-unit-60; | ||
} | ||
|
||
&:last-child { | ||
|
@@ -281,7 +283,7 @@ | |
margin-bottom: $grid-unit-30; | ||
grid-template-columns: repeat(2, minmax(0, 1fr)) !important; | ||
grid-template-rows: max-content; | ||
padding: 0 $grid-unit-40; | ||
padding: 0 $grid-unit-60; | ||
|
||
@include break-xlarge() { | ||
grid-template-columns: repeat(3, minmax(0, 1fr)) !important; // Todo: eliminate !important dependency | ||
|
@@ -457,7 +459,7 @@ | |
} | ||
|
||
.dataviews-view-list__item { | ||
padding: $grid-unit-20 0 $grid-unit-20 $grid-unit-40; | ||
padding: $grid-unit-20 0 $grid-unit-20 $grid-unit-30; | ||
width: 100%; | ||
scroll-margin: $grid-unit-10 0; | ||
|
||
|
@@ -529,7 +531,7 @@ | |
|
||
.dataviews-view-list__item-actions { | ||
padding-top: $grid-unit-20; | ||
padding-right: $grid-unit-40; | ||
padding-right: $grid-unit-30; | ||
} | ||
|
||
& + .dataviews-pagination { | ||
|
@@ -544,7 +546,7 @@ | |
|
||
.dataviews-no-results, | ||
.dataviews-loading { | ||
padding: 0 $grid-unit-40; | ||
padding: 0 $grid-unit-60; | ||
Comment on lines
-549
to
+563
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
flex-grow: 1; | ||
display: flex; | ||
align-items: center; | ||
|
@@ -802,6 +804,20 @@ | |
} | ||
} | ||
|
||
@container (max-width: 430px) { /* stylelint-disable -- '@container' not yet globally permitted */ | ||
.dataviews-pagination, | ||
.dataviews-filters__view-actions { | ||
padding: $grid-unit-20 $grid-unit-30; | ||
} | ||
|
||
.dataviews-filters__view-actions { | ||
.components-search-control { | ||
.components-base-control__field { | ||
max-width: 112px; | ||
} | ||
} | ||
} | ||
} | ||
|
||
.dataviews-bulk-actions-toolbar-wrapper { | ||
display: flex; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,7 +100,7 @@ | |
.edit-site-patterns__section-header { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we need to add a 931ee9d04537465594b70c3cbbc73959.mp4 |
||
border-bottom: 1px solid #f0f0f0; | ||
min-height: 72px; | ||
padding: $grid-unit-20 $grid-unit-40; | ||
padding: $grid-unit-30 $grid-unit-60; | ||
position: sticky; | ||
top: 0; | ||
z-index: 2; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,16 +2,20 @@ | |
color: $gray-800; | ||
background: $white; | ||
height: 100%; | ||
container: edit-site-page / inline-size; /* stylelint-disable */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The container queries are in the dataviews package and the container is outside, this is probably the only thing that I'd change, I'd move this to the root element of the dataviews probably. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need the I suppose we could have another There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm thinking we should only have in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess the page-header is outside of the dataviews component. So yeah, maybe two containers. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One way to check this is to test the dataviews in storybook and see if the spacing is correct there. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh good point. Yes we'll probably need two containers. |
||
transition: width ease-out 0.2s; | ||
@include reduce-motion("transition"); | ||
} | ||
|
||
.edit-site-page-header { | ||
padding: $grid-unit-20 $grid-unit-40; | ||
min-height: $grid-unit * 9; | ||
padding: $grid-unit-20 $grid-unit-60; | ||
border-bottom: 1px solid $gray-100; | ||
background: $white; | ||
position: sticky; | ||
top: 0; | ||
z-index: z-index(".edit-site-page-header"); | ||
transition: padding ease-out 0.2s; | ||
@include reduce-motion("transition"); | ||
.components-text { | ||
color: $gray-800; | ||
} | ||
|
@@ -24,6 +28,12 @@ | |
} | ||
} | ||
|
||
@container (max-width: 430px) { | ||
.edit-site-page-header { | ||
padding: $grid-unit-20 $grid-unit-30; | ||
} | ||
} | ||
|
||
.edit-site-page-content { | ||
height: 100%; | ||
display: flex; | ||
|
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.
Is there a reason this was added? This makes the reset button look cramped.
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.
Good spot, it was to reduce the space occupied by the button to avoid wrapping. That should probably be looked at separately though.