Skip to content
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

Epic: Merge prep [#480] #493

Merged
merged 30 commits into from
Jun 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
e33094d
landing page merge prep copy changes
wackerow May 25, 2022
fc0b6bc
Update FAQ for merge prep
wackerow May 25, 2022
d77f549
additional FAQ updates
wackerow May 25, 2022
832522e
additional merge related FAQs
wackerow May 25, 2022
288240a
faq copy addition
wackerow May 25, 2022
8322a47
Checklist update, EL client assets
wackerow May 26, 2022
916c47f
Update pageContent.tsx
wackerow May 26, 2022
68a467a
add discord and ports to Client object
wackerow May 26, 2022
fa8e71b
add EL+CL callout to select-client
wackerow May 26, 2022
82823ae
shanghai note
wackerow May 26, 2022
07ada38
add link to Shanghai planning
wackerow May 26, 2022
db818e3
Create MergeReadiness
wackerow May 26, 2022
4894362
add /merge-readiness path
wackerow May 26, 2022
97caeb5
Update MergeReadiness
wackerow May 26, 2022
76db41d
Add link to AppBar
wackerow May 27, 2022
c0b4de0
Add and implement MergeNotification
wackerow May 27, 2022
68fe60f
Add ClientMergeNotification
wackerow May 27, 2022
a441020
add EL client pages
wackerow May 27, 2022
d0167e3
Add EL clients to AppBar
wackerow May 27, 2022
76833d9
Update MergeReadiness
wackerow May 27, 2022
5a2bddb
Add header ids
wackerow May 27, 2022
08f780d
alphabetical client ordering
wackerow May 27, 2022
edc4aa3
Add further reading
wackerow May 27, 2022
8bed089
copy clarification
wackerow May 27, 2022
5280a6b
copy patches
wackerow May 28, 2022
f6fdb2b
add Ropsten resources
wackerow May 31, 2022
c759ff3
bug fix
wackerow Jun 1, 2022
016df11
Adds Engine API section and JWT reqs
wackerow Jun 1, 2022
376a044
Add checklist navigation
wackerow Jun 1, 2022
689571d
Add additional resource links
wackerow Jun 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 43 additions & 8 deletions src/Routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,17 @@ import {
TermsOfService,
Languages,
TopUpPage,
MergeReadiness,
} from './pages';
import ScrollToTop from './utils/ScrollToTop';
import { Prysm } from './pages/Clients/Consensus/Prysm';
import { Teku } from './pages/Clients/Consensus/Teku';
import { Nimbus } from './pages/Clients/Consensus/Nimbus';
import { Lighthouse } from './pages/Clients/Consensus/Lighthouse';
import { Besu } from './pages/Clients/Execution/Besu';
import { Nethermind } from './pages/Clients/Execution/Nethermind';
import { Erigon } from './pages/Clients/Execution/Erigon';
import { Geth } from './pages/Clients/Execution/Geth';

type RouteType = {
path: string;
Expand All @@ -44,16 +49,21 @@ export enum routesEnum {
uploadValidatorPage = '/upload-deposit-data',
transactionsPage = '/transactions',
FaqPage = '/faq',
prysm = '/prysm',
nimbus = '/nimbus',
besu = '/besu',
erigon = '/erigon',
geth = '/geth',
lighthouse = '/lighthouse',
nethermind = '/nethermind',
nimbus = '/nimbus',
prysm = '/prysm',
teku = '/teku',
phishingPage = '/phishing',
checklistPage = '/checklist',
topUpPage = '/top-up',
landingPage = '/',
notFoundPage = '/*',
languagesPage = '/languages',
mergeReadiness = '/merge-readiness',
}
const routes: RouteType[] = [
{
Expand Down Expand Up @@ -103,25 +113,45 @@ const routes: RouteType[] = [
component: FAQ,
},
{
path: routesEnum.teku,
path: routesEnum.besu,
exact: true,
component: Teku,
component: Besu,
},
{
path: routesEnum.prysm,
path: routesEnum.erigon,
exact: true,
component: Prysm,
component: Erigon,
},
{
path: routesEnum.nimbus,
path: routesEnum.geth,
exact: true,
component: Nimbus,
component: Geth,
},
{
path: routesEnum.lighthouse,
exact: true,
component: Lighthouse,
},
{
path: routesEnum.nethermind,
exact: true,
component: Nethermind,
},
{
path: routesEnum.nimbus,
exact: true,
component: Nimbus,
},
{
path: routesEnum.prysm,
exact: true,
component: Prysm,
},
{
path: routesEnum.teku,
exact: true,
component: Teku,
},
{
path: routesEnum.phishingPage,
exact: true,
Expand All @@ -142,6 +172,11 @@ const routes: RouteType[] = [
exact: true,
component: TopUpPage,
},
{
path: routesEnum.mergeReadiness,
exact: true,
component: MergeReadiness,
},
{ path: routesEnum.landingPage, exact: true, component: LandingPage },
// NOTE: this wildcard route must be the last index of the routes array
{ path: routesEnum.notFoundPage, component: NotFoundPage },
Expand Down
51 changes: 45 additions & 6 deletions src/components/AppBar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { RouteComponentProps, withRouter } from 'react-router-dom';
import { FormattedMessage } from 'react-intl';
import styled from 'styled-components';
import { Box, DropButton } from 'grommet';
import { Menu, Language, FormDown } from 'grommet-icons';
Expand All @@ -26,7 +27,6 @@ import {
EL_TESTNET_NAME,
} from '../utils/envVars';
import useMobileCheck from '../hooks/useMobileCheck';
import { FormattedMessage } from 'react-intl';

const RainbowBackground = styled(Box)`
background-image: ${p => `linear-gradient(to right, ${p.theme.rainbow})`};
Expand Down Expand Up @@ -212,11 +212,29 @@ const _AppBar = ({ location }: RouteComponentProps) => {
}
dropAlign={{ top: 'bottom', right: 'right' }}
dropContent={
<Box pad="small">
<DropdownLink to={routesEnum.lighthouse}>Lighthouse</DropdownLink>
<DropdownLink to={routesEnum.nimbus}>Nimbus</DropdownLink>
<DropdownLink to={routesEnum.prysm}>Prysm</DropdownLink>
<DropdownLink to={routesEnum.teku}>Teku</DropdownLink>
<Box pad="medium">
<Text className="my10">
<b>Execution clients</b>
</Text>
<Box pad="small">
<DropdownLink to={routesEnum.besu}>Besu</DropdownLink>
<DropdownLink to={routesEnum.erigon}>Erigon</DropdownLink>
<DropdownLink to={routesEnum.geth}>Geth</DropdownLink>
<DropdownLink to={routesEnum.nethermind}>
Nethermind
</DropdownLink>
</Box>
<Text className="my10">
<b>Consensus clients</b>
</Text>
<Box pad="small">
<DropdownLink to={routesEnum.lighthouse}>
Lighthouse
</DropdownLink>
<DropdownLink to={routesEnum.nimbus}>Nimbus</DropdownLink>
<DropdownLink to={routesEnum.prysm}>Prysm</DropdownLink>
<DropdownLink to={routesEnum.teku}>Teku</DropdownLink>
</Box>
</Box>
}
/>
Expand Down Expand Up @@ -250,6 +268,16 @@ const _AppBar = ({ location }: RouteComponentProps) => {
<FormattedMessage defaultMessage="Top Up" />
</BarLinkText>
</Link>
<Link to={routesEnum.mergeReadiness} className="mx10 secondary-link">
<BarLinkText
level={4}
margin="none"
className="bar-link-text"
active={pathname === routesEnum.mergeReadiness}
>
<FormattedMessage defaultMessage="The Merge" />
</BarLinkText>
</Link>
</NavBarLinks>
<NavLinksRight>
{!mobile && (
Expand Down Expand Up @@ -321,6 +349,17 @@ const _AppBar = ({ location }: RouteComponentProps) => {
<DropdownLink to={routesEnum.languagesPage}>
<FormattedMessage defaultMessage="Languages" />
</DropdownLink>
<Text className="my20">
<b>
<FormattedMessage defaultMessage="Execution clients" />
</b>
</Text>
<DropdownLink to={routesEnum.besu}>Besu</DropdownLink>
<DropdownLink to={routesEnum.erigon}>Erigon</DropdownLink>
<DropdownLink to={routesEnum.geth}>Geth</DropdownLink>
<DropdownLink to={routesEnum.nethermind}>
Nethermind
</DropdownLink>
<Text className="my20">
<b>
<FormattedMessage defaultMessage="Consensus clients" />
Expand Down
61 changes: 61 additions & 0 deletions src/components/ClientMergeNotification.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import React from 'react';
import { FormattedMessage } from 'react-intl';
import { Link } from './Link';
import { Alert } from './Alert';
import { Text } from './Text';

export const ClientMergeNotification = (props: {
client: string;
isConsensus?: boolean;
}): JSX.Element => {
const { client, isConsensus = false } = props;
return (
<Alert variant="warning" className="my40">
<Text>
<FormattedMessage
defaultMessage="{client} is a {layerType}."
values={{
client,
layerType: (
<em>
{isConsensus ? (
<FormattedMessage defaultMessage="consensus client" />
) : (
<FormattedMessage defaultMessage="execution client" />
)}
</em>
),
}}
/>
</Text>
<Text className="my10">
{isConsensus ? (
<FormattedMessage
defaultMessage="Merge Readiness: In addition to a consensus client, after the Merge node operators must also run an {alternateClient} to remain active."
values={{
alternateClient: (
<Link primary inline to="/checklist/#el-client">
<FormattedMessage defaultMessage="execution client" />
</Link>
),
}}
/>
) : (
<FormattedMessage
defaultMessage="Merge Readiness: In addition to an execution client, after the Merge node operators must also run an {alternateClient} to remain active."
values={{
alternateClient: (
<Link primary inline to="/checklist/#cl-client">
<FormattedMessage defaultMessage="consensus client" />
</Link>
),
}}
/>
)}
</Text>
<Link primary inline to="/merge-readiness">
<FormattedMessage defaultMessage="Merge readiness checklist" />
</Link>
</Alert>
);
};
26 changes: 26 additions & 0 deletions src/components/MergeNotification.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from 'react';
import { FormattedMessage } from 'react-intl';
import styled from 'styled-components';
import { Link } from './Link';
import { Alert } from './Alert';

const StyledAlert = styled(Alert)`
text-align: center;
`;

export const MergeNotification = (): JSX.Element => {
return (
<StyledAlert variant="warning" round="none" pad="small">
<FormattedMessage
defaultMessage="Attention stakers: The Merge is approaching! Review the {mergeReadinessChecklist} to make sure you're ready."
values={{
mergeReadinessChecklist: (
<Link primary inline to="/merge-readiness">
<FormattedMessage defaultMessage="Merge readiness checklist" />
</Link>
),
}}
/>
</StyledAlert>
);
};
10 changes: 8 additions & 2 deletions src/components/PageTemplate.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import React from 'react';
import styled from 'styled-components';
import { Helmet } from 'react-helmet';
import { RouteComponentProps, withRouter } from 'react-router-dom';
import styled from 'styled-components';
import { AppBar } from './AppBar';
import { Heading } from './Heading';
import { Helmet } from 'react-helmet';
import { MergeNotification } from './MergeNotification';
import { routesEnum } from '../Routes';

const Content = styled.div`
width: 100%;
Expand Down Expand Up @@ -39,6 +41,9 @@ const _PageTemplate = ({
title,
header = title,
}: Props): JSX.Element => {
const isMergeReadinessPage = window.location.pathname
.substring(3)
.includes(routesEnum.mergeReadiness);
return (
<RainbowBackground>
<Helmet>
Expand All @@ -50,6 +55,7 @@ const _PageTemplate = ({
<meta property="twitter:description" content={description} />
</Helmet>
<AppBar />
{!isMergeReadinessPage && <MergeNotification />}
<Gutter>
<Content>
<Heading level={2} size="medium" color="blueDark" className="mb40">
Expand Down
Loading