Skip to content

Commit

Permalink
support windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane Osbourne committed Oct 17, 2023
1 parent ce007e5 commit 48adf5a
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 36 deletions.
2 changes: 1 addition & 1 deletion integration-tests/browser.spec-int.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ test.describe('breakage form', () => {
test('should submit with category', async ({ page }) => {
const dash = await DashboardPage.browser(page)
await dash.addState([testDataStates.protectionsOn])
const optionToSelect = "Video didn’t play or load"
const optionToSelect = 'Video didn’t play or load'
await dash.clickReportBreakage()
await dash.selectBreakageCategory(optionToSelect)
await dash.submitBreakageForm()
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions shared/js/ui/templates/breakage-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ export default function () {
${topNav({ view: 'secondary' })}
<div class="breakage-form__inner padding-x-double js-breakage-form-element" data-state="idle">
<div class="padding-y">${wrap(this.mainModel, this)}</div>
<div class="key-insight">
<div class="key-insight key-insight--breakage">
${icon}
<div class="breakage-form__advise">
<p class="token-title-3">${i18n.t('report:selectTheOptionDesc.title')}</p>
</div>
<div class="breakage-form__message">
<p class="token-title-3-em">${i18n.t('report:thankYou.title')}</p>
<p class="token-title-3">${i18n.t('report:yourReportWillHelpDesc.title')}</p>
<div class="thanks">
<p class="thanks__primary">${i18n.t('report:thankYou.title')}</p>
<p class="thanks__secondary">${i18n.t('report:yourReportWillHelpDesc.title')}</p>
</div>
</div>
<div class="breakage-form__content">
Expand Down
6 changes: 6 additions & 0 deletions shared/scss/base/_tokens.scss
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@
font-weight: 400;
line-height: 18px;
}

.environment--windows & {
font-size: 14px;
font-weight: 400;
line-height: 20px;
}
}

.token-label-em {
Expand Down
77 changes: 54 additions & 23 deletions shared/scss/views/_breakage-form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,29 +49,6 @@
display: block;
}
}
.breakage-form__message {
text-align: center;
padding-bottom: 20px;
transition: all 0.2s ease-in-out;
opacity: 1;
display: none;

.token-title-3-em {
margin-bottom: 8px;
}

[data-state='sent'] & {
display: block;
}
}

.breakage-form__success--title {
padding-top: 15px;
}

.breakage-form__success--message {
padding: 15px;
}

.form__label__select {
display: block;
Expand All @@ -81,6 +58,9 @@

.form__group {
margin-bottom: 14px;
.environment--windows & {
margin-bottom: 16px;
}
}

.form__select {
Expand All @@ -100,6 +80,7 @@

.environment--windows & {
min-height: 34px;
margin-bottom: 10px;
}
}

Expand All @@ -124,6 +105,11 @@
.environment--macos & {
height: 102px;
}

.environment--windows & {
height: 102px;
line-height: 20px;
}
}

.form__submit {
Expand Down Expand Up @@ -179,10 +165,55 @@
.environment--browser & {
margin-top: auto;
}

[data-state='sent'] & {
display: none;
}
}

.breakage-form__inner {
height: calc(100% - var(--nav-height));
display: flex;
flex-direction: column;
}

.thanks {
text-align: center;
padding-bottom: 20px;
transition: all 0.2s ease-in-out;
opacity: 1;
display: none;

[data-state='sent'] & {
display: block;
}
}

.thanks__primary {
font-size: 15px;
font-style: normal;
font-weight: 800;
line-height: 20px; /* 133.333% */
margin-bottom: 8px;

.environment--macos &,
.environment--macos & {
font-size: 17px;
font-style: normal;
font-weight: 600;
line-height: 22px; /* 129.412% */
}
}
.thanks__secondary {
font-size: 16px;
font-style: normal;
font-weight: 400;
line-height: 20px;

.environment--macos & {
font-size: 15px;
font-style: normal;
font-weight: 400;
line-height: 20px;
}
}
9 changes: 5 additions & 4 deletions shared/scss/views/_hero.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
//background-color: cyan;
background-position: center center;
background-repeat: no-repeat;
margin-bottom: 20px;
margin-bottom: 24px;
background-size: contain;
.environment--browser & {
margin-bottom: 16px;
}
}

.hero-icon--breakage-form {
@include cross_platform_bg_image('refresh-assets/Breakage-128.svg');
margin-bottom: 20px;
.environment--browser & {
margin-bottom: 16px;
}
}
.hero-icon--tracker-network {
@include cross_platform_bg_image('refresh-assets/Network-128.svg');
Expand Down
9 changes: 8 additions & 1 deletion shared/scss/views/_key-insight.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.key-insight {
position: relative;
padding-bottom: 20px;
padding-bottom: 24px;
text-align: center;

&[data-suffix='about-link'] {
Expand Down Expand Up @@ -31,3 +31,10 @@
padding-top: 6px;
}
}

.key-insight--breakage {
padding-bottom: 20px;
.environment--windows & {
padding-bottom: 12px;
}
}
10 changes: 7 additions & 3 deletions shared/scss/views/_protection-header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@
padding-top: 8px;
padding-bottom: 8px;
}
.environment--macos & {
//padding-top: 11px;
//padding-bottom: 11px;
.environment--windows & {
padding-top: 7px;
padding-bottom: 7px;
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 24px;
}
}

Expand Down

0 comments on commit 48adf5a

Please sign in to comment.