Skip to content

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

Merged
merged 5 commits into from
Jun 3, 2025

Conversation

petkybenedek
Copy link
Contributor

@petkybenedek petkybenedek commented May 28, 2025

refs: MBL-18849
affects: Teacher
release note: none

test plan:

  • Check if the text on the SubbmissionViewer screen has padding.

Screenshots

BeforeAfter

Checklist

  • Follow-up e2e test ticket created
  • A11y checked
  • Tested on phone
  • Tested on tablet
  • Tested in dark mode
  • Tested in light mode
  • Approve from product

refs: MBL-18849
affects: Teacher
release note: none
@petkybenedek petkybenedek self-assigned this May 28, 2025
@inst-danger
Copy link
Contributor

inst-danger commented May 28, 2025

Warnings
⚠️ This pull request will not generate a release note.

Affected Apps: Teacher

MBL-18849

Coverage New % Master % Delta
Canvas iOS 91.63% 91.63% 0%

Generated by 🚫 dangerJS against 0108900

@inst-danger
Copy link
Contributor

inst-danger commented May 28, 2025

Teacher Build QR Code:

@petkybenedek petkybenedek marked this pull request as ready for review May 29, 2025 09:33
@@ -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)
Copy link
Contributor

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

Copy link
Contributor Author

@petkybenedek petkybenedek Jun 3, 2025

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.

@petkybenedek petkybenedek marked this pull request as draft June 3, 2025 09:26
Copy link
Contributor

@rh12 rh12 left a 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!

@petkybenedek petkybenedek marked this pull request as ready for review June 3, 2025 11:55
Copy link
Contributor

@balintbartok balintbartok left a comment

Choose a reason for hiding this comment

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

QA + 1

@balintbartok balintbartok merged commit 3839a66 into master Jun 3, 2025
4 checks passed
@balintbartok balintbartok deleted the MBL-18849-Missing-paddings-on-SubmissionViewer branch June 3, 2025 12:38
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.

4 participants