Commit 42d6dc8
authored
fix: Advanced filters does not contain tags after first tag was added (@Rowan441) (monkeytypegame#7025)
### Description
fixes monkeytypegame#6972
The setup logic for the "tags", "funbox", and "language" advanced
filters are only run on the first load. So adding a tag in the /settings
won't make the "tags" multiselect render when you navigate back to the
/account page unless you reload.
Added logic to add / destroy the "tags" multiselect if you create your
first tag or delete your last tag.
<!-- Please describe the change(s) made in your PR -->
### Checks
- [ ] Adding quotes?
- [ ] Make sure to include translations for the quotes in the
description (or another comment) so we can verify their content.
- [ ] Adding a language?
- Make sure to follow the [languages
documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/LANGUAGES.md)
- [ ] Add language to `packages/schemas/src/languages.ts`
- [ ] Add language to exactly one group in
`frontend/src/ts/constants/languages.ts`
- [ ] Add language json file to `frontend/static/languages`
- [ ] Adding a theme?
- Make sure to follow the [themes
documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/THEMES.md)
- [ ] Add theme to `packages/schemas/src/themes.ts`
- [ ] Add theme to `frontend/src/ts/constants/themes.ts`
- [ ] Add theme css file to `frontend/static/themes`
- [ ] Add some screenshot of the theme, especially with different test
settings (colorful, flip colors) to your pull request
- [ ] Adding a layout?
- [ ] Make sure to follow the [layouts
documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/LAYOUTS.md)
- [ ] Add layout to `packages/schemas/src/layouts.ts`
- [ ] Add layout json file to `frontend/static/layouts`
- [ ] Adding a font?
- Make sure to follow the [themes
documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/FONTS.md)
- [ ] Add font file to `frontend/static/webfonts`
- [ ] Add font to `packages/schemas/src/fonts.ts`
- [ ] Add font to `frontend/src/ts/constants/fonts.ts`
- [x] Check if any open issues are related to this PR; if so, be sure to
tag them below.
- [x] Make sure the PR title follows the Conventional Commits standard.
(https://www.conventionalcommits.org for more info)
- [x] Make sure to include your GitHub username prefixed with @ inside
parentheses at the end of the PR title.
<!-- label(optional scope): pull request title (@your_github_username)
-->
<!-- I know I know they seem boring but please do them, they help us and
you will find out it also helps you.-->
Closes monkeytypegame#6972
<!-- the issue(s) your PR resolves if any (delete if that is not the
case) -->
<!-- please also reference any issues and or PRs related to your pull
request -->
<!-- Also remove it if you are not following any issues. -->
<!-- pro tip: you can mention an issue, PR, or discussion on GitHub by
referencing its hash number e.g:
[monkeytypegame#1234](monkeytypegame#1234) -->
<!-- pro tip: you can press . (dot or period) in the code tab of any
GitHub repo to get access to GitHub's VS Code web editor Enjoy! :) -->1 parent 05123e8 commit 42d6dc8
File tree
2 files changed
+45
-44
lines changed- frontend/src/ts
- elements/account
- pages
2 files changed
+45
-44
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
794 | 794 | | |
795 | 795 | | |
796 | 796 | | |
797 | | - | |
| 797 | + | |
798 | 798 | | |
799 | 799 | | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
800 | 805 | | |
801 | 806 | | |
802 | 807 | | |
| |||
864 | 869 | | |
865 | 870 | | |
866 | 871 | | |
867 | | - | |
868 | | - | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
869 | 875 | | |
| 876 | + | |
870 | 877 | | |
871 | 878 | | |
872 | 879 | | |
873 | 880 | | |
874 | 881 | | |
875 | 882 | | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
876 | 888 | | |
877 | 889 | | |
| 890 | + | |
878 | 891 | | |
879 | | - | |
880 | | - | |
881 | | - | |
882 | | - | |
883 | | - | |
884 | | - | |
885 | | - | |
886 | | - | |
887 | | - | |
888 | | - | |
889 | | - | |
890 | | - | |
891 | | - | |
892 | | - | |
893 | | - | |
894 | | - | |
895 | | - | |
896 | | - | |
897 | | - | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
898 | 907 | | |
899 | | - | |
900 | | - | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
901 | 919 | | |
902 | | - | |
903 | | - | |
| 920 | + | |
| 921 | + | |
904 | 922 | | |
905 | 923 | | |
906 | | - | |
907 | | - | |
908 | | - | |
909 | | - | |
910 | | - | |
911 | | - | |
912 | | - | |
913 | | - | |
914 | | - | |
915 | | - | |
916 | | - | |
917 | | - | |
918 | | - | |
919 | | - | |
920 | | - | |
921 | 924 | | |
922 | 925 | | |
923 | 926 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1349 | 1349 | | |
1350 | 1350 | | |
1351 | 1351 | | |
1352 | | - | |
1353 | 1352 | | |
1354 | 1353 | | |
1355 | 1354 | | |
1356 | 1355 | | |
1357 | 1356 | | |
1358 | | - | |
1359 | | - | |
| 1357 | + | |
1360 | 1358 | | |
1361 | 1359 | | |
1362 | 1360 | | |
| |||
0 commit comments