-
Notifications
You must be signed in to change notification settings - Fork 221
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
Add landing page experiment #5434
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
66cfce7
feat: Add feature flag for landing page redesign
flozia 4ae5d63
feat: Add experiment for landing page redesign
flozia 095729d
chore: Add landing page menu
flozia c69ee4e
chore: Global menu header styling
flozia ca4ea5f
fix: Only show MobileShell when landing page redesign is enabled
flozia fe4364d
chore: Add stories for landing page redesign
flozia 56ee8d0
chore: Add initial unit tests for landing page redesign
flozia 218a13d
chore: Match submenu items with main menu
flozia dfea4ab
merge: main -> mntor-3825
flozia 58057d1
fix: Country code props for landing story
flozia e53a3b9
Merge branch 'main' into mntor-3825
flozia 9681142
Merge branch 'mntor-3825' of github.com:mozilla/blurts-server into mn…
flozia 248d198
fix: E2E
flozia 6c396f7
chore: Fix mobile shell menu
flozia a0503a8
Merge branch 'main' into mntor-3825
flozia d665757
chore: Remove mobile menu carets
flozia ea376fe
Merge branch 'main' into mntor-3825
flozia 0f4404a
merge: main -> mntor-3825
flozia 1439816
fix: NavBar styling
flozia cac5077
chore: Update mobile navbar hoverstate
flozia aef16bc
fix: Linter
flozia 5dc3a67
fix: Unit test for LandingPageRedesign
flozia 2d72801
Merge branch 'main' into mntor-3825
flozia f133a04
Merge branch 'main' into mntor-3825
flozia 261324c
Merge branch 'mntor-3825' of github.com:mozilla/blurts-server into mn…
flozia 9ff39c9
Merge branch 'main' into mntor-3825
flozia bd0974e
chore: Update landing page experiment id
flozia d8f3fa0
merge: main -> mntor-3825
flozia de615e7
merge: main -> mntor-3825
flozia d621af1
Merge branch 'mntor-3825' of github.com:mozilla/blurts-server into mn…
flozia 6b0b4e0
Merge branch 'main' into mntor-3825
flozia f51bfad
chore: Add unit test coverage for the experiments context provider
flozia ef97831
chore: Correct telemetry unit test coverage
flozia ee5768c
merge: Resolve conflicts with main
flozia fecb559
Merge branch 'main' into mntor-3825
flozia 1245bd4
fix: SCSS update conflict
flozia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/app/(proper_react)/(redesign)/(public)/LandingViewRedesign.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@import "../../../tokens"; | ||
|
||
.wrapper { | ||
display: flex; | ||
flex-direction: column; | ||
height: 100%; | ||
} |
102 changes: 102 additions & 0 deletions
102
src/app/(proper_react)/(redesign)/(public)/LandingViewRedesign.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
import type { Meta, StoryObj } from "@storybook/react"; | ||
import { View, Props as ViewProps } from "./LandingViewRedesign"; | ||
import { getL10n } from "../../../functions/l10n/storybookAndJest"; | ||
import { PublicShell } from "./PublicShell"; | ||
import { defaultExperimentData } from "../../../../telemetry/generated/nimbus/experiments"; | ||
import { AccountsMetricsFlowProvider } from "../../../../contextProviders/accounts-metrics-flow"; | ||
import { CONST_URL_MONITOR_LANDING_PAGE_ID } from "../../../../constants"; | ||
|
||
const meta: Meta<typeof View> = { | ||
title: "Pages/Public/Landing page/Redesign", | ||
component: (props: ViewProps) => { | ||
const experimentData = | ||
props.experimentData ?? defaultExperimentData["Features"]; | ||
return ( | ||
<AccountsMetricsFlowProvider | ||
enabled={ | ||
experimentData["landing-page-redesign-plus-eligible-experiment"] | ||
.enabled | ||
} | ||
metricsFlowParams={{ | ||
entrypoint: CONST_URL_MONITOR_LANDING_PAGE_ID, | ||
entrypoint_experiment: | ||
"landing-page-redesign-plus-eligible-experiment", | ||
entrypoint_variation: | ||
experimentData["landing-page-redesign-plus-eligible-experiment"] | ||
.variant, | ||
form_type: "email", | ||
service: process.env.OAUTH_CLIENT_ID as string, | ||
}} | ||
> | ||
<PublicShell | ||
l10n={getL10n("en")} | ||
countryCode={props.countryCode} | ||
enabledFeatureFlags={["LandingPageRedesign"]} | ||
experimentData={{ | ||
...defaultExperimentData["Features"], | ||
"landing-page-redesign-plus-eligible-experiment": { | ||
enabled: true, | ||
variant: "redesign", | ||
}, | ||
}} | ||
> | ||
<View {...props} experimentData={experimentData} /> | ||
</PublicShell> | ||
</AccountsMetricsFlowProvider> | ||
); | ||
}, | ||
args: { | ||
l10n: getL10n(), | ||
}, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof View>; | ||
|
||
export const LandingRedesignUs: Story = { | ||
name: "US visitors", | ||
args: { | ||
eligibleForPremium: true, | ||
countryCode: "us", | ||
scanLimitReached: false, | ||
}, | ||
}; | ||
|
||
export const LandingRedesignUsScanLimit: Story = { | ||
name: "US visitors - Scan limit reached", | ||
args: { | ||
eligibleForPremium: true, | ||
countryCode: "us", | ||
scanLimitReached: true, | ||
}, | ||
}; | ||
|
||
export const LandingRedesignNonUs: Story = { | ||
name: "Non-US visitors", | ||
args: { | ||
eligibleForPremium: false, | ||
countryCode: "nz", | ||
}, | ||
}; | ||
|
||
export const LandingRedesignNonUsDe: Story = { | ||
name: "German", | ||
args: { | ||
eligibleForPremium: false, | ||
countryCode: "de", | ||
l10n: getL10n("de"), | ||
}, | ||
}; | ||
|
||
export const LandingRedesignNonUsFr: Story = { | ||
name: "French", | ||
args: { | ||
eligibleForPremium: false, | ||
countryCode: "fr", | ||
l10n: getL10n("fr"), | ||
}, | ||
}; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 wonder if this might be confusing later, could we give it a more unique name? Do we ever remove these?
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.
Good point — I’ve updated the experiment ID to be a bit more explicit in bd0974e.