-
Notifications
You must be signed in to change notification settings - Fork 4
UI Updated to 2019 App #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
|
||
| import SwiftUI | ||
|
|
||
| struct WorkshopDetailsView: View { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's make this just DetailView and have the SwiftUI previews
| MACOSX_DEPLOYMENT_TARGET = 12.3; | ||
| MARKETING_VERSION = 1.0; | ||
| PRODUCT_BUNDLE_IDENTIFIER = com.niveumlabs.deepa; | ||
| PRODUCT_BUNDLE_IDENTIFIER = com.donchia.deepa; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woops, don't commit this lol
| ForEach(viewModel.schedule) { information in | ||
| if Self.extractDate.string(from: information.startAt ?? Date.now) == "20/01/2022" { | ||
| VStack { | ||
| NavigationLink(destination: WorkshopDetailsView(title: information.title, startAt: information.startAt ?? Date.now, endAt: information.endAt ?? Date.now, talkDescription: information.talkDescription ?? "", activityName: information.activityName ?? "", speakers: information.speakers)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you rename information to talk? structurally, a schedule is made up of talks.
then ... WorkshopDetailsView / DetailView takes the entire talk and decides how to render the talk
| if Self.extractDate.string(from: information.startAt ?? Date.now) == "20/01/2022" { | ||
| VStack { | ||
| NavigationLink(destination: WorkshopDetailsView(title: information.title, startAt: information.startAt ?? Date.now, endAt: information.endAt ?? Date.now, talkDescription: information.talkDescription ?? "", activityName: information.activityName ?? "", speakers: information.speakers)) { | ||
| ListContent(title: information.title, speakers: information.speakers, startAt: information.startAt ?? Date.now, endAt: information.endAt ?? Date.now) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as ListContent can be more specific named as TalkContent and takes the entire Talk
| .cornerRadius(6) | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to have the preview here too, something like this will be nice
struct WorkshopDetailsView_Previews: PreviewProvider {
static var previews: some View {
NavigationView {
WorkshopDetailsView(
title: "Awesome talk title",
startAt: Date(timeIntervalSinceNow: 1),
endAt: Date(timeIntervalSinceNow: 20),
talkDescription: "Lorem ipsum",
activityName: "normalTalk",
speakers: [
Speaker(
id: 90,
name: "Kale",
twitter: "kale",
company: "iOS Conf Sg",
imageUrl: "https://iosconf.sg/images/organisers/kale.jpeg"
)
])
}
}
}| func getURL2022(speakerImageURL: String) -> String { | ||
| if speakerImageURL.count > 0 { | ||
| var url = speakerImageURL | ||
| for (index, char) in "2022.".enumerated() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOL this is a big no .... we should fix the backend value instead and not hard coding it
No description provided.