This repository has been archived by the owner on Jan 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Break down ExperimentDetails container into (mostly) simple components (
#2891) * Quick linting fix for gulpfile * Issue #2807: Move ExperimentPage container into a bundle directory, move IncompatibleAddons subcomponent into the bundle * Issue #2807: Move ExperimentPage tests into bundle directory * Fix linting errors in ExperimentPage tests * Issue #2807: Try extracting TestpilotPromo and adding flowtype annotations to MainInstallButton * Issue #2807: Reorganize subcomponents & tests used only by ExperimentPage * Issue #2807: More ExperimentPage test lint fixes * Issue #2807: Quick experiment install fix * Ensure ExperimentPage-test.js is removed after rebase
- Loading branch information
Showing
22 changed files
with
583 additions
and
474 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { | ||
MiscAppProps, | ||
BrowserEnvProps, | ||
SendToGAProps | ||
} from '../containers/types'; | ||
|
||
export type VariantTestsProps = { | ||
varianttests: Object | ||
}; | ||
|
||
export type MainInstallButtonProps = { | ||
experimentTitle: string, | ||
installCallback: Function | ||
} & VariantTestsProps & MiscAppProps & SendToGAProps & BrowserEnvProps; |
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
File renamed without changes.
File renamed without changes.
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
8 changes: 2 additions & 6 deletions
8
...pp/components/IncompatibleAddons/index.js → ...ners/ExperimentPage/IncompatibleAddons.js
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
51 changes: 51 additions & 0 deletions
51
frontend/src/app/containers/ExperimentPage/TestpilotPromo.js
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,51 @@ | ||
// @flow | ||
|
||
import React from 'react'; | ||
import { Localized } from 'fluent-react/compat'; | ||
|
||
import LayoutWrapper from '../../components/LayoutWrapper'; | ||
import Banner from '../../components/Banner'; | ||
import Copter from '../../components/Copter'; | ||
import MainInstallButton from '../../components/MainInstallButton'; | ||
|
||
import type { TestpilotPromoProps } from './types'; | ||
|
||
export default class TestpilotPromo extends React.Component { | ||
props: TestpilotPromoProps; | ||
|
||
render() { | ||
const { hasAddon, graduated, experiment, installCallback } = this.props; | ||
|
||
const { title, web_url } = experiment; | ||
if (hasAddon === null || hasAddon || graduated || web_url) { | ||
return null; | ||
} | ||
return ( | ||
<section id="testpilot-promo"> | ||
<Banner> | ||
<LayoutWrapper flexModifier="row-between-reverse"> | ||
<div className="intro-text"> | ||
<h2 className="banner__title"> | ||
<Localized id="experimentPromoHeader"> | ||
<span className="block">Ready for Takeoff?</span> | ||
</Localized> | ||
</h2> | ||
<Localized id="experimentPromoSubheader"> | ||
<p className="banner__copy"> | ||
We're building next-generation features for Firefox. | ||
Install Test Pilot to try them! | ||
</p> | ||
</Localized> | ||
<MainInstallButton | ||
{...this.props} | ||
experimentTitle={title} | ||
installCallback={installCallback} | ||
/> | ||
</div> | ||
<Copter /> | ||
</LayoutWrapper> | ||
</Banner> | ||
</section> | ||
); | ||
} | ||
} |
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
Empty file.
Oops, something went wrong.