Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: adjust Campaign overview tab styles #7636

Merged
merged 22 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
1adfa7e
fix: adjust tab padding
JoshuaHungDinh Dec 1, 2024
e203cd6
fix: add tab line-height and center text
JoshuaHungDinh Dec 1, 2024
52d8799
refactor: allow tab border on hover to expand
JoshuaHungDinh Dec 1, 2024
1aadff2
feature: add width to tab to maintain size on hover
JoshuaHungDinh Dec 1, 2024
be66240
feature: adjust tabs container for forms page content
JoshuaHungDinh Dec 2, 2024
894b3b0
refactor: adjust hover font weight
JoshuaHungDinh Dec 3, 2024
1ec44fc
refactor: update font colors
JoshuaHungDinh Dec 3, 2024
2bffdff
feature: add active color state to campaignDots
JoshuaHungDinh Dec 3, 2024
375f692
Merge branch 'epic/campaigns' into fix/GIVE-2011-campaign-tabs
JoshuaHungDinh Dec 5, 2024
dc88244
refactor: update edit campaign page button
JoshuaHungDinh Dec 6, 2024
1146ec0
Merge branch 'epic/campaigns' into fix/GIVE-2011-campaign-tabs
JoshuaHungDinh Dec 9, 2024
b5ae7a3
fix: add hover fill color
JoshuaHungDinh Dec 9, 2024
7d8bd6f
refactor: remove fallback colors
JoshuaHungDinh Dec 9, 2024
1ab606c
Merge branch 'epic/campaigns' into fix/GIVE-2011-campaign-tabs
JoshuaHungDinh Dec 11, 2024
ec377a9
fix: adjust overview tab width to 106px
JoshuaHungDinh Dec 11, 2024
276b01b
fix: update hover styles
JoshuaHungDinh Dec 11, 2024
307f669
fix: adjust header title & action button spacing
JoshuaHungDinh Dec 11, 2024
c2a9f38
refactor: update campaign header bread crumbs
JoshuaHungDinh Dec 11, 2024
ae031a4
fix: adjust page title
JoshuaHungDinh Dec 11, 2024
5d2080d
fix: adjust flexContainer margin top
JoshuaHungDinh Dec 11, 2024
5cd2afb
fix: use font variables
JoshuaHungDinh Dec 11, 2024
d4354ee
refactor: apply active and focus states on campaign dots in stylesheet
JoshuaHungDinh Dec 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
}

.pageHeader {
background-color: #fff;
padding-block: 1em;
padding-inline: 1.5em;
background-color: var(--givewp-shades-white);
padding-block: 1rem;
padding-inline: 1.5rem;
}

.flexContainer {
Expand All @@ -66,6 +66,7 @@
align-items: center;
justify-content: space-between;
gap: 1rem;
margin-top: var(--givewp-spacing-2);

& > * {
flex-shrink: 0;
Expand All @@ -77,7 +78,7 @@
display: flex;
flex-direction: row;
align-items: center;
column-gap: 1rem;
column-gap: var(--givewp-spacing-2);
margin-top: auto;
}

Expand All @@ -94,17 +95,20 @@

.breadcrumb {
display: flex;
line-height: 1rem;
font-size: 0.7rem;
color: #424242;
align-items: center;
gap: 0.25rem;
line-height: 1.125rem;
font-size: 0.75rem;

& > span {
font-weight: bold;
color: var(--givewp-neutral-900);
}

& > a {
text-decoration: none;
color: #696969;
color: var(--givewp-neutral-500);
font-weight: 400;
}

& > a:hover {
Expand All @@ -113,20 +117,17 @@
}

.pageTitle {
color: #424242;
color: var(--givewp-neutral-900);
margin: 0;
font-size: 1.5rem;
font-weight: 600;
font-weight: 700;
line-height: 2.25rem;
}

select[name="campaignId"] {
display: none;
}

.fullWidth {

}

.tabs {
display: flex;
gap: 0.25rem;
Expand All @@ -136,19 +137,26 @@ select[name="campaignId"] {
&:not(.fullWidth) {
padding: 0 var(--givewp-spacing-6);
}

&.fullWidth {
padding-left: var(--givewp-spacing-6);
}
}


.tabs [data-reach-tab],
.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;
color: var(--givewp-neutral-700);
font-size: 0.8rem;
line-height: 1.5rem;
text-align: center;
cursor: pointer;
box-sizing: border-box
}

@media screen and (min-width: 48rem) {
Expand All @@ -164,16 +172,40 @@ select[name="campaignId"] {
display: block;
position: absolute;
top: calc(100% - 0.1875em);
width: calc(100% - 2em);
height: 0.1875em;
left: 0;
right: 0;
height: 0.1875rem;
background-color: transparent;
transition: background-color 100ms ease-in-out;
}

.tabs [role='tab']:hover,
.tabs [data-reach-tab]:hover {
font-weight: 500;
color: var(--givewp-neutral-900);
background-color: var(--givewp-neutral-50);
}

.tabs [data-reach-tab][aria-selected='true'],
.tabs [role='tab'][aria-selected='true'] {
font-weight: 600;
color: var(--givewp-neutral-900);
}

// set width for each tab to maintain size on hover.
.tabs [data-reach-tab]:first-child,
.tabs [role='tab']:first-child {
width: 106px;
}

.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,
Expand Down Expand Up @@ -281,7 +313,7 @@ select[name="campaignId"] {
}

.sectionSubtitle {
font-size: 16px;
font-size: 1rem;
font-weight: 500;
line-height: 1.5;
color: #1f2937;
Expand All @@ -306,7 +338,7 @@ select[name="campaignId"] {
input,
select,
textarea {
font-size: 16px;
font-size: 1rem;
line-height: 2;
display: block;
width: 100%;
Expand Down Expand Up @@ -339,7 +371,6 @@ select[name="campaignId"] {
}

span:is(:global(.components-form-toggle.is-checked .components-form-toggle__thumb)) {

left: 12px;
}

Expand All @@ -353,7 +384,7 @@ select[name="campaignId"] {

label {
font-family: Inter, system-ui, sans-serif;
font-size: 16px;
font-size: 1rem;
font-weight: 500;
line-height: 1.5;
color: #1f2937;
Expand All @@ -363,7 +394,7 @@ select[name="campaignId"] {

p {
font-family: Inter, system-ui, sans-serif;
font-size: 14px;
font-size: .875rem;
color: #4b5563;
margin-top: -0.1rem;
margin-left: 1.5rem;
Expand Down Expand Up @@ -409,7 +440,7 @@ select[name="campaignId"] {

.loadingContainerContentText {
padding: var(--givewp-spacing-4);
font-size: 16px;
font-size: 1rem;
}
}

Expand All @@ -433,40 +464,58 @@ select[name="campaignId"] {

.editCampaignPageButton {
color: #060c1a;
background-color: #d1d5db;
border-color: #d1d5db;
}
background-color: var(--givewp-neutral-100);
border-color: var(--givewp-neutral-100);

&:hover {
background-color: var(--givewp-neutral-200);
border-color: var(--givewp-neutral-200);
}
}

.campaignButtonDots {
background-color: #d1d5db;
border-color: #d1d5db;
background-color: var(--givewp-neutral-100);
border-color: var(--givewp-neutral-100);
border-radius: var(--givewp-rounded-4);
line-height: 0;
padding: var(--givewp-spacing-2);

&:hover {
background-color:var(--givewp-neutral-200);
border-color: var(--givewp-neutral-200);
}
}

.campaignButtonDotsActive {
background-color: var(--givewp-neutral-200);
border-color: var(--givewp-neutral-200);
}

.contextMenu {
position: absolute;
display: flex;
flex-direction: column;
gap: var(--givewp-spacing-1);
z-index: 9999;
padding: var(--givewp-spacing-1);
top: 50px;
width: 203px;
border-radius: 4px;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
border: solid 1px #f3f4f6;
background-color: #fff;
border: solid 1px var(--givewp-neutral-50);
background-color: var(--givewp-shades-white);

.contextMenuItem {
text-decoration: none;
gap: 5px;
gap: 4px;
display: flex;
align-items: center;
padding: var(--givewp-spacing-2);
font-size: 14px;
font-size: .875rem;
font-weight: 500;
line-height: 1.43;
color: #1f2937;
color: var(--givewp-neutral-700);


&:hover {
background-color: #f3f4f6;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,9 @@ export default function CampaignsDetailsPage({campaignId}) {
</button>

<button
className={`button button-secondary ${styles.campaignButtonDots}`}
className={`button button-secondary
${styles.campaignButtonDots}
${show.contextMenu && styles.campaignButtonDotsActive}`}
onClick={() => setShow({contextMenu: !show.contextMenu})}
>
<DotsIcons />
Expand Down
Loading