Skip to content

Conversation

kutakmir
Copy link

Objective

This PR introduces simple and detail contact views in the SwiftUI part of CareKit and CareKitUI.

Interesting points

In the Detailed Contact View, I couldn't use .subheadline Font style because it only allows a single line of text. That's probably a bug in SwiftUI. The same code is being used in the InstructionsTaskView alongside with .lineLimit(nil) which doesn't have any effect to the line limit.

The HeaderView didn't contain any image up until now. So included the image. We still don't have a way to populate images for contacts in CareKit so all images are just system placeholders for now.

The size of the image and scale of the fonts doesn't correspond 1:1 to the UIKit version. This is because we are using the predefined sizes. If we wanted to use different sizes for these use-cases, we would have to define them in constants.

Looking forward to your feedback!

Simulator Screen Shot - iPhone 11 - 2020-07-13 at 14 29 49
Simulator Screen Shot - iPhone 11 - 2020-07-13 at 14 29 52
Simulator Screen Shot - iPhone 11 - 2020-07-13 at 14 29 58
Simulator Screen Shot - iPhone 11 - 2020-07-13 at 14 30 00
Simulator Screen Shot - iPhone 11 - 2020-07-13 at 14 43 23

Copy link
Collaborator

@erik-apple erik-apple left a comment

Choose a reason for hiding this comment

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

Looks like a good start!
I left number of comments in-line.

There is still a bit of work to do connecting the contact controller to the contact view model, but we're happy to provide guidance on that if you get stuck!

@kutakmir
Copy link
Author

@erik-apple thanks for the feedback and explanation on some of the things - I'll follow up shortly!

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.

3 participants