-
Notifications
You must be signed in to change notification settings - Fork 951
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
Financial Connections: adjusted typography and spacing for Institution Picker #2543
Conversation
adb1003
to
2068dc8
Compare
685ec8e
to
c26f719
Compare
…abelNew to AttributedTextView.
…vertical spacing and fixed more institution references to use the new font infra.
…w to be more robust.
717699f
to
5ee6991
Compare
…e new font infra.
@@ -1,156 +0,0 @@ | |||
// | |||
// InstitutionSearchErrorView.swift |
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.
This was dead code - you should see no references to this anywhere but here
78238ae
to
aebd031
Compare
// UILabel with custom `lineHeight` via `NSParagraphStyle` was not properly | ||
// centering the text, so here we adjust it to be centered. |
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.
this explains why I introduced AttributedLabel
...the test plan shows the difference too
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.
Well this comment + the fact that ClickableLabelNew
(now AttributedTextView
) does not support single line text (at least easily)
@@ -11,7 +11,10 @@ import SafariServices | |||
@_spi(STP) import StripeUICore | |||
import UIKit | |||
|
|||
final class ClickableLabelNew: HitTestView { |
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.
Renamed because ClickableLabelNew
made me confused: I tried to use it as a UILabel
replacement, but UITextView
is multi-line, so its not a direct replacement. AttributedTextView
also matches with its 'similar' AttributedLabel
.
// UITextView with custom `lineHeight` via `NSParagraphStyle` was not properly | ||
// centering the text, so here we adjust it to be centered. |
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.
test plan shows the difference of what this centering-logic achieved
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 paragraphStyleLineHeight = paragraphStyle.minimumLineHeight | ||
assert(paragraphStyle.minimumLineHeight == paragraphStyle.maximumLineHeight, "we are assuming that minimum and maximum are the same") | ||
|
||
if paragraphStyleLineHeight > uiFontLineHeight { |
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.
Neat
…n Picker (#2543) * Financial Connections: adjusted fonts for Institution Picker. * Financial Connections: adjusted fonts for prepane. * Financial Connections: created AttributedLabel and renamed ClickableLabelNew to AttributedTextView. * Financial Connections: modified AttributedTextView to support better vertical spacing and fixed more institution references to use the new font infra. * Financial Connections: modified AttributedLabel and AttributedTextView to be more robust. * Financial Connections: changed FeaturedInstitutionGridCell font to use new font infra. * Financial Connections: small font fix.
…n Picker (#2543) * Financial Connections: adjusted fonts for Institution Picker. * Financial Connections: adjusted fonts for prepane. * Financial Connections: created AttributedLabel and renamed ClickableLabelNew to AttributedTextView. * Financial Connections: modified AttributedTextView to support better vertical spacing and fixed more institution references to use the new font infra. * Financial Connections: modified AttributedLabel and AttributedTextView to be more robust. * Financial Connections: changed FeaturedInstitutionGridCell font to use new font infra. * Financial Connections: small font fix.
* Financial Connections: introduced FinancialConnectionsFont and ClickableLabelNew to support line spacing. * Financial Connections: modified the consent bottom sheet fonts/spacing. * Financial Connections: adjusted typography and spacing for Institution Picker (#2543) * Financial Connections: adjusted fonts for Institution Picker. * Financial Connections: adjusted fonts for prepane. * Financial Connections: created AttributedLabel and renamed ClickableLabelNew to AttributedTextView. * Financial Connections: modified AttributedTextView to support better vertical spacing and fixed more institution references to use the new font infra. * Financial Connections: modified AttributedLabel and AttributedTextView to be more robust. * Financial Connections: changed FeaturedInstitutionGridCell font to use new font infra. * Financial Connections: small font fix. * Financial Connections: changed account picker typography. * Financial Connections: changed Networking Account Picker typography. * Financial Connections: changed success pane typography * Financial Connections: changed networking sign up pane typography. * Financial Connections: modified warmup pane typography. * Financial Connections: changed the typography in networking verification panes. * Financial Connections: more changes to adopt to new typography. * Financial Connections: fixed search bar spacing for testmode. * Financial Connections: fixed unit tests having old font references.
Summary
^ see title, and I am leaving various comments in this PR to explain specific parts
Design and font references:
https://www.figma.com/file/ikSIQS9Lw0qIr3PSeyyrPP/Connections-V2.5?type=design&node-id=1636-89037&mode=design&t=vw8IsvjVsgHt67RL-0
https://sail.stripe.me/foundations/typography/
https://www.figma.com/file/WAFvoybps5uk3FL4tftaee/Sail?type=design&node-id=26-370&mode=design&t=Hd2oiFSiURfCMlmn-0
Testing
UILabel font adjustment to be centered
UITextView font adjustment to be centered
Various Screens That Were Adjusted Due To The Changes