Skip to content
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

"Card details cannot be changed" text size closer to form label size #4372

Merged
merged 9 commits into from
Dec 20, 2024

Conversation

joyceqin-stripe
Copy link
Collaborator

@joyceqin-stripe joyceqin-stripe commented Dec 18, 2024

Summary

Changed smallFootnote to font size 11.5
The form label font is subheadline, but when the field has text or is being edited, it moves up and scales to 75%. I tried making the smallFootnote font subheadline and scaling it, but it scaled the label position. 75% of 14pt is 10.5

Motivation

https://jira.corp.stripe.com/browse/MOBILESDK-2878

Testing

image
image

Changelog

@joyceqin-stripe joyceqin-stripe marked this pull request as ready for review December 19, 2024 18:37
@joyceqin-stripe joyceqin-stripe requested review from a team as code owners December 19, 2024 18:37
@@ -100,7 +100,7 @@ import UIKit
withTextStyle: .caption1,
maximumPointSize: 20)
public var footnote = UIFont.preferredFont(forTextStyle: .footnote, weight: .regular, maximumPointSize: 20)
public var smallFootnote = UIFont.preferredFont(forTextStyle: .footnote, weight: .medium, maximumPointSize: 10)
public var smallFootnote = UIFontMetrics(forTextStyle: .footnote).scaledFont(for: .systemFont(ofSize: 10.5, weight: .medium))
Copy link
Collaborator

Choose a reason for hiding this comment

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

My slight preference is to not use half point sizes, and prefer the text styles. Can we get away with using caption2, it's 11.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

My assumption is that we'd want the sublabel and the error text to be the same size— is that right? If so, I'm currently sending Hannah a screenshot with the error text set to caption2, and if she says that's okay, then we can go through with it.

@joyceqin-stripe joyceqin-stripe merged commit 812864c into master Dec 20, 2024
6 checks passed
@joyceqin-stripe joyceqin-stripe deleted the joyceqin-MOBILESDK-2878 branch December 20, 2024 20:59
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.

2 participants