Skip to content

Conversation

LeonBlade
Copy link

@LeonBlade LeonBlade commented Jun 13, 2025

Please tick as appropriate:

  • I have tested this code on a steam deck or on a PC
  • My changes generate no new errors/warnings
  • This is a bugfix/hotfix
  • This is a new feature

Description

This fixes issue: #768
NOTE: This fix doesn't change the backend and the original functionality of fetching with sort still has it's issue.

Currently the way that the frontend sorts the plugin lists by going through the backend and making new network requests each time. This means wasted bandwidth and added latency for every time you want to change sorting order. Over time, more plugins will mean a bigger network response.

This PR introduces client side sorting and also filtering. The plugin list is fetched once when the component loads, and subsequent filtering and sorting is done on the client. This means we're only fetching data once on page load.

I also did expose a few missing properties for StorePlugin as part of this change and shouldn't affect functionality of the rest of the app.

I also did make a few adjustments to how the dropdown for sorting is handled with data opting for a singular key instead of the tuple. For filtering, I did opt for a pattern which allows for a more seamless integration of new filter patterns:

  1. Add new filter to enum.
  2. Create translation key matching the enum string value in the proper path.
  3. Add functionality for the filtering in the filterPlugin function.

I'm interested in your thoughts on this implementation.

Demo

image

@LeonBlade LeonBlade marked this pull request as ready for review June 17, 2025 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant