Feature: Add Weapon Affinities to Favorites #52
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A new feature has been implemented that allows users to add individual weapon affinities to their favorites.
Currently, the project offers a weapon search feature where users can specify multiple weapon names to display them in a table. Searching by a specific weapon name returns a list of all its affinities. However, this method has some limitations:
From my own experience (I’m currently playing the game), it would be helpful to add individual weapon affinities to a favorites list. To address this, I’ve implemented a feature that allows users to do just that.
A new column, Favorites, has been added to the weapon table. Each row now contains a checkbox that allows users to add individual weapons to their favorites.
At the top of the table, there’s a three-state checkbox (checked, indeterminate, unchecked). When unchecked or indeterminate, clicking the checkbox adds all visible weapons on the page to the favorites list. When checked, clicking the checkbox removes all visible weapons from the favorites list.
A new Favorites only checkbox has been added to the sidebar filters. When checked, only favorited weapons will be displayed. This filter works seamlessly with other filters. For example, if the Weapons field contains values, the favorites filter will apply to those results first. If the Weapons field is empty, the favorites filter will take precedence over the Weapons type filter. Additionally, filters like Include DLC weapons, Effective only, and Affinity will refine the favorites list accordingly.
This makes it easy to toggle between a favorites list and the full weapon list, as well as to mass add or remove weapons based on filter criteria.
Implementation Notes:
Lastly, as a backend developer, I acknowledge that the UI design for this feature isn’t perfect. If this feature is accepted, I’m open to working with the community to refine the user interface to an acceptable standard.