-
Notifications
You must be signed in to change notification settings - Fork 14
PROD-3109 PROD-3106 PROD-2708 PROD-2640 -> Fix issues in self service -> dev #413
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
Changes from 5 commits
db57744
b011ce9
c8219df
cd567ed
b7a7c55
8eaf663
51e0a96
4589349
9bedb3c
6b45148
38e064e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,9 +17,10 @@ | |
flex: 1 1 0; | ||
margin-right: $space-xl; | ||
border-radius: $space-xs; | ||
padding: $space-lg 0; | ||
padding: $space-xxl 0px 0px; | ||
background-color: $black-5; | ||
position: relative; | ||
height: calc($space-xl * 30); | ||
|
||
.popular-card { | ||
display: flex; | ||
|
@@ -61,19 +62,25 @@ | |
align-items: center; | ||
|
||
h3 { | ||
margin: $space-lg; | ||
margin: $space-xxl $space-lg; | ||
font-weight: 500; | ||
font-size: $space-mx; | ||
font-size: calc($space-mx + $space-xs); | ||
line-height: $space-mx; | ||
margin-top: $space-xxl; | ||
} | ||
|
||
.body-medium-bold { | ||
font-weight: 700; | ||
font-size: $space-xxl; | ||
font-family: "Roboto"; | ||
padding: 0; | ||
line-height: calc($space-xxl - 2px); | ||
} | ||
|
||
&.feature { | ||
visibility: hidden; | ||
|
||
h3 { | ||
margin: $space-lg; | ||
margin-top: $space-xxl; | ||
margin: $space-xxl $space-lg; | ||
font-size: $space-xxxxl; | ||
} | ||
} | ||
|
@@ -82,9 +89,15 @@ | |
h3 { | ||
font-size: $space-xxxxl; | ||
line-height: $space-xxxxl; | ||
margin-top: $space-md; | ||
margin-top: $space-sm; | ||
margin-bottom: $space-xxl; | ||
} | ||
|
||
.body-medium-bold { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here? |
||
font-size: $space-xl; | ||
line-height: $space-xxxxl; | ||
font-style: normal; | ||
} | ||
} | ||
} | ||
|
||
|
@@ -97,24 +110,36 @@ | |
} | ||
|
||
.card-section { | ||
margin: $space-lg 0; | ||
margin: $space-mx 0; | ||
|
||
.row { | ||
height: auto; | ||
|
||
&:last-child { | ||
.row-divider { | ||
&:last-child { | ||
display: block; | ||
} | ||
} | ||
} | ||
} | ||
|
||
.row-divider { | ||
height: $border-xs; | ||
border-bottom: $border solid $black-10; | ||
width: auto; | ||
margin: 0; | ||
|
||
&:last-child { | ||
display: none; | ||
} | ||
} | ||
|
||
.card-row { | ||
display: flex; | ||
padding: $space-md; | ||
align-items: center; | ||
min-height: calc($space-lg + $space-mx); | ||
min-height: calc($space-lg + $space-mx - 2px); | ||
position: relative; | ||
|
||
.card-row-col { | ||
|
@@ -156,6 +181,7 @@ | |
} | ||
} | ||
&.mobile { | ||
margin-bottom: 0; | ||
.feature-name { | ||
width: 100%; | ||
} | ||
|
@@ -164,13 +190,14 @@ | |
} | ||
} | ||
&.feature { | ||
margin: calc($space-lg - 0.2px) 0; | ||
margin-top: $space-mx; | ||
} | ||
} | ||
|
||
&.feature { | ||
background-color: $tc-white; | ||
margin-right: 0; | ||
flex-grow: 0.9; | ||
|
||
.card-row-col:nth-child(2) { | ||
display: none; | ||
|
@@ -188,9 +215,14 @@ | |
} | ||
|
||
svg.card-row-icon { | ||
height: 14px; | ||
width: 14px; | ||
height: 24px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's use the |
||
width: 24px; | ||
display: inline; | ||
margin-right: 6px; | ||
|
||
@include ltemd { | ||
height: 16px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here |
||
width: 16px; | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,7 @@ const FormCardSet: React.FC<FormCardSetProps> = ({ name, cards, onChange, value | |
<div key={`card-${index}`}className={cn(styles['card'], selected && styles['selected'], isMobile && card.mostPopular && styles['mobile-popular'], { [styles.feature]: index === 0, [styles.mobile]: isMobile })}> | ||
{ card.mostPopular && <div className={styles['popular-card']}>MOST POPULAR</div>} | ||
<div className={cn(styles['card-header'], isMobile && styles['mobile'], { [styles.feature]: index === 0 })}> | ||
<div className='body-medium-bold'>{card.title}</div> | ||
<div className={styles['body-medium-bold']}>{card.title}</div> | ||
<h3>{formattedPrice}</h3> | ||
{getButton(card, selected)} | ||
</div> | ||
|
@@ -77,12 +77,13 @@ const FormCardSet: React.FC<FormCardSetProps> = ({ name, cards, onChange, value | |
{( | ||
<span className={cn(styles['card-row-col'], styles['center'])}> | ||
{ row.valueIcon ? | ||
<IconOutline.CheckIcon width={18} height={16} /> : | ||
<IconOutline.CheckIcon width={28} height={20} /> : | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's use the mixins in the stylesheets to size icons. |
||
<span className='body-main'>{row.text}</span> | ||
} | ||
</span> | ||
)} | ||
</div> | ||
<div className={styles['row-divider']}></div> | ||
</div> | ||
))} | ||
</div> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { currencyFormat } from '../../../src/utils' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know this is a confusing naming convention, but Anything related to bughunt and the work tool needs to be located w/in the Also, we should not be importing anything from the In this case, please use the |
||
import { FormCard } from '../../lib' | ||
import BugHuntPricingConfig from '../../tools/work/work-self-service/intake-forms/bug-hunt/bug-hunt.form.pricing-config' | ||
|
||
function getSelectedPackageFormatted(packageId: string): string { | ||
const currentPackage: FormCard | undefined = BugHuntPricingConfig.find((pricingConfig) => pricingConfig.id === packageId) | ||
if (currentPackage) { | ||
const deviceType: string = currentPackage.sections?.[0]?.rows?.[3]?.text || '' | ||
const noOfTesters: string = `${currentPackage.sections?.[0]?.rows?.[2]?.text || 0} testers` | ||
return `${currentPackage.title} - ${currencyFormat(currentPackage.price)} - ${deviceType} - ${noOfTesters}` | ||
} | ||
|
||
return packageId | ||
} | ||
|
||
export default getSelectedPackageFormatted |
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.
Rather than completely redefining a global style,
body-medium-bold
, can we find the global style that actually matches the design? Figma designs have the name of the font we should use.The only things we should be overriding for global fonts are related to padding/layout.