Skip to content

Commit 90f35f1

Browse files
authored
Merge pull request #599 from quentin-keep-going/fix/issue-309
Article filter dialog improvements
2 parents dbec965 + c1bb4bc commit 90f35f1

File tree

4 files changed

+29
-5
lines changed

4 files changed

+29
-5
lines changed

components/ListPageControls/BaseFilterOption.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ const useStyles = makeStyles(theme => ({
2424

2525
// Hide border color when not chip and not selected
2626
borderColor: ({ chip, selected }: StyleProps) =>
27-
!chip && !selected ? `transparent` : '',
27+
!chip && !selected
28+
? `transparent`
29+
: selected
30+
? theme.palette.primary[400]
31+
: '',
2832
},
2933
/* Chip label */
3034
label: {

components/ListPageControls/Filters.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Fab from '@material-ui/core/Fab';
66
import Dialog from '@material-ui/core/Dialog';
77
import FilterListIcon from '@material-ui/icons/FilterList';
88
import CloseIcon from '@material-ui/icons/Close';
9+
import Button from '@material-ui/core/Button';
910

1011
import cx from 'clsx';
1112

@@ -41,6 +42,14 @@ const useStyles = makeStyles(theme => ({
4142
top: 10,
4243
color: theme.palette.secondary[100],
4344
},
45+
dialogBottom: {
46+
paddingBottom: theme.spacing(3),
47+
display: 'flex',
48+
justifyContent: 'center',
49+
},
50+
btnSubmitFilter: {
51+
borderRadius: 30,
52+
},
4453
}));
4554

4655
/**
@@ -79,6 +88,16 @@ function Filters({ className, children }) {
7988
className={classes.closeIcon}
8089
onClick={() => setFiltersShow(false)}
8190
/>
91+
<div className={classes.dialogBottom}>
92+
<Button
93+
className={classes.btnSubmitFilter}
94+
type="submit"
95+
data-ga="Submit filters button"
96+
color="primary"
97+
variant="contained"
98+
onClick={() => setFiltersShow(false)}
99+
>{t`Submit`}</Button>
100+
</div>
82101
</Dialog>
83102
</>
84103
);

components/ReportPage/__snapshots__/ActionButton.stories.storyshot

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ exports[`Storyshots ReportPage/ActionButton Default 1`] = `
99
}
1010
>
1111
<button
12-
className="MuiButtonBase-root-319 MuiButton-root-292 MuiButton-outlined-297 makeStyles-button"
12+
className="MuiButtonBase-root-321 MuiButton-root-294 MuiButton-outlined-299 makeStyles-button"
1313
disabled={false}
1414
onBlur={[Function]}
1515
onDragLeave={[Function]}
@@ -31,13 +31,13 @@ exports[`Storyshots ReportPage/ActionButton Default 1`] = `
3131
type="button"
3232
>
3333
<span
34-
className="MuiButton-label-293"
34+
className="MuiButton-label-295"
3535
>
3636
Action button text
3737
<Arrow>
3838
<svg
3939
aria-hidden={true}
40-
className="MuiSvgIcon-root-320"
40+
className="MuiSvgIcon-root-322"
4141
focusable="false"
4242
viewBox="0 0 14 27"
4343
>
@@ -51,7 +51,7 @@ exports[`Storyshots ReportPage/ActionButton Default 1`] = `
5151
</Arrow>
5252
</span>
5353
<span
54-
className="MuiTouchRipple-root-329"
54+
className="MuiTouchRipple-root-331"
5555
>
5656
<TransitionGroup
5757
childFactory={[Function]}

i18n/zh_TW.po

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ msgstr "刪除"
128128

129129
#: components/ArticleCategories/DownVoteDialog.js:99
130130
#: components/CreateReplyRequestForm/CreateReplyRequestForm.js:138
131+
#: components/ListPageControls/Filters.js:88
131132
#: components/NewReplySection/ReplyForm/Submit.js:28
132133
#: components/ProfilePage/EditAvatarDialog.js:241
133134
#: components/ProfilePage/EditProfileDialog.js:98

0 commit comments

Comments
 (0)