Skip to content

Conversation

@rajveermalviya
Copy link
Member

Use DesignVariables.mainBackground as the iOS launch screen colors.

Discussion:
https://chat.zulip.org/#narrow/channel/530-mobile-design/topic/splash.20screen.20on.20iOS/near/2215883

Fixes: #1149

@rajveermalviya rajveermalviya added the maintainer review PR ready for review by Zulip maintainers label Jul 9, 2025
@rajveermalviya rajveermalviya requested a review from chrisbobbe July 9, 2025 20:27
// Once blockingFuture completes…
completer.complete();
await tester.pump();
await tester.pump();
Copy link
Member Author

Choose a reason for hiding this comment

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

I am not sure why the extra tester.pump() is needed now.

Copy link
Member

Choose a reason for hiding this comment

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

Puzzling, yeah. I just spent a few minutes investigating; and I don't see why this would have made a difference, but it does.

This potentially indicates a real bug, though purely in performance and not correctness: it may mean that the loading screen sticks around for a frame longer than it needs to before things get going, so that the user experiences the app starting up a bit more slowly.

I'll add a TODO comment, here and the other instance below. This code looks wrong — why is this extra pump needed? — and code that looks wrong should have a comment so the reader doesn't have to wonder about it.

@chrisbobbe
Copy link
Collaborator

Thanks, this looks great! Can we add bidirectional comments on the new "colorset" and on DesignVariables.mainBackground, saying that if one is changed, the other should be changed too? (Not sure offhand if the "colorset" file format supports comments)

@rajveermalviya
Copy link
Member Author

Not sure offhand if the "colorset" file format supports comments

Unfortunately it doesn't, anyway added the one-way comment on DesignVariables.mainBackground for now.

Comment on lines 7 to 10
"alpha" : "1.000",
"blue" : "0.941",
"green" : "0.941",
"red" : "0.941"
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: Ah I think we can use a hex representation, to make it easier to compare with DesignVariables.mainBackground?

Like in zulip-mobile:

https://github.com/zulip/zulip-mobile/blob/eb8505c4a0ccfb7bdd817ca9022c11ce57ab69d8/ios/ZulipMobile/Assets.xcassets/Brand.colorset/Contents.json#L8-L10

          "blue" : "0xFE",
          "green" : "0x92",
          "red" : "0x64"

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hopefully that would be an NFC change; hopefully it wasn't a factor in my failing to get things to work (as I mentioned in discussion)

Copy link
Member Author

@rajveermalviya rajveermalviya Jul 9, 2025

Choose a reason for hiding this comment

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

Updated, and tested that the behaviour is same.

@chrisbobbe
Copy link
Collaborator

Thanks, LGTM! @gnprice PTAL.

@chrisbobbe chrisbobbe requested a review from gnprice July 9, 2025 22:14
@chrisbobbe chrisbobbe added integration review Added by maintainers when PR may be ready for integration and removed maintainer review PR ready for review by Zulip maintainers labels Jul 9, 2025
@chrisbobbe chrisbobbe removed their assignment Jul 9, 2025
@chrisbobbe
Copy link
Collaborator

Also GitHub shows a rebase conflict in theme.dart

@rajveermalviya
Copy link
Member Author

rajveermalviya commented Jul 9, 2025

(Rebased to main.)

Copy link
Member

@gnprice gnprice left a comment

Choose a reason for hiding this comment

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

Thanks to both of you for taking care of this! Looks good, except that puzzle about the extra frame that the tests suggest is now needed. I'll add TODO comments and merge.

// Once blockingFuture completes…
completer.complete();
await tester.pump();
await tester.pump();
Copy link
Member

Choose a reason for hiding this comment

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

Puzzling, yeah. I just spent a few minutes investigating; and I don't see why this would have made a difference, but it does.

This potentially indicates a real bug, though purely in performance and not correctness: it may mean that the loading screen sticks around for a frame longer than it needs to before things get going, so that the user experiences the app starting up a bit more slowly.

I'll add a TODO comment, here and the other instance below. This code looks wrong — why is this extra pump needed? — and code that looks wrong should have a comment so the reader doesn't have to wonder about it.

This removes the un-styled CircularProgressIndicator that was
displayed for a brief moment, instead the user now just sees the
default background color.

[greg: added TODO-comments on the extra frame that seems to
 now be needed]
@gnprice gnprice merged commit 59dfd0a into zulip:main Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration review Added by maintainers when PR may be ready for integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[iOS] Missing iOS splash configuration

3 participants