Skip to content

Commit f5b04b5

Browse files
authored
fix(feedback): update EntityPage component (#1798)
- changed button variant to contained - change secondary color to error for Create Modal - Moved jira note above in modal to make it more noticable
1 parent a28af3b commit f5b04b5

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

plugins/feedback/src/components/CreateFeedbackModal/CreateFeedbackModal.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,16 @@ export const CreateFeedbackModal = (props: {
207207
</DialogTitle>
208208
<DialogContent dividers>
209209
<Grid container justifyContent="flex-start" className={classes.root}>
210+
{props.serverType.toLowerCase() !== 'mail' &&
211+
!selectedTag.match(/(Excellent|Good)/g) ? (
212+
<Grid xs={12}>
213+
<Alert severity="warning" variant="outlined">
214+
Note: By submitting&nbsp;
215+
{feedbackType === 'FEEDBACK' ? 'feedback' : 'bug'} with this
216+
tag, it will create an issue in {props.serverType.toLowerCase()}
217+
</Alert>
218+
</Grid>
219+
) : null}
210220
<Grid item xs={4}>
211221
<Typography variant="h6">Select type</Typography>
212222
<RadioGroup className={classes.radioGroup} row>
@@ -219,7 +229,7 @@ export const CreateFeedbackModal = (props: {
219229
<Radio
220230
icon={<BugReportOutlined />}
221231
checkedIcon={<BugReportTwoToneIcon />}
222-
color="secondary"
232+
color="error"
223233
/>
224234
}
225235
/>
@@ -249,7 +259,7 @@ export const CreateFeedbackModal = (props: {
249259
variant={
250260
selectedTag === issueTitle ? 'filled' : 'outlined'
251261
}
252-
color="secondary"
262+
color="error"
253263
onClick={() => handleChipSlection(issueTitle)}
254264
label={issueTitle}
255265
/>
@@ -309,21 +319,13 @@ export const CreateFeedbackModal = (props: {
309319
<Button onClick={props.handleModalCloseFn}>Cancel</Button>
310320
<Button
311321
onClick={handleSubmitClick}
312-
color={feedbackType === 'FEEDBACK' ? 'primary' : 'secondary'}
322+
color="primary"
313323
variant="contained"
314324
disabled={summary.error || summary.value.length === 0}
315325
>
316326
{feedbackType === 'FEEDBACK' ? 'Send Feedback' : 'Report Bug'}
317327
</Button>
318328
</DialogActions>
319-
{props.serverType.toLowerCase() !== 'mail' &&
320-
!selectedTag.match(/(Excellent|Good)/g) ? (
321-
<Alert severity="warning" variant="outlined">
322-
Note: By submitting&nbsp;
323-
{feedbackType === 'FEEDBACK' ? 'feedback' : 'bug'} with this tag, it
324-
will create an issue in {props.serverType.toLowerCase()}
325-
</Alert>
326-
) : null}
327329
</StyledPaper>
328330
);
329331
};

plugins/feedback/src/components/EntityFeedbackPage/EntityFeedbackPage.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,12 @@ export const EntityFeedbackPage = () => {
130130
arrow
131131
TransitionComponent={Zoom}
132132
>
133-
<Button startIcon={<Add />} onClick={handleModalOpen}>
134-
Create
133+
<Button
134+
startIcon={<Add />}
135+
variant="contained"
136+
onClick={handleModalOpen}
137+
>
138+
Submit Feedback
135139
</Button>
136140
</Tooltip>
137141
{pluginConfig.feedbackType === 'JIRA' ? (

0 commit comments

Comments
 (0)