Skip to content

Commit

Permalink
fix(ui): Dark theme improvements (argoproj#15891)
Browse files Browse the repository at this point in the history
Signed-off-by: Rafal Pelczar <rafal@akuity.io>
Signed-off-by: jmilic1 <70441727+jmilic1@users.noreply.github.com>
  • Loading branch information
rpelczar authored and jmilic1 committed Nov 13, 2023
1 parent 2ba05e4 commit 5dc66d4
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 7 deletions.
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

0 comments on commit 5dc66d4

Please sign in to comment.