diff --git a/packages/dataviews/src/style.scss b/packages/dataviews/src/style.scss index 156a901460048..a87b4a82c1ecd 100644 --- a/packages/dataviews/src/style.scss +++ b/packages/dataviews/src/style.scss @@ -59,6 +59,10 @@ margin: $grid-unit-40 0 $grid-unit-20; } +.dataviews-view-table-wrapper { + overflow-x: scroll; +} + .dataviews-view-table { width: 100%; text-indent: 0; @@ -81,7 +85,12 @@ td, th { padding: $grid-unit-15; - min-width: 160px; + white-space: nowrap; + + @include break-huge() { + min-width: 200px; + } + &[data-field-id="actions"] { text-align: right; } @@ -200,6 +209,10 @@ .dataviews-view-table-header { padding-left: $grid-unit-05; } + + .dataviews-view-table__actions-column { + width: 1%; + } } .dataviews-view-list__primary-field, diff --git a/packages/dataviews/src/view-table.js b/packages/dataviews/src/view-table.js index 8be188bf91c81..361b4091d646f 100644 --- a/packages/dataviews/src/view-table.js +++ b/packages/dataviews/src/view-table.js @@ -437,7 +437,7 @@ function ViewTable( { ); return ( -
+
) ) } { !! actions?.length && ( -
+ { __( 'Actions' ) } @@ -581,7 +584,7 @@ function ViewTable( { ) ) } { !! actions?.length && ( - + item.description, render: ( { item } ) => { - return item.description - ? decodeEntities( item.description ) - : view.type === LAYOUT_TABLE && ( - <> - - - { __( 'No description.' ) } - - - ); + return item.description ? ( + + { decodeEntities( item.description ) } + + ) : ( + view.type === LAYOUT_TABLE && ( + <> + + + { __( 'No description.' ) } + + + ) + ); }, - maxWidth: 200, + maxWidth: 400, + minWidth: 320, enableSorting: false, }, { @@ -242,6 +247,7 @@ export default function DataviewsTemplates() { enableHiding: false, type: ENUMERATION_TYPE, elements: authors, + width: '1%', }, ], [ authors, view.type ] diff --git a/packages/edit-site/src/components/page-templates/style.scss b/packages/edit-site/src/components/page-templates/style.scss index ed4484550b48d..9fdca6d15d560 100644 --- a/packages/edit-site/src/components/page-templates/style.scss +++ b/packages/edit-site/src/components/page-templates/style.scss @@ -11,3 +11,7 @@ } } } + +.page-templates-description { + white-space: normal; +}