-
-
Notifications
You must be signed in to change notification settings - Fork 105
Description
Describe the bug
When you click on a taxonomy count and get redirected to the overview there is no tag filter - all items are displayed
To Reproduce
Steps to reproduce the behavior:
- Go to the Taxonomies tab
- Click on a number
Expected behavior
I was expecting the articles to be filtered by the taxonomy I just clicked on the previous screen.
Additional context
I had a look at the code and I noticed when clicking on that number, this should happen:
vscode-front-matter/src/dashboardWebView/components/TaxonomyView/TaxonomyLookup.tsx
Lines 53 to 55 in f4816af
| if (total) { | |
| navigate(`${routePaths.contents}?taxonomy=${taxonomy}&value=${value}`); | |
| } |
The atom is set and so is the filter.
vscode-front-matter/src/dashboardWebView/components/Header/Header.tsx
Lines 132 to 133 in f4816af
| if (taxonomy === 'tags') { | |
| setCrntTag(value); |
However, before the user can see the result, this happens:
vscode-front-matter/src/dashboardWebView/components/App.tsx
Lines 58 to 65 in f4816af
| useEffect(() => { | |
| if (view && routePaths[view]) { | |
| navigate(routePaths[view]); | |
| return; | |
| } | |
| navigate(routePaths[view]); | |
| }, [view]); |
On line 60 the path is set to /contents and the filter is gone. As a result, all items are displayed.
By commenting line 60 the navigation+filter works fine, but I don't know why that logic is there and if it can be removed
Metadata
Metadata
Assignees
Labels
Projects
Status
