Skip to content

Cleanup UserButtons#1926

Open
JPKribs wants to merge 2 commits intojellyfin:mainfrom
JPKribs:userButtons
Open

Cleanup UserButtons#1926
JPKribs wants to merge 2 commits intojellyfin:mainfrom
JPKribs:userButtons

Conversation

@JPKribs
Copy link
Member

@JPKribs JPKribs commented Mar 5, 2026

Summary

This is a 2 parter to help with #1921.

  1. The PublicUserRowButton is just a ChevronButton. We can (and Unify SelectUserView #1921 does) use the same ChevronButton for the SelectUserView but this it's cleaner to just update it here.
  2. The UserGridButton is almost identical for the PublicUserGridButton and the SelectUserView.UserGridButton. This aims to create a single, shared button that we can re-use for both views. For now, this is only used in the UserSignInView but my goal in Unify SelectUserView #1921 is to use this there as well for the grid but I want to split this off to make this cleaner.

The end result is functionally no different for now but this should make this easier to maintain and, for the grid buttons, offer better re-usabe for when I finish up the SelectUserView

Screenshots

List:
Screenshot 2026-03-04 at 22 29 24

Grid:

Unfocused:
Screenshot 2026-03-04 at 22 31 21

Focused:
Screenshot 2026-03-04 at 22 31 30

@JPKribs JPKribs added the developer Alters the developer experience label Mar 5, 2026
@JPKribs JPKribs requested a review from LePips March 5, 2026 05:33
@JPKribs
Copy link
Member Author

JPKribs commented Mar 5, 2026

So, for the time being, this is slightly more code than before but when also using these to replace their variants in the SelectUserView this nets out to less code overall. Some of the Init logic isn't used here as this will be used in SelectUserView. You can see the full context of it in https://github.com/jellyfin/Swiftfin/pull/1921/changes but it's still a giant PR so my goal was to split out this part as a standalone. I could link this to the existing SelectUserViews but my aim is to replace those so I didn't want to update those instance there only to change it in the next PR.

This also replaces the SelectUserView add user button as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

developer Alters the developer experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant