From 3c617c663ca0a2fa039da89a0274ba9d7baecc45 Mon Sep 17 00:00:00 2001 From: akasunil Date: Tue, 10 Sep 2024 18:15:36 +0530 Subject: [PATCH 1/9] Fix pattern title text overflow --- .../edit-site/src/components/page-patterns/style.scss | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/edit-site/src/components/page-patterns/style.scss b/packages/edit-site/src/components/page-patterns/style.scss index c62fe34daf7d6..4b9940ad8560d 100644 --- a/packages/edit-site/src/components/page-patterns/style.scss +++ b/packages/edit-site/src/components/page-patterns/style.scss @@ -76,12 +76,14 @@ } .edit-site-patterns__pattern-title { - display: block; width: 100%; - white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: inherit; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + white-space: normal; .is-link { text-decoration: none; @@ -111,6 +113,10 @@ color: var(--wp-block-synced-color); } } + + .edit-site-patterns__pattern-title { + display: -webkit-box; + } } .dataviews-action-modal__duplicate-pattern { From ac30e33c0873ad7c7de3695a1a92b5f08c923308 Mon Sep 17 00:00:00 2001 From: akasunil Date: Wed, 11 Sep 2024 18:00:30 +0530 Subject: [PATCH 2/9] Apply text overflow on title for grid view only --- .../src/components/page-patterns/style.scss | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/edit-site/src/components/page-patterns/style.scss b/packages/edit-site/src/components/page-patterns/style.scss index 4b9940ad8560d..a9b1c3b5a87cf 100644 --- a/packages/edit-site/src/components/page-patterns/style.scss +++ b/packages/edit-site/src/components/page-patterns/style.scss @@ -76,14 +76,12 @@ } .edit-site-patterns__pattern-title { + display: block; width: 100%; + white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: inherit; - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; - white-space: normal; .is-link { text-decoration: none; @@ -106,6 +104,15 @@ } } +.dataviews-view-grid { + .edit-site-patterns__pattern-title { + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + white-space: normal; + } +} + .edit-site-page-patterns-dataviews { .dataviews-view-grid__badge-fields { .dataviews-view-grid__field-value:has(.edit-site-patterns__field-sync-status-fully) { @@ -113,10 +120,6 @@ color: var(--wp-block-synced-color); } } - - .edit-site-patterns__pattern-title { - display: -webkit-box; - } } .dataviews-action-modal__duplicate-pattern { From 1dd9af3b493cd1eda72b2d5b54542aa7100b3326 Mon Sep 17 00:00:00 2001 From: akasunil Date: Wed, 25 Sep 2024 12:52:43 +0530 Subject: [PATCH 3/9] Update grid view design for grid view --- .../src/components/dataviews-item-actions/index.tsx | 2 +- packages/dataviews/src/dataviews-layouts/grid/index.tsx | 6 +++++- packages/dataviews/src/dataviews-layouts/grid/style.scss | 2 +- packages/dataviews/src/dataviews-layouts/table/style.scss | 1 + packages/edit-site/src/components/page-patterns/style.scss | 6 ++++++ 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/dataviews/src/components/dataviews-item-actions/index.tsx b/packages/dataviews/src/components/dataviews-item-actions/index.tsx index e33cb0fe56d0e..bad48e122c17e 100644 --- a/packages/dataviews/src/components/dataviews-item-actions/index.tsx +++ b/packages/dataviews/src/components/dataviews-item-actions/index.tsx @@ -248,7 +248,7 @@ function CompactItemActions< Item >( { ( { - + { renderedPrimaryField } diff --git a/packages/dataviews/src/dataviews-layouts/grid/style.scss b/packages/dataviews/src/dataviews-layouts/grid/style.scss index 6286ed94685a0..40e0188da6ac0 100644 --- a/packages/dataviews/src/dataviews-layouts/grid/style.scss +++ b/packages/dataviews/src/dataviews-layouts/grid/style.scss @@ -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 { diff --git a/packages/dataviews/src/dataviews-layouts/table/style.scss b/packages/dataviews/src/dataviews-layouts/table/style.scss index ea2c614e4339d..d955a6c4c2f99 100644 --- a/packages/dataviews/src/dataviews-layouts/table/style.scss +++ b/packages/dataviews/src/dataviews-layouts/table/style.scss @@ -162,6 +162,7 @@ .dataviews-view-table__actions-column { width: 1%; + vertical-align: middle; } &:has(tr.is-selected) { diff --git a/packages/edit-site/src/components/page-patterns/style.scss b/packages/edit-site/src/components/page-patterns/style.scss index a9b1c3b5a87cf..2b954a1b5e8c4 100644 --- a/packages/edit-site/src/components/page-patterns/style.scss +++ b/packages/edit-site/src/components/page-patterns/style.scss @@ -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; } } From daa89f51f4491099732ce0dfbc8e568bf82ee77d Mon Sep 17 00:00:00 2001 From: akasunil Date: Sat, 19 Oct 2024 16:49:37 +0530 Subject: [PATCH 4/9] Fix my pattern titles text overflow issue --- .../src/components/dataviews-item-actions/index.tsx | 2 +- .../dataviews/src/dataviews-layouts/grid/index.tsx | 5 +---- .../dataviews/src/dataviews-layouts/grid/style.scss | 2 +- .../src/components/page-patterns/style.scss | 13 ++++++++++++- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/packages/dataviews/src/components/dataviews-item-actions/index.tsx b/packages/dataviews/src/components/dataviews-item-actions/index.tsx index bad48e122c17e..e33cb0fe56d0e 100644 --- a/packages/dataviews/src/components/dataviews-item-actions/index.tsx +++ b/packages/dataviews/src/components/dataviews-item-actions/index.tsx @@ -248,7 +248,7 @@ function CompactItemActions< Item >( { ( { className="dataviews-view-grid__title-actions" alignment="top" > - + { renderedPrimaryField } diff --git a/packages/dataviews/src/dataviews-layouts/grid/style.scss b/packages/dataviews/src/dataviews-layouts/grid/style.scss index 40e0188da6ac0..ebf140710f510 100644 --- a/packages/dataviews/src/dataviews-layouts/grid/style.scss +++ b/packages/dataviews/src/dataviews-layouts/grid/style.scss @@ -12,7 +12,7 @@ position: relative; .dataviews-view-grid__title-actions { - padding: $grid-unit-10 0 $grid-unit-05; + padding: $grid-unit-10 0 $grid-unit-10; } .dataviews-view-grid__primary-field { diff --git a/packages/edit-site/src/components/page-patterns/style.scss b/packages/edit-site/src/components/page-patterns/style.scss index 2b954a1b5e8c4..2025a031638a9 100644 --- a/packages/edit-site/src/components/page-patterns/style.scss +++ b/packages/edit-site/src/components/page-patterns/style.scss @@ -112,11 +112,22 @@ white-space: normal; padding-top: 3px; align-self: start; - } + button.components-button.is-link { + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + display: -webkit-box; + white-space: normal; + } + } .edit-site-patterns__pattern-lock-icon { align-self: start; } + + .components-button.dataviews-all-actions-button.has-icon:not(.has-text) { + min-width: 24px; + height: 24px; + } } .edit-site-page-patterns-dataviews { From 4836360a916f18775f31383dfd2ff698e7a6c68b Mon Sep 17 00:00:00 2001 From: akasunil Date: Mon, 21 Oct 2024 11:36:11 +0530 Subject: [PATCH 5/9] Rewrite styles --- .../src/components/page-patterns/style.scss | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/edit-site/src/components/page-patterns/style.scss b/packages/edit-site/src/components/page-patterns/style.scss index 2025a031638a9..ab55abadf90f6 100644 --- a/packages/edit-site/src/components/page-patterns/style.scss +++ b/packages/edit-site/src/components/page-patterns/style.scss @@ -43,6 +43,10 @@ .edit-site-patterns__pattern-lock-icon { min-width: min-content; + + .dataviews-view-grid & { + align-self: start; + } } .edit-site-patterns__section-header { @@ -102,10 +106,8 @@ .edit-site-patterns__pattern-lock-icon { fill: currentcolor; } -} -.dataviews-view-grid { - .edit-site-patterns__pattern-title { + .dataviews-view-grid & { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; @@ -120,11 +122,10 @@ white-space: normal; } } - .edit-site-patterns__pattern-lock-icon { - align-self: start; - } +} - .components-button.dataviews-all-actions-button.has-icon:not(.has-text) { +.components-button.dataviews-all-actions-button.has-icon:not(.has-text) { + .dataviews-view-grid & { min-width: 24px; height: 24px; } From 1f10f86382c9a984d3122f151712f833fa8ace81 Mon Sep 17 00:00:00 2001 From: akasunil Date: Thu, 14 Nov 2024 11:35:28 +0530 Subject: [PATCH 6/9] Remove unneccessory changes --- packages/block-library/src/image/block.json | 9 +-------- packages/block-library/src/post-content/block.json | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/block-library/src/image/block.json b/packages/block-library/src/image/block.json index 26835df9e856c..16e3121747602 100644 --- a/packages/block-library/src/image/block.json +++ b/packages/block-library/src/image/block.json @@ -4,14 +4,7 @@ "name": "core/image", "title": "Image", "category": "media", - "usesContext": [ - "allowResize", - "imageCrop", - "fixedHeight", - "postId", - "postType", - "queryId" - ], + "usesContext": [ "allowResize", "imageCrop", "fixedHeight", "postId", "postType", "queryId" ], "description": "Insert an image to make a visual statement.", "keywords": [ "img", "photo", "picture" ], "textdomain": "default", diff --git a/packages/block-library/src/post-content/block.json b/packages/block-library/src/post-content/block.json index e5d455b97a8a3..ed9c47154b2f8 100644 --- a/packages/block-library/src/post-content/block.json +++ b/packages/block-library/src/post-content/block.json @@ -69,4 +69,4 @@ }, "style": "wp-block-post-content", "editorStyle": "wp-block-post-content-editor" -} +} \ No newline at end of file From 41c6d75d1845b419fc85c63a85686cdfc5783d59 Mon Sep 17 00:00:00 2001 From: akasunil Date: Thu, 14 Nov 2024 13:40:45 +0530 Subject: [PATCH 7/9] Fix button outline issue and remove component prefix in styles --- packages/edit-site/src/components/page-patterns/style.scss | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/edit-site/src/components/page-patterns/style.scss b/packages/edit-site/src/components/page-patterns/style.scss index e064b80e94784..af4203fcc48de 100644 --- a/packages/edit-site/src/components/page-patterns/style.scss +++ b/packages/edit-site/src/components/page-patterns/style.scss @@ -123,10 +123,11 @@ } } -.components-button.dataviews-all-actions-button.has-icon:not(.has-text) { +.dataviews-all-actions-button.has-icon:not(.has-text) { .dataviews-view-grid & { - min-width: 24px; height: 24px; + width: 24px; + min-width: 24px; } } From d91af64c7ab29d37daecd8d2e8108604f74a83bd Mon Sep 17 00:00:00 2001 From: akasunil Date: Tue, 19 Nov 2024 19:34:28 +0530 Subject: [PATCH 8/9] Remove static styles for action button on grid view --- .../edit-site/src/components/page-patterns/style.scss | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/edit-site/src/components/page-patterns/style.scss b/packages/edit-site/src/components/page-patterns/style.scss index af4203fcc48de..e6d5d142f242d 100644 --- a/packages/edit-site/src/components/page-patterns/style.scss +++ b/packages/edit-site/src/components/page-patterns/style.scss @@ -123,14 +123,6 @@ } } -.dataviews-all-actions-button.has-icon:not(.has-text) { - .dataviews-view-grid & { - height: 24px; - width: 24px; - min-width: 24px; - } -} - .edit-site-page-patterns-dataviews { .dataviews-view-grid__badge-fields { .dataviews-view-grid__field-value:has(.edit-site-patterns__field-sync-status-fully) { From 1d3d8b026853159403fe19b09e35fd754673a0fb Mon Sep 17 00:00:00 2001 From: akasunil Date: Wed, 20 Nov 2024 15:57:53 +0530 Subject: [PATCH 9/9] Remove unneccessory changes --- packages/dataviews/src/dataviews-layouts/table/style.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/dataviews/src/dataviews-layouts/table/style.scss b/packages/dataviews/src/dataviews-layouts/table/style.scss index d955a6c4c2f99..ea2c614e4339d 100644 --- a/packages/dataviews/src/dataviews-layouts/table/style.scss +++ b/packages/dataviews/src/dataviews-layouts/table/style.scss @@ -162,7 +162,6 @@ .dataviews-view-table__actions-column { width: 1%; - vertical-align: middle; } &:has(tr.is-selected) {