From 9903d20c5052558935827ec3f1591cf501182793 Mon Sep 17 00:00:00 2001 From: im3dabasia Date: Wed, 4 Dec 2024 18:26:33 +0530 Subject: [PATCH 1/3] fix: Removed .components-item-group selector class usage in scss file in edit-site components Applied horizontal margins to the following screens 1. Navigation 2. Pages 3. Templates 4. Patterns --- packages/edit-site/src/components/sidebar-dataviews/index.js | 2 +- .../edit-site/src/components/sidebar-dataviews/style.scss | 5 +++++ .../src/components/sidebar-navigation-item/style.scss | 5 +++++ .../src/components/sidebar-navigation-screen-main/index.js | 2 +- .../src/components/sidebar-navigation-screen-main/style.scss | 4 ++++ .../sidebar-navigation-screen-navigation-menus/index.js | 2 +- .../sidebar-navigation-screen-navigation-menus/style.scss | 5 +++++ .../components/sidebar-navigation-screen-patterns/style.scss | 2 ++ .../sidebar-navigation-screen-templates-browse/content.js | 2 +- .../src/components/sidebar-navigation-screen/style.scss | 5 ----- packages/edit-site/src/style.scss | 2 +- 11 files changed, 26 insertions(+), 10 deletions(-) create mode 100644 packages/edit-site/src/components/sidebar-navigation-screen-main/style.scss diff --git a/packages/edit-site/src/components/sidebar-dataviews/index.js b/packages/edit-site/src/components/sidebar-dataviews/index.js index 410767650c6f36..312bf43d6df657 100644 --- a/packages/edit-site/src/components/sidebar-dataviews/index.js +++ b/packages/edit-site/src/components/sidebar-dataviews/index.js @@ -26,7 +26,7 @@ export default function DataViewsSidebarContent( { postType } ) { return ( <> - + { defaultViews.map( ( dataview ) => { return ( + - + { navigationMenus?.map( ( { id, title, status }, index ) => ( + Date: Wed, 4 Dec 2024 18:51:50 +0530 Subject: [PATCH 2/3] fix: Added sidebar-navigation-screen-main/style.scss file correctly --- packages/edit-site/src/style.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/edit-site/src/style.scss b/packages/edit-site/src/style.scss index f51a05424db859..97512418c77bc6 100644 --- a/packages/edit-site/src/style.scss +++ b/packages/edit-site/src/style.scss @@ -34,6 +34,7 @@ @import "./components/global-styles/font-library-modal/style.scss"; @import "./components/pagination/style.scss"; @import "./components/global-styles/variations/style.scss"; +@import "./components/sidebar-global-styles-wrapper/style.scss"; @import "./components/sidebar-navigation-screen-main/style.scss"; /* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */ From 0dcd8f8c4d67a47a48e9a9d16ae4debde4a829af Mon Sep 17 00:00:00 2001 From: im3dabasia Date: Sat, 7 Dec 2024 15:00:10 +0530 Subject: [PATCH 3/3] refactor: CSS code for sidebar in editor --- .../src/components/sidebar-navigation-item/style.scss | 5 ----- .../sidebar-navigation-screen-templates-browse/style.scss | 4 ++++ packages/edit-site/src/style.scss | 5 +++-- 3 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 packages/edit-site/src/components/sidebar-navigation-screen-templates-browse/style.scss diff --git a/packages/edit-site/src/components/sidebar-navigation-item/style.scss b/packages/edit-site/src/components/sidebar-navigation-item/style.scss index 548f983d31e0ac..ac1cf8b730861d 100644 --- a/packages/edit-site/src/components/sidebar-navigation-item/style.scss +++ b/packages/edit-site/src/components/sidebar-navigation-item/style.scss @@ -1,8 +1,3 @@ -.edit-site-sidebar-navigation-screen-templates-browse { - margin-left: -$grid-unit-20; - margin-right: -$grid-unit-20; -} - .edit-site-sidebar-navigation-item.components-item { color: $gray-600; // 6px right padding to align with + button diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-templates-browse/style.scss b/packages/edit-site/src/components/sidebar-navigation-screen-templates-browse/style.scss new file mode 100644 index 00000000000000..8846d5a4b47b4d --- /dev/null +++ b/packages/edit-site/src/components/sidebar-navigation-screen-templates-browse/style.scss @@ -0,0 +1,4 @@ +.edit-site-sidebar-navigation-screen-templates-browse { + margin-left: -$grid-unit-20; + margin-right: -$grid-unit-20; +} diff --git a/packages/edit-site/src/style.scss b/packages/edit-site/src/style.scss index 97512418c77bc6..e1ad161cf7faca 100644 --- a/packages/edit-site/src/style.scss +++ b/packages/edit-site/src/style.scss @@ -21,9 +21,11 @@ @import "./components/sidebar-navigation-screen-details-footer/style.scss"; @import "./components/sidebar-navigation-screen-navigation-menu/style.scss"; @import "./components/sidebar-navigation-screen-patterns/style.scss"; +@import "./components/sidebar-navigation-screen-navigation-menus/style.scss"; +@import "./components/sidebar-navigation-screen-main/style.scss"; +@import "./components/sidebar-navigation-screen-templates-browse/style.scss"; @import "./components/sidebar-dataviews/style.scss"; @import "./components/site-hub/style.scss"; -@import "./components/sidebar-navigation-screen-navigation-menus/style.scss"; @import "./components/site-icon/style.scss"; @import "./components/style-book/style.scss"; @import "./components/editor-canvas-container/style.scss"; @@ -35,7 +37,6 @@ @import "./components/pagination/style.scss"; @import "./components/global-styles/variations/style.scss"; @import "./components/sidebar-global-styles-wrapper/style.scss"; -@import "./components/sidebar-navigation-screen-main/style.scss"; /* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */ ::view-transition-image-pair(root) {