-
Notifications
You must be signed in to change notification settings - Fork 3k
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
implement billing banner #43267
implement billing banner #43267
Conversation
082aa97
to
1f9390e
Compare
1f9390e
to
bdd0adc
Compare
This PR introduces only the UI for the billing banner All translations and logic of showing will be implemented in the scope of this issue. |
@ishpaul777 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@mananjadhav is going to review this one! |
Yeah, headline should use our
I don't think this is correct. I tried to clean all these up but I think with all the permutations in the file this slipped through the cracks. I think there should be 0 gap between headline and smaller text below. Thoughts on that? |
Cool, that works for me! |
Ok cool. I've gotten them all cleaned up in Figma too. |
@shawnborton updated |
src/styles/index.ts
Outdated
@@ -2848,6 +2848,11 @@ const styles = (theme: ThemeColors) => | |||
width: variables.iconSizeExtraLarge, | |||
}, | |||
|
|||
billingBannerSubtitle: { |
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.
Do we really need to write an ultra specific style here? Why not just reuse existing styles here? For example, we have colorMuted
that can be added, and I bet we have our lineHeight as a style as well.
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.
Yes, we have colorMuted
, but we do not have styles that specify only the lineHeight
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.
Then let's add a generic helper class for lineHeight20... though I think our normal text should automatically have a good line height, right?
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.
Updated
Do you mean a specific style by a normal text?
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.
I'm saying that our standard, "default" text across the app should be at 15px, in our Expensify Neue font, with 20px line height. I'm not sure if all default text gets those styles or not though.
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.
Currently, we have 21px line height as a default
https://github.com/Expensify/App/blob/5c86b722a8df1c2cf11ee9d3a3e62c6e69a05376/src/styles/index.ts#L231C9-L231C22
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.
Got it. Let's just leave this as-is then, and I'll create a follow up issue to fix our line height from being 21px.
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.
Value of the fontSizeNormalHeight
-
Line 66 in 5c86b72
fontSizeNormalHeight: getValueUsingPixelRatio(21, 28), |
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.
reverted and removed specific line-height style
src/styles/index.ts
Outdated
@@ -455,6 +455,10 @@ const styles = (theme: ThemeColors) => | |||
fontWeight: FontUtils.fontWeight.bold, | |||
}, | |||
|
|||
textLineHeightXLarge: { |
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 feels like a very misleading name for this... I wouldn't consider this line height to be XLarge, I would consider it to be our default line height for our default font size.
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.
Does it mean updating the baseFontStyle
or creating a more suitable name?
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.
Can you confirm that our base font style includes line height? And if so, what is the line height? Because maybe we don't actually need to do anything here and we can just use our "default" text styles.
Sounds good, I think that's the best path forward for now. |
@mananjadhav Could you review the PR? |
Getting to this in 10 mins. Just finishing a checklist on another one. |
We do not, thanks! |
Thanks @dannymcclain @shawnborton . I think the rest of the comments weren't blockers. Working on the checklist now. |
No comments from me, I agree with everything you've laid out here and I agree the smaller (normal) font for the headline feels better! |
@pasyukevich Can you take a look at the design comments? |
@dannymcclain Sure! I'm already preparing the updates among with trial styles |
Added logic for trial fonts and background |
@mananjadhav Could you review the updated version? |
@@ -31,6 +32,15 @@ function CardSection() { | |||
isCentralPane | |||
titleStyles={styles.textStrong} | |||
subtitleMuted | |||
banner={ | |||
<BillingBanner |
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.
Can we get rid of this dummy code?
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.
removed
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.
From a design perspective this looks good. I played around with the banner props to check out the different variations and everything is looking good. Thanks for handling my last minute changes! Definitely still get a proper technical review.
Reviewer Checklist
Screenshots/VideosAndroid: NativeMacOS: Desktopdesktop-billing-banner.mov |
I am done with most of the checklist, except for Android. For some reason the Android always loads a blank page for me. Checking. |
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 PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Oh FYI I removed the QA steps since Applause will not be able to edit the code to add a fake banner. Once we have real data integrated we can have them look at it |
🚀 Deployed to staging by https://github.com/amyevans in version: 1.4.82-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.82-4 🚀
|
Details
To access this newly created component, paste the following link into the browser
https://dev.new.expensify.com:8082/settings/subscription
or add this effect to InitialSettingsPage.tsx
Add banner with text and other parameters to the section in the CardSection.tsx
Fixed Issues
$ #42430
PROPOSAL:
Tests
Offline tests
QA Steps
No QA
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop