Repository navigation
Intro animation and sign-in screen UI - #68
durualayli wants to merge 1 commit into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
zainbilalh
left a comment
There was a problem hiding this comment.
The animation looks great! Just one comment, and also I think we should have a separate folder with subfolders to organize all these files. @JiwonJeong414 what do you think?
| "scale" : "1x" | ||
| }, | ||
| { | ||
| "filename" : "Speaker 1.png", |
There was a problem hiding this comment.
I think these files names should be Speakerx1 Speakerx2 and Speakerx3
|
yeah I agree, maybe like components in the subfolders in each view directory? |
| } | ||
|
|
||
| // MARK: - Keyframes | ||
|
|
| } | ||
|
|
||
| private extension IntroAnimationView { | ||
| @KeyframesBuilder<Wobble> |
zainbilalh
left a comment
There was a problem hiding this comment.
Quick review. It looks great lol I'm very excited to have this in the app
| @@ -0,0 +1,63 @@ | |||
| // | |||
| // SportsIcon.swift | |||
There was a problem hiding this comment.
Nit: Should be SportIcon
|
|
||
| import SwiftUI | ||
|
|
||
| import SwiftUI |
|
|
||
| @State private var showIntro = !SignInView.hasShownIntro | ||
| @State private var showButtons = SignInView.hasShownIntro | ||
| static var hasShownIntro = false |
There was a problem hiding this comment.
I think this shouldn't be owned by the view itself and should be owned by @AppStorage because I'm assuming we want to play this once when the app is installed? At least this version with the sign in.
| SportIcon("Soccer-g", x: 160, y: 145), | ||
| SportIcon("Tennis-g", x: -133, y: 194), | ||
| SportIcon("Baseball-g", x: 82, y: 202), | ||
| SportIcon("Equestrian-g", x: -32, y: 208), |
There was a problem hiding this comment.
Do we have an image for equestrian?
|
|
||
| extension SportIcon { | ||
| static let all: [SportIcon] = [ | ||
| SportIcon("Golf-g", x: 46, y: -202), |
There was a problem hiding this comment.
This could be done later, but I think we should have a sport struct/enum that also returns the image name so we don't have a bunch of magic strings here.
This is how FilterTile currently does it:
let imageName: String = selected ? sport.rawValue+"-r": sport.rawValue+"-g"
I'm thinking we extend the enum for sport with a selected image and grey image function that returns the correct name for the image, and here it would be smth like:
SportIcon(Rowing.selectedImage, x: -74, y: -190),
|
|
||
| // MARK: - Animation | ||
|
|
||
| func startAnimation(onFinished: (() -> Void)?) async { |
There was a problem hiding this comment.
I haven't tested this but looking at the code, what happens when startAnimation returns before calling onFinished?()?
Like if one of the awaits fails or the task is cancelled, does the animation never end?
score.mp4
Tried doing stacked PRs so I hope they work 🤞🤞 This one is just for the intro animation and the sign-in view UI.
Next steps (next PR):