From 24713f27070491a165aaf69da4afbcfead4ced68 Mon Sep 17 00:00:00 2001 From: Keith Chong Date: Thu, 31 Oct 2024 18:05:19 -0400 Subject: [PATCH] Pull out styles changes; Make arrows more pronounced Signed-off-by: Keith Chong --- ...application-deployment-history-details.tsx | 42 ++++++------------- .../application-deployment-history.scss | 24 +++++++++++ .../application-parameters.tsx | 4 +- .../editable-panel/editable-panel.scss | 6 +++ 4 files changed, 44 insertions(+), 32 deletions(-) diff --git a/ui/src/app/applications/components/application-deployment-history/application-deployment-history-details.tsx b/ui/src/app/applications/components/application-deployment-history/application-deployment-history-details.tsx index dbd78306f1f54..7602a8fb2aa0a 100644 --- a/ui/src/app/applications/components/application-deployment-history/application-deployment-history-details.tsx +++ b/ui/src/app/applications/components/application-deployment-history/application-deployment-history-details.tsx @@ -26,7 +26,6 @@ export const ApplicationDeploymentHistoryDetails = ({app, info, index}: props) = const [showParameterDetails, setShowParameterDetails] = React.useState(Boolean); const [showSourceDetails, setShowSourceDetails] = React.useState([]); - const singleSourceTopMargin: string = '20px'; const updateMap = (i: number) => { if (i === null || i === undefined) { return; @@ -38,19 +37,18 @@ export const ApplicationDeploymentHistoryDetails = ({app, info, index}: props) = } }; - const getCollapsedSection = (i: number, repoURL: string, topMargin: string): React.ReactFragment => { + const getCollapsedSection = (i: number, repoURL: string): React.ReactFragment => { return (
{ setShowParameterDetails(!showParameterDetails); updateMap(i); }}>
- +
@@ -66,7 +64,7 @@ export const ApplicationDeploymentHistoryDetails = ({app, info, index}: props) =
{ setShowParameterDetails(!showParameterDetails); updateMap(index); @@ -109,15 +107,8 @@ export const ApplicationDeploymentHistoryDetails = ({app, info, index}: props) =
- {getExpandedSection(null)} + className={classNames('white-box','expanded-section')}> + {getExpandedSection()} { return getErrorSection(err); @@ -138,7 +129,7 @@ export const ApplicationDeploymentHistoryDetails = ({app, info, index}: props) =
) : ( - getCollapsedSection(null, recentDeployments[index].source.repoURL, singleSourceTopMargin) + getCollapsedSection(null, recentDeployments[index].source.repoURL) )} ) : ( @@ -170,14 +161,7 @@ export const ApplicationDeploymentHistoryDetails = ({app, info, index}: props) =
+ className={classNames('white-box','expanded-section')}>
{getExpandedSection(i)} services.repos.appDetails(src, src.appName, app.spec.project, i, recentDeployments[index].id)}> {(details: models.RepoAppDetails) => ( -
-
+
+
Source {i + 1} Parameters
Repo URL: {source.repoURL}
{source.path ? 'Path: ' + source.path : ''}
@@ -219,7 +201,7 @@ export const ApplicationDeploymentHistoryDetails = ({app, info, index}: props) =
) : ( - getCollapsedSection(i, source.repoURL, '20px') + getCollapsedSection(i, source.repoURL) )} )) diff --git a/ui/src/app/applications/components/application-deployment-history/application-deployment-history.scss b/ui/src/app/applications/components/application-deployment-history/application-deployment-history.scss index ac8121ac5a444..65f19a0c23497 100644 --- a/ui/src/app/applications/components/application-deployment-history/application-deployment-history.scss +++ b/ui/src/app/applications/components/application-deployment-history/application-deployment-history.scss @@ -46,6 +46,30 @@ margin-left: -1em; } + .collapsed-section { + margin-top: 20px; + padding: 20px; + border: 1px solid; + box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.1); + border-radius: '4px'; + @include themify($themes) { + border-color: themed('border'); + box-shadow: themed('shadow'); + } + } + + .expanded-section { + margin-top: 20px; + padding: 20px; + border: 2px solid; + box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.1); + border-radius: '4px'; + @include themify($themes) { + border-color: themed('border'); + box-shadow: themed('shadow'); + } + } + .separator { height: 2px; margin: 1em 0; diff --git a/ui/src/app/applications/components/application-parameters/application-parameters.tsx b/ui/src/app/applications/components/application-parameters/application-parameters.tsx index 041880f007928..3771d32d3cf1a 100644 --- a/ui/src/app/applications/components/application-parameters/application-parameters.tsx +++ b/ui/src/app/applications/components/application-parameters/application-parameters.tsx @@ -304,7 +304,7 @@ export const ApplicationParameters = (props: { props.handleCollapse(index, !currentState); }}>
- +
Source {index + 1 + ': ' + appSource.repoURL}
@@ -320,7 +320,7 @@ export const ApplicationParameters = (props: {
{ props.handleCollapse(index, !props.collapsedSources[index]); }} diff --git a/ui/src/app/shared/components/editable-panel/editable-panel.scss b/ui/src/app/shared/components/editable-panel/editable-panel.scss index 7a4fee7d997a3..7ad9ae28014f9 100644 --- a/ui/src/app/shared/components/editable-panel/editable-panel.scss +++ b/ui/src/app/shared/components/editable-panel/editable-panel.scss @@ -1,4 +1,5 @@ @import 'node_modules/argo-ui/src/styles/config'; +@import 'node_modules/argo-ui/src/styles/theme'; .editable-panel { position: relative; @@ -32,6 +33,11 @@ position: absolute; top: 30px; right: 30px; + &__override { + @include themify($themes) { + color: themed('light-argo-teal-7'); + } + } } &__sticky-title {