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(ui): Dark theme improvements (cherry-pick #15891) #16096

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion ui/src/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ export class App extends React.Component<
</Helmet>
<PageContext.Provider value={{title: 'Argo CD'}}>
<Provider value={{history, popup: this.popupManager, notifications: this.notificationsManager, navigation: this.navigationManager, baseHref: base}}>
{this.state.popupProps && <Popup {...this.state.popupProps} />}
<DataLoader load={() => services.viewPreferences.getPreferences()}>
{pref => <div className={pref.theme ? 'theme-' + pref.theme : 'theme-light'}>{this.state.popupProps && <Popup {...this.state.popupProps} />}</div>}
</DataLoader>
<AuthSettingsCtx.Provider value={this.state.authSettings}>
<Router history={history}>
<Switch>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import 'node_modules/argo-ui/src/styles/config';
@import 'node_modules/foundation-sites/scss/util/util';
@import 'node_modules/argo-ui/src/styles/theme';
@import '../../../shared/config.scss';

$header: 120px;
Expand Down Expand Up @@ -211,9 +212,14 @@ $header: 120px;
z-index: 1;
padding: 5px;
display: inline-block;
background-color: $argo-color-gray-1;
box-shadow: 1px 1px 3px $argo-color-gray-5;
position: absolute;

@include themify($themes) {
background: themed('background-2');
}


a {
padding: 5px;
margin: 2px;
Expand Down Expand Up @@ -255,7 +261,9 @@ $header: 120px;
}

.separator {
border-right: 1px solid $argo-color-gray-4;
@include themify($themes) {
border-right: 1px solid themed('border');
}
padding-top: 6px;
padding-bottom: 6px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@
border: 1px solid transparent;
cursor: pointer;

.theme-dark & {
box-shadow: 1px 1px 1px $argo-color-gray-7;
}

.icon {
font-size: 2em;
}
Expand Down Expand Up @@ -120,6 +124,10 @@
}
margin-top: 9px;
margin-left: 215px;

.theme-dark & {
box-shadow: 1px 1px 1px $argo-color-gray-7;
}
}

&--podgroup--expansion {
Expand All @@ -131,6 +139,10 @@
box-shadow: 1px 1px 1px $argo-color-gray-4;
background-color: white;
margin-left: 215px;

.theme-dark & {
box-shadow: 1px 1px 1px $argo-color-gray-7;
}
}

&--pod {
Expand Down Expand Up @@ -348,8 +360,12 @@
border-radius: 33px;
left: -20px;
top: -8px;
border: 4px solid white;
text-align: center;

@include themify($themes) {
border: 4px solid themed('background-2');
}

i {
color: $white-color;
line-height: 56px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@
}

&:not(:first-child) {
border-left: 1px solid $argo-color-gray-3;
@include themify($themes) {
border-left: 1px solid themed('border');
}
}

& {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@
}

&__search {
border: 1px solid $argo-color-gray-4;
@include themify($themes) {
background-color: themed('light-argo-gray-2');
border: 1px solid themed('border');
}
border-radius: 7px;
position: relative;
Expand Down
7 changes: 6 additions & 1 deletion ui/src/app/applications/components/utils.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import 'node_modules/argo-ui/src/styles/theme';

.propagation-policy-list {
display: flex;
justify-content: left;
Expand All @@ -9,9 +11,12 @@
padding-right: 2em;

label {
color: #6D7F8B;
font-size: 15px;
cursor: pointer;

@include themify($themes) {
color: themed('light-argo-gray-6');
}
}

input {
Expand Down
Loading