Skip to content

Commit

Permalink
Update grid view design for grid view
Browse files Browse the repository at this point in the history
  • Loading branch information
akasunil committed Sep 25, 2024
1 parent 456e1c2 commit 1dd9af3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ function CompactItemActions< Item >( {
<DropdownMenuV2
trigger={
<Button
size="compact"
size="small"
icon={ moreVertical }
label={ __( 'Actions' ) }
accessibleWhenDisabled
Expand Down
6 changes: 5 additions & 1 deletion packages/dataviews/src/dataviews-layouts/grid/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,12 @@ function GridItem< Item >( {
<HStack
justify="space-between"
className="dataviews-view-grid__title-actions"
alignment="top"
>
<HStack className="dataviews-view-grid__primary-field">
<HStack
className="dataviews-view-grid__primary-field"
alignment="top"
>
{ renderedPrimaryField }
</HStack>
<ItemActions item={ item } actions={ actions } isCompact />
Expand Down
2 changes: 1 addition & 1 deletion packages/dataviews/src/dataviews-layouts/grid/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}

.dataviews-view-grid__primary-field {
min-height: $grid-unit-40; // Preserve layout when there is no ellipsis button
min-height: $grid-unit-30; // Preserve layout when there is no ellipsis button
}

&.is-selected {
Expand Down
1 change: 1 addition & 0 deletions packages/dataviews/src/dataviews-layouts/table/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@

.dataviews-view-table__actions-column {
width: 1%;
vertical-align: middle;
}

&:has(tr.is-selected) {
Expand Down
6 changes: 6 additions & 0 deletions packages/edit-site/src/components/page-patterns/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
white-space: normal;
padding-top: 3px;
align-self: start;
}

.edit-site-patterns__pattern-lock-icon {
align-self: start;
}
}

Expand Down

0 comments on commit 1dd9af3

Please sign in to comment.