Minor improvements to the search result page
What is the problem you are facing?
I would like to propose some improvements to the current search results page.
Currently, when switching between different tabs, already fetched results are re-fetched. Additionally when searching from the sidebar, the artist tab is shown first, regardless of whether there are any artist results. I notice this often because I mostly search for individual tracks, and first have to navigate away from the empty artist tab. The current normal search interaction for me looks like this: Type into the sidebar → press enter → load results → navigate to tracks → load same results → browse through the pages. This is the interaction that I would like to improve.
What I'm proposing (and would be ready to work on if there's consensus on it making sense) is this:
- Cache already fetched results and use them when switching tabs; this would also speed up the current search interface
- Automatically switch to the first non-empty result tab, if there is any
- Improve tab styling to make it easier to distinguish tabs with and without results
With these improvements for me the normal search interaction would improve to this: Type into the sidebar → press enter → load results → browse through the pages.
What are the possible drawbacks or issues with the requested changes?
There is an ongoing redesign proposal: #1724 This addresses some of the problems described above, but is not equivalent.
Context
Please let me know if there is any interest in this. If yes, I can implement these changes and upstream them. And I'd rather not have my own fork of the funkwhale frontend :)