Skip to content

Commit

Permalink
fix: misc css fixes for mobile (argoproj#5705) (argoproj#11508)
Browse files Browse the repository at this point in the history
* Misc css fixes for mobile

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* More fixes for mobile

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* fix ui tests. bring back application status labels

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: schakrad <chakradari.sindhu@gmail.com>
  • Loading branch information
alexef authored and schakrad committed Mar 14, 2023
1 parent f3517a2 commit 8757cfa
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ export const ApplicationDeploymentHistory = ({
<div className='row application-deployment-history__item' key={info.deployedAt} onClick={() => selectDeployment(index)}>
<div className='columns small-3'>
<div>
<i className='fa fa-clock' /> Deployed At:
<i className='fa fa-clock' /> <span class='show-for-large'>Deployed At:</span>
<br />
<Timestamp date={info.deployedAt} />
</div>
<div>
<br />
<i className='fa fa-hourglass-half' /> Time to deploy:
<i className='fa fa-hourglass-half' /> <span class='show-for-large'>Time to deploy:</span>
<br />
{(info.deployStartedAt && <Duration durationMs={moment(info.deployedAt).diff(moment(info.deployStartedAt)) / 1000} />) || 'Unknown'}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,3 +274,74 @@ $header: 120px;
}
}
}


@media screen and (max-width: map-get($breakpoints, large)) {
.sliding-panel__body {
padding: 4px !important;
}
.sliding-panel--is-middle .sliding-panel__wrapper {
width: 90% !important;
}
.sliding-panel--is-middle .sliding-panel__body {
padding: 18px !important;
}
.sliding-panel__close {
z-index: 2 !important;
}
.top-bar__title {
display: none;
}

.top-bar__left-side {
white-space: normal !important;
}
.top-bar__left-side > div {
display: block !important;
}
.top-bar__right-side {
justify-content: right !important;
}
.application-status-panel.row {
flex-flow: unset;
}
.application-status-panel__item label {
margin-right: 0;
}
.application-status-panel__item {
padding: 5px 10px;
}

.white-box, .tabs__content {
padding: 4px !important;
}
.white-box__details-row .columns.small-3 {
overflow-wrap: unset !important;
overflow: scroll;
}
.white-box__details-row .columns.small-9{
padding-left: 4px;
}

.resource-details__header h1 {
font-size: 16px;
}
.resource-details__header {
margin-top: 30px;
padding-right: 4px;
}

.tabs__nav a:first-child, .tabs__nav a {
margin-left: 0 !important;
}

.editable-panel__buttons {
top: unset;
}
}

@media screen and (max-width: map-get($breakpoints, medium)) {
.sb-page-wrapper .top-bar.row {
display: none !important;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const ApplicationStatusPanel = ({application, showOperation, showConditio
<div>
<ComparisonStatusIcon status={application.status.sync.status} label={true} />
</div>
<div className='application-status-panel__item-value__revision'>{syncStatusMessage(application)}</div>
<div className='application-status-panel__item-value__revision show-for-large'>{syncStatusMessage(application)}</div>
</div>
{application.status && application.status.sync && application.status.sync.revision && !application.spec.source.chart && (
<div className='application-status-panel__item-name'>
Expand Down Expand Up @@ -121,7 +121,7 @@ export const ApplicationStatusPanel = ({application, showOperation, showConditio
<OperationState app={application} />{' '}
</a>
{appOperationState.syncResult && appOperationState.syncResult.revision && (
<div className='application-status-panel__item-value__revision'>
<div className='application-status-panel__item-value__revision show-for-large'>
To <Revision repoUrl={application.spec.source.repoURL} revision={appOperationState.syncResult.revision} />
</div>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export const ApplicationSummary = (props: ApplicationSummaryProps) => {
load={src => services.repos.charts(src.repoURL).catch(() => new Array<models.HelmChart>())}>
{(charts: models.HelmChart[]) => (
<div className='row'>
<div className='columns small-10'>
<div className='columns small-8'>
<FormField
formApi={formApi}
field='spec.source.chart'
Expand All @@ -192,7 +192,7 @@ export const ApplicationSummary = (props: ApplicationSummaryProps) => {
return (chartInfo && chartInfo.versions) || new Array<string>();
}}>
{(versions: string[]) => (
<div className='columns small-2'>
<div className='columns small-4'>
<FormField
formApi={formApi}
field='spec.source.targetRevision'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

.applications-list {
padding: 1em;
@media screen and (max-width: 1024px) {
padding: 0;
}
min-height: 88vh;
&__title {
font-weight: bolder;
Expand Down Expand Up @@ -208,3 +211,11 @@
i.menu_icon {
vertical-align: middle;
}

.argo-button {
i {
@media screen and (max-width: map-get($breakpoints, large)) {
margin: 0 auto !important;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ const FlexTopBar = (props: {toolbar: Toolbar | Observable<Toolbar>}) => {
style={{marginRight: 2}}
key={i}>
{item.iconClassName && <i className={item.iconClassName} style={{marginLeft: '-5px', marginRight: '5px'}} />}
{item.title}
<span className='show-for-large'>{item.title}</span>
</button>
))}
</React.Fragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,13 @@ export const ResourceDetails = (props: ResourceDetailsProps) => {
onClick={() => appContext.navigation.goto('.', {deploy: AppUtils.nodeKey(selectedNode)}, {replace: true})}
style={{marginLeft: 'auto', marginRight: '5px'}}
className='argo-button argo-button--base'>
<i className='fa fa-sync-alt' /> SYNC
<i className='fa fa-sync-alt' /> <span className='show-for-large'>SYNC</span>
</button>
<button
onClick={() => AppUtils.deletePopup(appContext, selectedNode, application)}
style={{marginRight: '5px'}}
className='argo-button argo-button--base'>
<i className='fa fa-trash' /> DELETE
<i className='fa fa-trash' /> <span className='show-for-large'>DELETE</span>
</button>
<DropDown
isMenu={true}
Expand Down
6 changes: 5 additions & 1 deletion ui/src/app/shared/components/timestamp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ import Moment from 'react-moment';
export const Timestamp = ({date}: {date: string | number}) => {
return (
<span>
<Moment fromNow={true}>{date}</Moment> (<Moment local={true}>{date}</Moment>)
<Moment fromNow={true}>{date}</Moment>
<span className='show-for-large'>
{' '}
(<Moment local={true}>{date}</Moment>)
</span>
</span>
);
};

0 comments on commit 8757cfa

Please sign in to comment.