Skip to content
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

Pinned Filters #3675

Merged
merged 7 commits into from
Apr 25, 2023
Merged

Pinned Filters #3675

merged 7 commits into from
Apr 25, 2023

Conversation

yoshnopa
Copy link
Contributor

As Proposed in #3549, this Pull Provides the possibility to pin filters to the top of the Filter list.
That way, more commonly used filters are available more quickly without compromising on the wide range of possible filter options.
In the backend, this works very similar to the savedfilter, just without the actual filter and the messageid of the filter as the "name".
In the frontend, the only directly visible change is a pin on the right side of the filters:
image
Clicking on the pin will put the according option to the top, separated by a divider:
image
Of course, the pinned options are saved per media type, so you can have different pinned filters in the scene section than in the tag section.

Closes #3549

@DogmaDragon DogmaDragon added improvement Something needed tweaking. ui Issues related to UI backend Pull requests that update Go code labels Apr 20, 2023
@kermieisinthehouse
Copy link
Collaborator

Thank you for contributing to Stash! This is a great change.

Functionality tested; working.
Code reviewed.

My only note is to not lay it out with a right: 15%, but instead to make the whole row a flexbox, and make the caption flex-grow to take up the entire middle. That way, we don't have weird layout and the button position is determined by the padding of the parent row.

@yoshnopa
Copy link
Contributor Author

yoshnopa commented Apr 25, 2023

Thanks @DingDongSoLong4 for the Code Revision and additions!
Just for documentation, the following was changed:

  • Divider is now just empty space, as we don't use such a thing elsewhere
  • On hover, the pin rotates, giving a visual cue for the user
  • The x and pin swapped places, it looks fancier. I'm open for debate on that one
  • Flex is used for positioning. Generally the Code has been polished from my "let's try some react!"-state

Also thank you @kermieisinthehouse for looking into it!

Copy link
Collaborator

@kermieisinthehouse kermieisinthehouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code reviewed and tested.

@kermieisinthehouse kermieisinthehouse added this to the Version 0.21.0 milestone Apr 25, 2023
@kermieisinthehouse kermieisinthehouse merged commit 8d3f632 into stashapp:develop Apr 25, 2023
@yoshnopa yoshnopa deleted the favFilter branch August 25, 2023 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Pull requests that update Go code improvement Something needed tweaking. ui Issues related to UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Custom Filter Order
4 participants