Skip to content

Commit

Permalink
fix(feedback): update EntityPage component (janus-idp#1798)
Browse files Browse the repository at this point in the history
- changed button variant to contained
- change secondary color to error for Create Modal
- Moved jira note above in modal to make it more noticable
  • Loading branch information
yashoswalyo authored Jun 7, 2024
1 parent a28af3b commit f5b04b5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,16 @@ export const CreateFeedbackModal = (props: {
</DialogTitle>
<DialogContent dividers>
<Grid container justifyContent="flex-start" className={classes.root}>
{props.serverType.toLowerCase() !== 'mail' &&
!selectedTag.match(/(Excellent|Good)/g) ? (
<Grid xs={12}>
<Alert severity="warning" variant="outlined">
Note: By submitting&nbsp;
{feedbackType === 'FEEDBACK' ? 'feedback' : 'bug'} with this
tag, it will create an issue in {props.serverType.toLowerCase()}
</Alert>
</Grid>
) : null}
<Grid item xs={4}>
<Typography variant="h6">Select type</Typography>
<RadioGroup className={classes.radioGroup} row>
Expand All @@ -219,7 +229,7 @@ export const CreateFeedbackModal = (props: {
<Radio
icon={<BugReportOutlined />}
checkedIcon={<BugReportTwoToneIcon />}
color="secondary"
color="error"
/>
}
/>
Expand Down Expand Up @@ -249,7 +259,7 @@ export const CreateFeedbackModal = (props: {
variant={
selectedTag === issueTitle ? 'filled' : 'outlined'
}
color="secondary"
color="error"
onClick={() => handleChipSlection(issueTitle)}
label={issueTitle}
/>
Expand Down Expand Up @@ -309,21 +319,13 @@ export const CreateFeedbackModal = (props: {
<Button onClick={props.handleModalCloseFn}>Cancel</Button>
<Button
onClick={handleSubmitClick}
color={feedbackType === 'FEEDBACK' ? 'primary' : 'secondary'}
color="primary"
variant="contained"
disabled={summary.error || summary.value.length === 0}
>
{feedbackType === 'FEEDBACK' ? 'Send Feedback' : 'Report Bug'}
</Button>
</DialogActions>
{props.serverType.toLowerCase() !== 'mail' &&
!selectedTag.match(/(Excellent|Good)/g) ? (
<Alert severity="warning" variant="outlined">
Note: By submitting&nbsp;
{feedbackType === 'FEEDBACK' ? 'feedback' : 'bug'} with this tag, it
will create an issue in {props.serverType.toLowerCase()}
</Alert>
) : null}
</StyledPaper>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,12 @@ export const EntityFeedbackPage = () => {
arrow
TransitionComponent={Zoom}
>
<Button startIcon={<Add />} onClick={handleModalOpen}>
Create
<Button
startIcon={<Add />}
variant="contained"
onClick={handleModalOpen}
>
Submit Feedback
</Button>
</Tooltip>
{pluginConfig.feedbackType === 'JIRA' ? (
Expand Down

0 comments on commit f5b04b5

Please sign in to comment.