Skip to content

Use Tinted Material Button Style for Toolbar Buttons#1545

Open
JPKribs wants to merge 44 commits intojellyfin:mainfrom
JPKribs:ornamentButton
Open

Use Tinted Material Button Style for Toolbar Buttons#1545
JPKribs wants to merge 44 commits intojellyfin:mainfrom
JPKribs:ornamentButton

Conversation

@JPKribs
Copy link
Member

@JPKribs JPKribs commented May 21, 2025

Summary

Resolves: #1532

Breaking this out of another PR. Trying to do a better job splitting out items that can be standalone PRs. This is a simple button that tries to mirror's Apples newer VisionOS Ornaments style: https://developer.apple.com/design/human-interface-guidelines/ornaments

I think this roughly mirrors what Apple is using with the exception of the disabled version. I think apple just hides these when disabled but I don't have a real world example of this. I've set them to .primary for the foreground and .secondary for the background. This is darker on light mode and lighter on dark mode which I think looks appropriate.

My thinking this would replace our Close Button and Menu Ellipsis. Down the road, it looks like this is where Apple puts their download button which I think looks nice.

Totally open to feedback! If we hate this, I'm also game to close it out. I just thought Apple's frosted buttons they've been using lately looked solid. I was going to use something like this in PR #1541 but I thought it would be better to put this in it's own PR so this got some discussion on it's own merit first.


Screenshots

In order, top to bottom:

  • Standard Button
  • Selected Button
  • Disabled Button

Light Mode

Screenshot 2025-05-21 at 11 20 44

Dark Mode

Screenshot 2025-05-21 at 11 19 30

Videos

Light Mode

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-05-21.at.11.21.07.mp4

Dark Mode

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-05-21.at.11.21.26.mp4

Apple Examples

Music

image

Podcasts

Screenshot 2025-05-20 at 22 41 57

@JPKribs JPKribs added the enhancement New feature or request label May 21, 2025
@thornbill
Copy link
Member

The shadow doesn't seem to match with Apple's design.

@JPKribs
Copy link
Member Author

JPKribs commented May 21, 2025

The shadow doesn't seem to match with Apple's design.

Good call! I've cleaned that up in this PR and updated this in the main post.

…sable, and use `.primary` similar to the filterbuttons opposed to purely material.
@LePips
Copy link
Member

LePips commented May 21, 2025

I do really like this attention to detail and can do a closer audit later, but I would like it implemented as a ButtonStyle instead of a custom button entirely.

@JPKribs
Copy link
Member Author

JPKribs commented May 21, 2025

Good call. I've moved that over. This likely pushes this to after iOS 16 since we would need the ButtonMenuStyle for the ellipsis menu.

This is all in my latest commit and I think it's in a good spot but I have this:

                    if #available(iOS 16.0, *) {
                        Menu(L10n.options, systemImage: "ellipsis") {
                            items()
                        }
                        .menuStyle(.button)
                        .buttonStyle(.ornament)
                    } else {
                        Menu(L10n.options, systemImage: "ellipsis.circle") {
                            items()
                        }
                        .labelStyle(.iconOnly)
                        .backport
                        .fontWeight(.semibold)
                        .foregroundStyle(accentColor)
                    }

@JPKribs JPKribs changed the title Create an OrnamentButton Create an Ornament ButtonStyle May 21, 2025
@JPKribs
Copy link
Member Author

JPKribs commented Jun 12, 2025

I am going to close this out. It looks like the iOS changes at this year's WWDC mean this styling is likely a) now out of date and b) it looks like the glass styling of later iOS is going to be provided to us by Apple so there is no need for custom styling.

@JPKribs JPKribs closed this Jun 12, 2025
@JPKribs JPKribs deleted the ornamentButton branch June 12, 2025 01:27
@LePips
Copy link
Member

LePips commented Jun 12, 2025

Apologies for not commenting on this earlier. I do really like this, but I would like to find a way to unify the design of our buttons alongside the work in #1547, and porting it to existing buttons.

Also, we would still need this stuff even with iOS 26 releasing. Frankly, we will most likely opt out of the liquid glass design until we support iOS 26 as a minimum, but I have no guarantees since I haven't played with it yet.

https://www.donnywals.com/opting-your-app-out-of-the-liquid-glass-redesign-with-xcode-26/

@JPKribs JPKribs restored the ornamentButton branch June 12, 2025 04:19
@JPKribs
Copy link
Member Author

JPKribs commented Jun 12, 2025

Apologies for not commenting on this earlier. I do really like this, but I would like to find a way to unify the design of our buttons alongside the work in #1547, and porting it to existing buttons.

Also, we would still need this stuff even with iOS 26 releasing. Frankly, we will most likely opt out of the liquid glass design until we support iOS 26 as a minimum, but I have no guarantees since I haven't played with it yet.

https://www.donnywals.com/opting-your-app-out-of-the-liquid-glass-redesign-with-xcode-26/

No worries at all! I'll keep the branch alive if we want to pull from it but my thinking was this style was pretty short lived so it doesn't make a ton of sense to migrate to a new custom button if there is an Apple-native version on the horizon.

@JPKribs JPKribs added the iOS Impacts iOS or iPadOS label Jun 29, 2025
@JPKribs
Copy link
Member Author

JPKribs commented Aug 11, 2025

Here is what has changed:

Migrate over to Material forPillHStack.
Migrate Close & Menu buttons in Navigation with TintedMaterial
Migrate filters over to TintedMaterial & update TintedMaterial to have an optional isPressed
Remove isPressed since the only usages are in TintedMaterial
Remove the static rounding on TintedMaterial to instead go in a case by case bases so I can do circles for some and rounded rectangles for others.

Results:

ItemViews

For ItemViews, the menu ellipsis and close buttons are new. Along with the Genre/Studio buttons are now using the material styling as well.

Light:

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-08-11.at.13.26.26.mp4

Dark:

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-08-11.at.13.26.59.mp4

Active Session & Server Activity

Both of these locations had isPressed logic and line.3.horizontal.decrease.circle. I changed these to use line.3.horizontal.decrease and Material instead. Additionally, I removed the isPressed button style and replaced it with an optional isPressed option for Material since these were only used on buttons that are now Material

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-08-11.at.13.28.03.mp4

@JPKribs JPKribs requested a review from LePips August 11, 2025 19:34
@JPKribs JPKribs changed the title Create an Ornament ButtonStyle Use Tinted Material Button Style for Toolbar Buttons Aug 16, 2025
@JPKribs
Copy link
Member Author

JPKribs commented Mar 2, 2026

@LePips I'm going back over outstanding PRs to see what I can't close out and I picked this up again. What is the consensus on this item moving forward? With 26 and Liquid Glass, I understand that this is migrating buttons to a "dated" design language in more locations. I did have an idea today that we could wrap this in a build flag for .material on 26+ use the glass background otherwise use this styling? Or simply adding a .glass backport that uses this instead and using .glass everywhere with the backport?

I know that's a bit of a bigger ask for this PR but I'm interested to hear your thoughts! I know you have actual professional experience with Swift projects so I am curious how they are handling the Liquid Glass migrations.

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

Labels

enhancement New feature or request iOS Impacts iOS or iPadOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adopt VisionOS Circular Design

3 participants