ethereum-org-website icon indicating copy to clipboard operation
ethereum-org-website copied to clipboard

Create NetworkUpgradeSummary component for history page

Open minimalsm opened this issue 3 years ago • 2 comments

Description

This PR refactors repeating elements in the History markdown page into a 'NetworkUpgradesComponent'.

Some issues with the previous implementation.

Additional context

Currently, I've only updated a few to test there are no visual regressions. We should update the entire history page to use the component if we want to use this approach.

We could also quite quickly create these JSON strings manually for the languages that already have the history page translated if we felt that would be worthwhile.

Related Issue

Ongoing translation efforts

minimalsm avatar Jul 26 '22 21:07 minimalsm

:white_check_mark: ethereum-org-website-dev deploy preview ready

gatsby-cloud[bot] avatar Jul 26 '22 21:07 gatsby-cloud[bot]

@minimalsm I like this overall! One thought I had, what about storing all of the data we're passing as props in a historical data file, then import that into the NetworkUpgradeSummary.tsx component, and just pass some type of id (upgrade name would work) to then grab the available data and render the component?

ie:

<NetworkUpgradeSummary name="altair" />

...then all of this is fetched within NetworkUpgradeSummary.tsx:

dateTimeAsString="Oct-27-2021 10:56:23 AM +UTC"
epochNumber={74240}
ethPriceInUSD={4024}
waybackLink="https://web.archive.org/web/20211026174951/https://ethereum.org/en/"

I think it would help clean up the props and reduce chances of markdown formatting issues with translations.

Awesome idea @wackerow!

This approach is much cleaner, should help eliminate accidental translations, and lets us keep the markdown component to one line ❤️

minimalsm avatar Jul 28 '22 13:07 minimalsm

@minimalsm Any update here? Seems to have gone stall, perhaps we open this up for the community?

wackerow avatar Mar 11 '23 02:03 wackerow