-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dashboard: support filtering stories by taxonomy #11625
Conversation
…orCreators/web-stories-wp into feature/11436-Filter-By-Taxonomy
@sblinde In short, let's proceed. But let me just take a step back, ignore preloading, PHP, etc. to describe the issue at hand. When the dashboard loads, the authors dropdown is already visible, just with a "No authors found" message until all authors have been loaded: On the other hand, the taxonomy dropdowns are only displayed after all the terms have been loaded ( Note: just to clarify, the Screen.Recording.2022-06-10.at.13.42.52.movThe question is: Is it possible to display the dropdowns before all the terms have been loaded, just with a "No xyz found" message? From what I can see, yes, it is possible. The issue is in the web-stories-wp/packages/dashboard/src/app/views/myStories/filters/taxonomy/useTaxonomyFilters.js Lines 74 to 104 in 305dc9d
A quick hack locally fixed this (though the terms loading seemed to be broken afterwards): const queryTaxonomies = useCallback(async () => {
const data = await getTaxonomies({ hierarchical: true });
+ setTaxonomies(data);
const promises = []; Proof: Screen.Recording.2022-06-10.at.14.09.32.movIt seems to me that |
While testing this PR, I found a related issue -#11668. |
@swissspidy Thank you for all of the details you shared and feedback there. I see what you mean, and I totally agree with your assessment: those dropdowns should ideally be available prior to the terms loading, and as you showed, if we're setting taxonomies only after they're fetched, there's the reason. Since we have that epic slated for improvements to filtering, we'll make sure we address that. Thanks for the video examples too. We'll work on getting this across the finish line today, and filtering 2.0 should be able to encompass more work to make this experience a better one. @spacedmonkey Nice find! I added it to the epic for improvements to filtering as well. Again, thank you both for the feedback through all of this work. We appreciate it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏👏👏👏
Well done. Gave the code a quick check again, and did a quick QA on the qa instance. Everything at first glance is working well so far (w/ just categories and categories + custom taxonomies).
packages/dashboard/src/app/views/myStories/filters/taxonomy/useTaxonomyFilters.js
Show resolved
Hide resolved
packages/dashboard/src/app/views/myStories/filters/taxonomy/useTaxonomyFilters.js
Outdated
Show resolved
Hide resolved
packages/dashboard/src/app/views/myStories/filters/taxonomy/useTaxonomyFilters.js
Outdated
Show resolved
Hide resolved
Created a little PR to ensure that only taxnomies that show_ui flag is set to true - #11678 |
I believe we need some design input on this one @sblinde. |
…orCreators/web-stories-wp into feature/11436-Filter-By-Taxonomy
Context
Add programmatic taxonomy filters to the dashboard.
Summary
Give the user the ability to filter by story taxonomies. Similar to the author filter.
Relevant Technical Choices
There can be multiple taxonomy filters, and a programmatic solution is needed to build out these filters. The solution used here lends itself to encompass all dashboard filters state into one place making the filtering process simpler later on.
To-do
Move all dashboard story filters into the new provider to simplify dashboard story filtering
User-facing changes
before/after
https://user-images.githubusercontent.com/14057928/171685426-33d5664b-0485-4567-8773-d45d6aae5bf8.mp4
Testing Instructions
This PR can be tested by following these steps:
On Staging:
On Branch:
Reviews
Does this PR have a security-related impact?
No
Does this PR change what data or activity we track or use?
No
Does this PR have a legal-related impact?
No
Checklist
Type: XYZ
label to the PRFixes #11436