Skip to content

Further Refinements For #2737 (Modernize update alert)#2759

Closed
noah-nuebling wants to merge 26 commits intosparkle-project:2.xfrom
noah-nuebling:2.x
Closed

Further Refinements For #2737 (Modernize update alert)#2759
noah-nuebling wants to merge 26 commits intosparkle-project:2.xfrom
noah-nuebling:2.x

Conversation

@noah-nuebling
Copy link
Copy Markdown

@noah-nuebling noah-nuebling commented Aug 21, 2025

Slight refinements on top of pull request #2737 ("Modernize update alert") based on the mockups I posted there shortly after the pull request was merged.

Screenshots

Overview

I did my best to create great visual harmony and balance everywhere, no matter which elements of the SUUpdateAlert are shown or hidden:

Tahoe

Click here to reveal! Screenshot 2025-08-21 at 9 48 15 PM Screenshot 2025-08-21 at 9 48 25 PM Screenshot 2025-08-21 at 9 48 54 PM Screenshot 2025-08-21 at 9 49 10 PM

Sequoia

Click here to reveal! Screenshot 2025-08-21 at 21 45 29 Screenshot 2025-08-21 at 21 45 39 Screenshot 2025-08-21 at 21 46 46 Screenshot 2025-08-21 at 21 46 56

Darkmode

Darkmode has the same colors as before – still looks good.

Click here to reveal!

Tahoe:
Screenshot 2025-08-21 at 9 50 27 PM

Sequoia:
Screenshot 2025-08-21 at 21 47 25

Variations

The code contains a couple of if ((0)) and if ((1)) guards for alternate stylings, because I wasn't 100% sure about some details. I can delete those of course before this is merged. You can find all these by grepping for if ((0)) and if ((1)).

Variation: Transparent titlebar

This is closer to what's currently in #2737. I personally prefer the designs with a visible titlebar, but the code supports pixel-perfect layouts for both styles and you can easily flip back and forth.

Click here to reveal

Tahoe:
Screenshot 2025-08-21 at 9 54 18 PM

Sequoia:
Screenshot 2025-08-21 at 21 53 00

Variation: Liquid Glass

Here's another fun one – liquid glass!

I'm not sure it's supposed to be used this way, but it looks kinda cool, and it does create some color contrast between the update notes and the window background, which is otherwise missing on Tahoe. (Cause everything is white)

I haven't spent much time trying to refine this, so if there's any interest I can put more work into that.

Click here to reveal Liquid Glass

Code Questions

There are a few questionable things about the code currently, which may need to be changed before merging:

  • Lots of comments
    • I tend to write lots of comments. I left them in cause I thought they might help with the review, but they should probably be removed or cleaned up before merging. Just let me know and I'll do that.
  • 'Spacer' views
    • For greater flexibility with the spacing I removed the 'native' NSStackView spacing and instead inserted 'spacer' elemements which are then hidden or resized by the code. I think this makes it quite transparent what is happening, but it is a little ugly in Interface Builder. If it is prefererable, these spacer views could probably also be replaced with NSLayoutConstraints or `-[NSStackView setCustomSpacing:afterView:].
  • I used the commits as my personal notepad
    • They probably need to be squashed or something. I'm not sure how that works.
  • If I did anything else stupid, I'm sorry! Please be patient. I don't have a lot of experience contributing code to source project. But I can do any changes to the code or explain anything if you ask :). Thank you.

Other considerations and TODOs

  • If you think these changes are good, perhaps there should also be slight tweaks to SUStatus.xib, SUUpdatePermissionPrompt.xib or other UIs (if they exist?) to bring them in line.

(I'm not sure how to test the SUUpdatePermissionPrompt.xib. I only know it exists because it showed up for me once randomly in the Sparkle Test App.)

Misc Checklist

  • My change requires a documentation update on Sparkle's website repository
  • My change requires changes to generate_appcast, generate_keys, or sign_update

Testing

I tested and verified my change by using one or multiple of these methods:

  • Sparkle Test App
  • Unit Tests
  • My own app
  • Other (please specify)

(Describe all the cases that were tested)

macOS version tested: macOS 15.5 (Sequoia) and macOS 26.0 Beta 7 (Tahoe)

…er control over alignment and margins. The app icon is now exactly 50-by-50 and has margins of 20 on its top, left, and bottom. The 'Release Notes Box' should have vertical margins of 20, but the margins are larger in-app than the IB layout constraints specify and I don't understand why. Committing now as a checkpoint before investigating this further.
TODOs:
	- We're a bit inconsistent – in most places we use spacer views for vertical spacing, but for the checkbox we use an autolayout constraint on the wrapper view since that was easier to do
	- When the update notes are hidden the spacer below isn't removed, which leads to stacked spacers. I think I like this? But should probably make it controllable in code so it can be changed easily
	- Maybe check how the layout was before before when no checkbox was displayed. Now it looks a bit empty maybe? Haven't put too much thought into how that should be.
	- Proportions:
		- The app icon should maybe be bigger
		- The checkbox should maybe be bigger
	- Titlebar
		- Zorg didn't approve of adding the titlebar change I think. We should make it easily togglable in code. Maybe also see how it looks on Sequoia.
	- Code needs to be cleaned up
…s instead of layout constraints to be consistent (See TODOs in last commit)
…ut at some point I just kinda started noodling around and added background translucency and a spacer for behind the traffic lights to sort of recreate mockup 5. of my original mockups. Concrete changes from here that I can remember that we should undo is the background translucency and the change of the color to the title text. (I changed it from controlColor to labelColor IIRC, but they're the same anyways on Tahoe IIRC.)

I think I'll just delete all the changes I made to the xib file here and start from scratch.

I also implemented various different spacings and sizings for the bottom section. That I can toggle between in code.

Maybe more stuff I forgot.
…test version of SUUpdateAlert.m

TODOs:
- Consider making the app icon bigger
- Make the titlebar togglable
- Maybeee try adding an NSGlassEffectView but in code, in a way that can be toggled on/off (We had already added a NSVisualEffectView in IB the reverted commit 61a0978, but that requires restructuring the entire xib file. Also NSAlert on Tahoe uses NSGlassEffectView not NSVisualEffectView.)
- Cleanup code
	(Not sure they use macros like that)
…nged positioning of the text, though I'm not sure about that. Committing so I can test/keep developing on Sequoia.
…ets and moved the tahoe-button-inset code to use constraint-outlets instead of constraint-identfiers. (I didn't know you could do that)

I think I'm happy with the layout in all situations on Sequoia now.
…quoia. (Will check under Tahoe next – perhaps they already were perfect there)
…nk. Also increases the contrast between the window background and the update notes box.
…ns back from 8 to 12 but only on macOS Sequoia. (Using new variable _constraint_choices_mainButtonSpacing)
@noah-nuebling noah-nuebling mentioned this pull request Aug 21, 2025
6 tasks
@noah-nuebling noah-nuebling changed the title Further Refinements For #2737 ("Modernize update alert") Further Refinements For #2737 (Modernize update alert) Aug 21, 2025
@noah-nuebling
Copy link
Copy Markdown
Author

I can also go through the xib file and undo all the changes that Xcode does automatically whenever you open the file. That might minimize conflicts or make things easier to review.

…'remind me later' buttons is handled to match the way that the spacing between the 'remind me later' and 'install update' buttons is handled. On Tahoe, the former spacing is now >= 8 instead of >= 12. (But this is is only visible in edge-cases.)
@noah-nuebling
Copy link
Copy Markdown
Author

noah-nuebling commented Aug 23, 2025

I forgot to test the layout when the 'question' text has 2 lines, but it works quite well:

Tahoe:
Bildschirmfoto 2025-08-23 um 9 55 56 AM

Sequoia:
Bildschirmfoto 2025-08-23 um 10 01 44


I also tested on Mojave / Catalina and found some issues with the initial pull request. But I've fixed those, and now it looks like this!

Screenshot 2025-08-23 at 11 44 07

@zorgiepoo
Copy link
Copy Markdown
Member

zorgiepoo commented Aug 26, 2025

Thanks for opening this.

I think overall the UI changes here are very subtle but the code changes are very non-trivial / custom. Although personally I think I prefer the UI in 2.x (I think I like the transparent titlebar). At this point I think I'd expect a single small change (both UI and code delta change) with good justification.

@zorgiepoo
Copy link
Copy Markdown
Member

(I'm not sure how to test the SUUpdatePermissionPrompt.xib. I only know it exists because it showed up for me once randomly in the Sparkle Test App.)

Delete the test app user defaults. On second launch it will show permission prompt. This works when apps do not override SUEnableAutomaticChecks in their Info.plist

@noah-nuebling
Copy link
Copy Markdown
Author

noah-nuebling commented Aug 26, 2025

Ohh man I just spent the evening writing up a detailed post and then I dragged a .png onto the comment field and it tried to open the image in Safari and failed, and then I went back and the entire comment text was deleted. :'(

I'm sorry I don't have the patience to rewrite something good, so I'll just post all the images I had made for the previous post and write some sloppy stuff around that

I made this image to show how to activate the 'transparent titlebar' style which you preferred. (The code supports that)

Screenshot 2025-08-26 at 9 57 04 PM it.

Then I made some images outlining the 'problems' with the current visuals that the pull request attempts to improve on:

Screenshot 2025-08-27 at 12 46 45 AM Screenshot 2025-08-26 at 10 16 40 PM

Here is this pull request by comparison:

Screenshot 2025-08-27 at 12 09 21 AM

Here with the margins painted in – same sized margins have the same color:

Screenshot 2025-08-26 at 10 22 47 PM

I then wrote about how I think your eyes can't pick up pixel-differences per-se (which I think you alluded to and I agree with) but your eyes are very good at comparing things, and the new margins create lots of 'symmetries' – things are centered between other things and close-by margins are often equal. I said that I thought that this made things look more beautiful and simple and professional and stuff.

Here are some more 'symmetries' – between the text and the app icon:

The text sits nicely between the rounded corners on Tahoe:
Screenshot 2025-08-26 at 11 18 39 PM

On Sequoia, the text lines up with the little arrow heads – I didn't plan for this and it might be an accident, but Id assume that the icon follows Apple's grid and other icons would line up in similar ways and stuff:
Screenshot 2025-08-26 at 11 14 54 PM

I also made a case for how these symmetries show up in any situation, no matter which elements are shown or hidden or what macOS version you're using.

E.g here's Sequoia with a transparent title bar:
Note that when the titlebar is transparent, the code adjusts the top margin so that the app icon is centered between the traffic lights and the releaseNotesBox. This works on all macOS versions that Sparkle supports (I think – I tested 10.14 and up)

Screenshot 2025-08-26 at 11 58 19 PM

Here are margins for when checkbox is hidden on Tahoe:

Screenshot 2025-08-27 at 12 00 25 AM

Margins when releaseNotesBox is hidden on Tahoe:

Screenshot 2025-08-27 at 12 00 39 AM

I then I tried to make a case for the code:

Basically my point was that, when you strip away the if-else cases which I just left in fyi or so you can decide what you like better, the added code is just this:

Screenshot 2025-08-27 at 12 10 29 AM

Which is mostly just changing NSLayoutConstraint sizes on Tahoe – it's really not that complicated, it's just maybe a bit verbose because NSLayoutConstraint API.

Beyond this, there are two 'architectural changes' to the UI:

  1. Change:

The icon has been wrapped in a wrapper view which 'deletes' the margins contained in the image from the layout, by applying negative margins. This allows us to visually align the app icon with the other elements on screen very easily. It also allows us to resize the the app icon without affecting all the margins. This makes it much simpler to make the app icon bigger on Tahoe – which I think is good because otherwise the app icon looks too small on Tahoe – especially in contrast to the big buttons (But all the controls and the title bar have gotten bigger in Tahoe.)

-> So I think this change actually allows for simplification of the layout logic and also easier iteration on the design in the future. (Because you can now very easily change the size without affecting the margins.)

  1. Change:

Using 'spacer' views instead of -[NSStackview setCustomSpacing:afterView:] (and wrapper views with margins.)

This is almost the same thing. Spacer views can do the same things as -[setCustomSpacing:afterView:] but are more flexible and powerful, since:

  1. They allow you to specify different spacing between different views in the stack right in interface builder.
  2. You can use a spacer view to create a space at the very top of the stack view, which isn't possible with setCustomSpacing:afterView:
  3. You can stack multiple spacer on top of each other and then hide one of them programmatically

This simplifies the code in our case, because we can define the spacing at the very top of the window edge in the same way as any where else. We used this to define the _spacer_underneath_trafficLights, which we configure to line up with the bottom edge of the traffic-lights exactly, and then we put another spacer directly below which defines how far our content should be away from the traffic lights.

Also the checkbox previously had a wrapper view with a margin (Which, IIRC, stacked up with the [setCustomSpacing:afterView:] spacing, which is a bit hacky and confusing.).

I changed it to a spacer to be consistent.

All of this would be a bit more hacky with [setCustomSpacing:afterView:] and wrapper views that contain the margins – but at the end of the day it's almost the same thing. If you want me to revert it back to match more closely with how it was I can do that.

Anyways, the code is only affected by all this in two tiny places:

Screenshot 2025-08-27 at 12 31 31 AM

I'd say this simplifies things. We removed the '.superview' thing which was a bit hacky. And we removed the SUUpdateAlertGroupElementSpacing stuff which is also slightly hacky.
Now the logic is just "If we wanna remove something from the stack, we just hide it and also hide the spacer below it".
And all the spacers are set up so the layout looks perfect after you do that.

@noah-nuebling
Copy link
Copy Markdown
Author

noah-nuebling commented Aug 26, 2025

Delete the test app user defaults. On second launch it will show permission prompt. This works when apps do not override SUEnableAutomaticChecks in their Info.plist

In my original post I also said thanks for that. Thanks!

I also said that I understand if the changes are out of scope or don't align with your vision for the project. But since you talked about wanting a good justification for any changes I tried to make a more detailed case for why I think these changes are good.

Another thing I said was that I think the visual changes are small but I think people do pick up on these visual symmetries and balanced-ness and will perceive the UI as a bit more simple, beautiful and polished, and thoughtfully crafted, and that they will appreciate that.

But again – the changes are pretty small, and I think that if the UI ships as it is in 2.x it's already much more beautiful than before!

I just tried to improve and polish things to the best of my abilities.

@zorgiepoo
Copy link
Copy Markdown
Member

zorgiepoo commented Aug 27, 2025

There is a lot of information to process here. I'm trying to stabilize 2.8 so I want to take smaller changes with low risk (if possible).

As for the leading padding on the icon images, I've noted before that seems to be intentional, depending on the image I guess? I have seen that in NSAlerts and in notifications too with the same icons too. Even though it is questionable.

I'll see if I can come back to this thread and the details written here. I've other important things to work on meanwhile.

@noah-nuebling
Copy link
Copy Markdown
Author

noah-nuebling commented Aug 27, 2025

I'm trying to stabilize 2.8 so I want to take smaller changes with low risk (if possible).

That sounds reasonable. I understand. Thanks for looking into this.

As for the leading padding on the icon images, I've noted before that seems to be intentional, depending on the image I guess? I have seen that in NSAlerts and in notifications too with the same icons too. Even though it is questionable.

That's an interesting point. One argument for aligning the icon with other things here is that the icon is like an "integrated" part of the layout for us while for standard NSAlert it feels more like it sits on top of the main layout separately.

In that notification you linked to I cannot clearly see where things are aligned. I haven't looked at it closely, yet, but that's interesting.

As for this comment you linked to:

App icons always have additional padding I believe. Assuming the additional padding is 5 (not sure it is), the margin is still 20.

The padding is 5 if the NSImage size is 60, which it is on NSAlert - if the image is larger, then the padding increases. The code changes in this PR make the two things independent.

Good luck with the 2.8 update!

@zorgiepoo
Copy link
Copy Markdown
Member

zorgiepoo commented Sep 14, 2025

Not taking changes right now and I don't think I can in the form of this PR. The icon alignment is tempting but I see app icons insetted in so many places. I believe the padding is baked into the images themselves, so it doesn't feel right to hardcode/assume a constant padding to negate by.

@zorgiepoo zorgiepoo closed this Sep 14, 2025
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.

2 participants