Skip to content

Commit fb708f1

Browse files
fix(orchestrator-form-react): fix ui styling issues in workflow results page (#2808)
1 parent b10f7d6 commit fb708f1

6 files changed

Lines changed: 22 additions & 6 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-orchestrator': patch
3+
---
4+
5+
Fix UI styling issues in worfkflow results page

workspaces/orchestrator/plugins/orchestrator/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
"@backstage/plugin-permission-react": "^0.4.41",
7979
"@backstage/types": "^1.2.2",
8080
"@material-ui/core": "^4.12.4",
81+
"@material-ui/lab": "^4.0.0-alpha.61",
8182
"@red-hat-developer-hub/backstage-plugin-orchestrator-common": "workspace:^",
8283
"@red-hat-developer-hub/backstage-plugin-orchestrator-form-api": "workspace:^",
8384
"@red-hat-developer-hub/backstage-plugin-orchestrator-form-react": "workspace:^",

workspaces/orchestrator/plugins/orchestrator/src/components/WorkflowInstancePage/WorkflowDescriptionModal.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,14 @@ export const RefForwardingWorkflowDescriptionModal: ForwardRefRenderFunction<
118118
fullWidth
119119
>
120120
<DialogTitle>
121-
<Box>
121+
<Box
122+
sx={{
123+
display: 'flex',
124+
alignItems: 'baseline',
125+
justifyContent: 'space-between',
126+
gap: 1,
127+
}}
128+
>
122129
<Typography variant="h5">{workflow.name}</Typography>
123130
<IconButton
124131
className={classes.closeBtn}

workspaces/orchestrator/plugins/orchestrator/src/components/WorkflowInstancePage/WorkflowResult.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ import {
2525
import { RouteFunc, useApi, useRouteRef } from '@backstage/core-plugin-api';
2626
import { AboutField } from '@backstage/plugin-catalog';
2727

28-
import Alert from '@mui/material/Alert';
29-
import AlertTitle from '@mui/material/AlertTitle';
28+
import { Alert, AlertTitle } from '@material-ui/lab';
3029
import Box from '@mui/material/Box';
3130
import Button from '@mui/material/Button';
3231
import CircularProgress from '@mui/material/CircularProgress';
@@ -433,7 +432,7 @@ export const WorkflowResult: React.FC<{
433432
className={className}
434433
cardClassName={cardClassName}
435434
>
436-
<Divider sx={{ mb: 2 }} />
435+
<Divider sx={{ '&&': { mb: 2 } }} />
437436
{logsEnabled && (
438437
<>
439438
<Box sx={{ ml: 2 }}>
@@ -452,7 +451,7 @@ export const WorkflowResult: React.FC<{
452451
{t('run.logs.viewLogs')}
453452
</Button>
454453
</Box>
455-
<Divider sx={{ mt: 2, mb: 2 }} />
454+
<Divider sx={{ '&&': { my: 2 } }} />
456455
</>
457456
)}
458457
<Grid container alignContent="flex-start" spacing="1rem">

workspaces/orchestrator/plugins/orchestrator/src/components/ui/TextCodeBlock.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,12 @@ const useStyles = makeStyles<{ isDarkMode: boolean; maxHeight?: number }>()(
2929
position: 'relative',
3030
paddingTop: theme.spacing(2),
3131
paddingBottom: theme.spacing(2),
32-
backgroundColor: isDarkMode ? '#151515' : '#F0F0F0',
3332
maxWidth: 600,
3433
marginTop: '0.6rem',
34+
'&&': {
35+
outline: 'unset',
36+
backgroundColor: isDarkMode ? '#151515' : '#F0F0F0',
37+
},
3538
},
3639
iconButton: {
3740
position: 'absolute',

workspaces/orchestrator/yarn.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12893,6 +12893,7 @@ __metadata:
1289312893
"@backstage/ui": "npm:^0.13.2"
1289412894
"@janus-idp/cli": "npm:3.7.0"
1289512895
"@material-ui/core": "npm:^4.12.4"
12896+
"@material-ui/lab": "npm:^4.0.0-alpha.61"
1289612897
"@mui/icons-material": "npm:^5.17.1"
1289712898
"@mui/material": "npm:^5.17.1"
1289812899
"@red-hat-developer-hub/backstage-plugin-orchestrator-common": "workspace:^"

0 commit comments

Comments
 (0)