-
Notifications
You must be signed in to change notification settings - Fork 121
Add paddings to SubmissionViewer #3409
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
Add paddings to SubmissionViewer #3409
Conversation
refs: MBL-18849 affects: Teacher release note: none
@@ -65,7 +66,9 @@ struct SubmissionViewer: View { | |||
Text("This student's responses are hidden because this assignment is anonymous.", bundle: .teacher) | |||
Spacer() | |||
} | |||
.font(.regular16).foregroundColor(.textDarkest) | |||
.font(.regular16) | |||
.padding(InstUI.Styles.Padding.standard.rawValue) |
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.
We could use the standard value directly:
.paddingStyle(.all, .standard)
or .paddingStyle(.horizontal, .standard)
(For some reason .paddingStyle(.standard)
doesn't work, this could be fixed later)
Same for other usage below
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.
Swift will not figure out which parameter was specified between multiple, non-named parameters with default values. Here's a short example without type inference:
func testFunction(_ message: String = "", _ statusCode: Int = 200) {
print("Test Function Called: \(message) with status code: \(statusCode)")
}
testFunction(200) // Cannot convert value of type 'Int' to expected argument type 'String'
testFunction()
testFunction("Open in Safari")
testFunction("Open in Safari", 200)
I fixed it, .paddingStyle(.standard)
can be used 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.
QA + 1
Thanks for cleaning up the paddings method!
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.
QA + 1
refs: MBL-18849
affects: Teacher
release note: none
test plan:
Screenshots
Checklist