From 6cbe2d1cc20a4247b7576c3183d70ad7456ba4f7 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Thu, 22 Aug 2024 13:15:23 +0200 Subject: [PATCH] DataViews: Add missing styles and remove opinionated ones for generic usage (#64711) Co-authored-by: youknowriad Co-authored-by: ntsekouras Co-authored-by: jameskoster --- .../src/components/dataviews-view-config/style.scss | 4 ++++ .../dataviews/src/components/dataviews/stories/fixtures.js | 3 +++ packages/dataviews/src/dataviews-layouts/list/style.scss | 1 + packages/dataviews/src/dataviews-layouts/table/style.scss | 5 ----- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/dataviews/src/components/dataviews-view-config/style.scss b/packages/dataviews/src/components/dataviews-view-config/style.scss index 85e86722f7b61..00c1c6a9baf44 100644 --- a/packages/dataviews/src/components/dataviews-view-config/style.scss +++ b/packages/dataviews/src/components/dataviews-view-config/style.scss @@ -29,6 +29,10 @@ } } +.dataviews-settings-section:has(.dataviews-settings-section__content:empty) { + display: none; +} + /* stylelint-disable-next-line scss/at-rule-no-unknown -- '@container' not globally permitted */ @container (max-width: 500px) { .dataviews-settings-section.dataviews-settings-section { diff --git a/packages/dataviews/src/components/dataviews/stories/fixtures.js b/packages/dataviews/src/components/dataviews/stories/fixtures.js index 50401d97b026b..e061d0951ade7 100644 --- a/packages/dataviews/src/components/dataviews/stories/fixtures.js +++ b/packages/dataviews/src/components/dataviews/stories/fixtures.js @@ -191,6 +191,9 @@ export const fields = [ id: 'title', enableHiding: false, enableGlobalSearch: true, + render: ( { item } ) => { + return { item.title }; + }, }, { id: 'date', diff --git a/packages/dataviews/src/dataviews-layouts/list/style.scss b/packages/dataviews/src/dataviews-layouts/list/style.scss index a3295d1f3fd5f..5bbe76f87ca5b 100644 --- a/packages/dataviews/src/dataviews-layouts/list/style.scss +++ b/packages/dataviews/src/dataviews-layouts/list/style.scss @@ -101,6 +101,7 @@ } .dataviews-view-list__item { + box-sizing: border-box; padding: $grid-unit-20 $grid-unit-30; width: 100%; scroll-margin: $grid-unit-10 0; diff --git a/packages/dataviews/src/dataviews-layouts/table/style.scss b/packages/dataviews/src/dataviews-layouts/table/style.scss index 7bbd172c8c91b..dd091db4ec99f 100644 --- a/packages/dataviews/src/dataviews-layouts/table/style.scss +++ b/packages/dataviews/src/dataviews-layouts/table/style.scss @@ -7,11 +7,6 @@ color: $gray-700; margin-bottom: auto; - a { - text-decoration: none; - color: $gray-900; - font-weight: 500; - } th { text-align: left; color: $gray-900;