From 1adfa7e2ace8472d2b3254c670d1285b2c784273 Mon Sep 17 00:00:00 2001 From: Joshua Dinh Date: Mon, 2 Dec 2024 06:59:39 +0900 Subject: [PATCH 01/19] fix: adjust tab padding --- .../CampaignDetailsPage/CampaignDetailsPage.module.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss b/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss index 4c3519128d..784afde267 100644 --- a/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss +++ b/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss @@ -143,7 +143,7 @@ select[name="campaignId"] { .tabs [role='tab'] { position: relative; appearance: none; - padding: 1em; + padding: var(--givewp-spacing-2) var(--givewp-spacing-4); border: 0; background-color: transparent; color: inherit; From e203cd6b1dced7e886700ad6c63aa2cee54e9969 Mon Sep 17 00:00:00 2001 From: Joshua Dinh Date: Mon, 2 Dec 2024 07:00:32 +0900 Subject: [PATCH 02/19] fix: add tab line-height and center text --- .../CampaignDetailsPage/CampaignDetailsPage.module.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss b/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss index 784afde267..c8a0f5bbbc 100644 --- a/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss +++ b/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss @@ -148,6 +148,8 @@ select[name="campaignId"] { background-color: transparent; color: inherit; font-size: 0.8rem; + line-height: 1.5rem; + text-align: center; cursor: pointer; } From 52d87998a8d1542135332a9583b40bac0aa6a6d8 Mon Sep 17 00:00:00 2001 From: Joshua Dinh Date: Mon, 2 Dec 2024 07:56:43 +0900 Subject: [PATCH 03/19] refactor: allow tab border on hover to expand --- .../CampaignDetailsPage/CampaignDetailsPage.module.scss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss b/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss index c8a0f5bbbc..803c13bede 100644 --- a/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss +++ b/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss @@ -151,6 +151,7 @@ select[name="campaignId"] { line-height: 1.5rem; text-align: center; cursor: pointer; + box-sizing: border-box } @media screen and (min-width: 48rem) { @@ -166,7 +167,8 @@ select[name="campaignId"] { display: block; position: absolute; top: calc(100% - 0.1875em); - width: calc(100% - 2em); + left: 0; + right: 0; height: 0.1875em; background-color: transparent; transition: background-color 100ms ease-in-out; From 1aadff2622d5ff5321d7e5751f982440cc263717 Mon Sep 17 00:00:00 2001 From: Joshua Dinh Date: Mon, 2 Dec 2024 07:57:28 +0900 Subject: [PATCH 04/19] feature: add width to tab to maintain size on hover --- .../CampaignDetailsPage.module.scss | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss b/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss index 803c13bede..68af91726e 100644 --- a/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss +++ b/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss @@ -180,6 +180,22 @@ select[name="campaignId"] { font-weight: 600; } +// set width for each tab to maintain size on hover. +.tabs [data-reach-tab]:first-child, +.tabs [role='tab']:first-child { + width: 104px; +} + +.tabs [data-reach-tab]:nth-child(2), +.tabs [role='tab']:nth-child(2) { + width: 95px; +} + +.tabs [data-reach-tab]:last-child, +.tabs [role='tab']:last-child { + width: 79px; +} + .tabs [data-reach-tab][aria-selected='true']::after, .tabs [role='tab'][aria-selected='true']::after { background-color: #66bb6a; From be6624002e05ab5b4923f69cb87d47081c50c98e Mon Sep 17 00:00:00 2001 From: Joshua Dinh Date: Mon, 2 Dec 2024 10:02:15 +0900 Subject: [PATCH 05/19] feature: adjust tabs container for forms page content --- .../CampaignDetailsPage/CampaignDetailsPage.module.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss b/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss index 68af91726e..78e49a9917 100644 --- a/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss +++ b/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss @@ -136,6 +136,10 @@ select[name="campaignId"] { &:not(.fullWidth) { padding: 0 var(--givewp-spacing-6); } + + &.fullWidth { + padding-left: var(--givewp-spacing-6); + } } From 894b3b07952674bc64b385f92e76678109a43741 Mon Sep 17 00:00:00 2001 From: Joshua Dinh Date: Wed, 4 Dec 2024 05:30:26 +0900 Subject: [PATCH 06/19] refactor: adjust hover font weight --- .../CampaignDetailsPage/CampaignDetailsPage.module.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss b/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss index 78e49a9917..805cf70960 100644 --- a/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss +++ b/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss @@ -179,6 +179,10 @@ select[name="campaignId"] { } .tabs [role='tab']:hover, +.tabs [data-reach-tab]:hover { + font-weight: 500; +} + .tabs [data-reach-tab][aria-selected='true'], .tabs [role='tab'][aria-selected='true'] { font-weight: 600; From 1ec44fc1e524b58a724801c8b715acc157f2fce3 Mon Sep 17 00:00:00 2001 From: Joshua Dinh Date: Wed, 4 Dec 2024 05:40:32 +0900 Subject: [PATCH 07/19] refactor: update font colors --- .../CampaignDetailsPage/CampaignDetailsPage.module.scss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss b/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss index 805cf70960..e90edf2efb 100644 --- a/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss +++ b/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss @@ -150,7 +150,7 @@ select[name="campaignId"] { padding: var(--givewp-spacing-2) var(--givewp-spacing-4); border: 0; background-color: transparent; - color: inherit; + color: var(--givewp-neutral-700, inherit); font-size: 0.8rem; line-height: 1.5rem; text-align: center; @@ -181,11 +181,13 @@ select[name="campaignId"] { .tabs [role='tab']:hover, .tabs [data-reach-tab]:hover { font-weight: 500; + color: var(--givewp-neutral-900, inherit); } .tabs [data-reach-tab][aria-selected='true'], .tabs [role='tab'][aria-selected='true'] { font-weight: 600; + color: var(--givewp-neutral-900, inherit); } // set width for each tab to maintain size on hover. From 2bffdff02ef2be9f2c1975cda4d71e1269df7f33 Mon Sep 17 00:00:00 2001 From: Joshua Dinh Date: Wed, 4 Dec 2024 08:25:57 +0900 Subject: [PATCH 08/19] feature: add active color state to campaignDots --- .../CampaignDetailsPage/CampaignDetailsPage.module.scss | 7 +++++-- .../admin/components/CampaignDetailsPage/index.tsx | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss b/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss index e90edf2efb..15e3b188ed 100644 --- a/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss +++ b/src/Campaigns/resources/admin/components/CampaignDetailsPage/CampaignDetailsPage.module.scss @@ -467,15 +467,18 @@ select[name="campaignId"] { border-color: #d1d5db; } - .campaignButtonDots { - background-color: #d1d5db; + background-color: #e5e7eb; border-color: #d1d5db; border-radius: var(--givewp-rounded-4); line-height: 0; padding: var(--givewp-spacing-2); } + .campaignButtonDotsActive { + background-color: #d1d5db; + } + .contextMenu { position: absolute; z-index: 9999; diff --git a/src/Campaigns/resources/admin/components/CampaignDetailsPage/index.tsx b/src/Campaigns/resources/admin/components/CampaignDetailsPage/index.tsx index e5ee45c5c9..38a33b475d 100644 --- a/src/Campaigns/resources/admin/components/CampaignDetailsPage/index.tsx +++ b/src/Campaigns/resources/admin/components/CampaignDetailsPage/index.tsx @@ -236,7 +236,9 @@ export default function CampaignsDetailsPage({campaignId}) {