Skip to content

V2 - New preset v2-mst-aptd-gcms-lcz-sty with hybrid SSG/SSR instead of SSR-only (based on v1-ssr-mst-aptd-gcms-lcz-sty)#68

Open
Vadorequest wants to merge 459 commits into
v1-ssr-mst-aptd-gcms-lcz-styfrom
v2-mst-aptd-gcms-lcz-sty
Open

V2 - New preset v2-mst-aptd-gcms-lcz-sty with hybrid SSG/SSR instead of SSR-only (based on v1-ssr-mst-aptd-gcms-lcz-sty)#68
Vadorequest wants to merge 459 commits into
v1-ssr-mst-aptd-gcms-lcz-styfrom
v2-mst-aptd-gcms-lcz-sty

Conversation

@Vadorequest
Copy link
Copy Markdown
Member

@Vadorequest Vadorequest commented May 30, 2020

Demos

Status

This PR/branch is stable and has been added as the new official/default NRN preset.

We still have some features to implement, but they're secondary.

Notes

This PR is not meant to be merged, but to provide a diff against the base branch (which was a preset using SSR-only, and has been deprecated now that v2 is released)

PR from #42 (preset branch was renamed, thus forcing us to open a new PR), useful for extra context (discussions about technical implementation)


New features in this PR:

  • Language detection and redirect to preferred language (using experimental redirects/rewrites)
  • Sub locales support - fr, en, fr-FR and en-US are possible (change url directly to see it in action, or use the footer language icon)
  • Use of hooks in favour of HOCs whenever better
  • SSG/SSR compatible Apollo client (GraphCMS backend for demo)
  • Automatic static optimisation enabled (no _app.getInitialProps)
  • SSG-first (my own personal goal is to use 100% SSG web apps, but we do support hybrid apps out of the box)
  • Reusable getStaticProps/getServerSideProps (not supported to use them app-wide in _app yet, so we made reusable helpers instead)
  • Proper rehydration and server/bowser reconciliation, following https://joshwcomeau.com/react/the-perils-of-rehydration
  • Examples with SSG/SSR, and dedicated SSG examples with fallback/revalidate options
  • Improved errors handling (top-level, etc.)
  • Next.js v9.4.0
  • Track perfs statistics "web-vitals-metrics"
  • Complete redesign of the demo app (v2)

Roadmap - In progress

Roadmap - Backlog

  • E2E (tests or redirections, url rewriting, navigation, i18n-related features)

Done

Optional other improvements

On hold (stuck, any help appreciated)

Known bugs

All fixed

@Vadorequest
Copy link
Copy Markdown
Member Author

[GitHub Actions]
Deployment SUCCESS
Commit e370bf5 successfully deployed to https://nrn-v1-hyb-mst-aptd-gcms-lcz-sty-c1-ao0l3r888.now.sh
Deployment aliased as https://v2-mst-aptd-gcms-lcz-sty.now.sh

@Vadorequest Vadorequest added the preset-branch This branch is a preset and is not meant to be merged, but to be used as a DIFF tool for learning. label May 30, 2020
@Vadorequest
Copy link
Copy Markdown
Member Author

[GitHub Actions]
Deployment SUCCESS
Commit 27919d0 successfully deployed to https://nrn-v2-mst-aptd-gcms-lcz-sty-c1-4p23y8r43.now.sh
Deployment aliased as https://v2-mst-aptd-gcms-lcz-sty.now.sh

@Vadorequest
Copy link
Copy Markdown
Member Author

[GitHub Actions]
E2E tests FAILED
Download artifacts (screenshots + videos) from checks section at the top

@Vadorequest
Copy link
Copy Markdown
Member Author

[GitHub Actions]
Deployment SUCCESS
Commit 9816507 successfully deployed to https://nrn-v2-mst-aptd-gcms-lcz-sty-c1-6yil4uia1.now.sh
Deployment aliased as https://v2-mst-aptd-gcms-lcz-sty.now.sh

@Vadorequest
Copy link
Copy Markdown
Member Author

[GitHub Actions]
E2E tests SUCCESS

@Vadorequest
Copy link
Copy Markdown
Member Author

[GitHub Actions]
Deployment SUCCESS
Commit 199a540 successfully deployed to https://nrn-v2-mst-aptd-gcms-lcz-sty-c1-4tcdjsq1t.now.sh
Deployment aliased as https://v2-mst-aptd-gcms-lcz-sty.now.sh

@Vadorequest
Copy link
Copy Markdown
Member Author

[GitHub Actions]
Deployment SUCCESS
Commit 337fb99 successfully deployed to https://nrn-v2-mst-aptd-gcms-lcz-sty-c1-c8i45yt8m.now.sh
Deployment aliased as https://v2-mst-aptd-gcms-lcz-sty.now.sh

@Vadorequest
Copy link
Copy Markdown
Member Author

[GitHub Actions]
Deployment SUCCESS
Commit df72481 successfully deployed to https://nrn-v2-mst-aptd-gcms-lcz-sty-c1-q5pe4nyup.now.sh
Deployment aliased as https://v2-mst-aptd-gcms-lcz-sty.now.sh

@Vadorequest
Copy link
Copy Markdown
Member Author

[GitHub Actions]
Deployment SUCCESS
Commit fd494c6 successfully deployed to https://nrn-v2-mst-aptd-gcms-lcz-sty-c1-knuljgn6i.now.sh
Deployment aliased as https://v2-mst-aptd-gcms-lcz-sty.now.sh

Comment thread src/pages/[locale]/examples/built-in-utilities/api.tsx Outdated
@Vadorequest
Copy link
Copy Markdown
Member Author

[GitHub Actions]
Deployment FAILED
Commit 628f205 failed to deploy to (click to see logs)

@Vadorequest
Copy link
Copy Markdown
Member Author

[GitHub Actions]
Deployment SUCCESS
Commit 119a4a2 successfully deployed to https://nrn-v2-mst-aptd-gcms-lcz-sty-c1-k0jrkvp5p.now.sh
Deployment aliased as https://v2-mst-aptd-gcms-lcz-sty.now.sh

Comment thread src/utils/data/record.ts
…e been removed a long time ago, was installed as dep)
@Vadorequest
Copy link
Copy Markdown
Member Author

[GitHub Actions]
Deployment SUCCESS
Commit 2888c12 successfully deployed to https://nrn-v2-mst-aptd-gcms-lcz-sty-c1-an7m6e32c.now.sh
Deployment aliased as https://v2-mst-aptd-gcms-lcz-sty.now.sh

@Vadorequest
Copy link
Copy Markdown
Member Author

Vadorequest commented Jun 3, 2020

E2E are failing again, seems related to vercel. Maybe they changed something, the tests aren't applied on the deployment but on vercel's homepage.


Well, it's working again... I noticed it those few days, seems random, probably a latency issue making tests run too early, before Vercel page is ready?

…turn props under nested "props" key (keep similar API between SSG and SSR, better code reusability)
@Vadorequest
Copy link
Copy Markdown
Member Author

[GitHub Actions]
Deployment SUCCESS
Commit 0c3fe60 successfully deployed to https://nrn-v2-mst-aptd-gcms-lcz-sty-c1-d9p099cui.now.sh
Deployment aliased as https://v2-mst-aptd-gcms-lcz-sty.now.sh

@Vadorequest
Copy link
Copy Markdown
Member Author

[GitHub Actions]
Deployment SUCCESS
Commit bd308fe successfully deployed to https://nrn-v2-mst-aptd-gcms-lcz-sty-c1-8e2pauc1h.now.sh
Deployment aliased as https://v2-mst-aptd-gcms-lcz-sty.now.sh

@Vadorequest
Copy link
Copy Markdown
Member Author

[GitHub Actions]
Deployment SUCCESS
Commit 0fd1aae successfully deployed to https://nrn-v2-mst-aptd-gcms-lcz-sty-c1-5y65ioi14.now.sh
Deployment aliased as https://v2-mst-aptd-gcms-lcz-sty.now.sh

… files + extended Jest with jest-to-match-shape-of + fix conflict between package.json:jest and jest.config.js - See jestjs/jest#10123

Fix jest config setupFilesAfterEnv (conflict between package.json:jest and jest.config.js) - See jestjs/jest#10123

Make jest load env variables from .env* files (in the correct order)

Extend Jest with jest-to-match-shape-of

Remove node-fetch polyfill for Jest and polyfill with "Next" instead - See vercel/next.js#13678 (comment)
@github-actions
Copy link
Copy Markdown

✅  Deployment SUCCESS
Commit c414b40 successfully deployed Storybook static site 📖 to https://nrn-v2-mst-aptd-gcms-lcz-sty-storybook-6tn7ciqvu-unly-oss.vercel.app
Deployment aliases (1): nrn-v2-mst-aptd-gcms-lcz-sty-storybook.vercel.app

@github-actions
Copy link
Copy Markdown

✅  E2E tests SUCCESS for commit c414b40 previously deployed Storybook static site at https://nrn-v2-mst-aptd-gcms-lcz-sty-storybook-6tn7ciqvu-unly-oss.vercel.app

@github-actions
Copy link
Copy Markdown

✅  Deployment SUCCESS
Commit 82aad2f successfully deployed Storybook static site 📖 to https://nrn-v2-mst-aptd-gcms-lcz-sty-storybook-7ow8to4in-unly-oss.vercel.app
Deployment aliases (1): nrn-v2-mst-aptd-gcms-lcz-sty-storybook.vercel.app

@github-actions
Copy link
Copy Markdown

✅  E2E tests SUCCESS for commit 82aad2f previously deployed Storybook static site at https://nrn-v2-mst-aptd-gcms-lcz-sty-storybook-7ow8to4in-unly-oss.vercel.app

@github-actions
Copy link
Copy Markdown

✅  Deployment SUCCESS
Commit 6a27688 successfully deployed Storybook static site 📖 to https://nrn-v2-mst-aptd-gcms-lcz-sty-storybook-kuc2fbtlb-unly-oss.vercel.app
Deployment aliases (1): nrn-v2-mst-aptd-gcms-lcz-sty-storybook.vercel.app

@github-actions
Copy link
Copy Markdown

✅  E2E tests SUCCESS for commit 6a27688 previously deployed Storybook static site at https://nrn-v2-mst-aptd-gcms-lcz-sty-storybook-kuc2fbtlb-unly-oss.vercel.app

* Refactor Sentry, split code between files depending on usage (browser/server/universal)

* Always flush Sentry in API endpoints

* Always flush Sentry in _error handling
@github-actions
Copy link
Copy Markdown

✅  Deployment SUCCESS
Commit 9b72578 successfully deployed Storybook static site 📖 to https://nrn-v2-mst-aptd-gcms-lcz-sty-storybook-nffrll0ij-unly-oss.vercel.app
Deployment aliases (1): nrn-v2-mst-aptd-gcms-lcz-sty-storybook.vercel.app

@github-actions
Copy link
Copy Markdown

✅  E2E tests SUCCESS for commit 9b72578 previously deployed Storybook static site at https://nrn-v2-mst-aptd-gcms-lcz-sty-storybook-nffrll0ij-unly-oss.vercel.app

@github-actions
Copy link
Copy Markdown

✅  Deployment SUCCESS
Commit a5ad627 successfully deployed Storybook static site 📖 to https://nrn-v2-mst-aptd-gcms-lcz-sty-storybook-gfu1195c7-unly-oss.vercel.app
Deployment aliases (1): nrn-v2-mst-aptd-gcms-lcz-sty-storybook.vercel.app

@github-actions
Copy link
Copy Markdown

✅  E2E tests SUCCESS for commit a5ad627 previously deployed Storybook static site at https://nrn-v2-mst-aptd-gcms-lcz-sty-storybook-gfu1195c7-unly-oss.vercel.app

* Re-export Sentry from init (DX) and call init from error endpoint to see if it fixes the issue with flush() timeout

* Improve sentry init documentation + rollback to timeout 2s + auto-init Sentry when using configureReq

* Implement better error handling on _error page (enrich Sentry metadata from req object)

* Fix 404 error handling and reporting to Sentry

* Improve documentation about error handling

* Upgrade Sentry to latest (minor)
@github-actions
Copy link
Copy Markdown

✅  Deployment SUCCESS
Commit 5ea63ac successfully deployed Storybook static site 📖 to https://nrn-v2-mst-aptd-gcms-lcz-sty-storybook-fzs6017tx-unly-oss.vercel.app
Deployment aliases (1): nrn-v2-mst-aptd-gcms-lcz-sty-storybook.vercel.app

@github-actions
Copy link
Copy Markdown

✅  E2E tests SUCCESS for commit 5ea63ac previously deployed Storybook static site at https://nrn-v2-mst-aptd-gcms-lcz-sty-storybook-fzs6017tx-unly-oss.vercel.app

@github-actions
Copy link
Copy Markdown

✅  Deployment SUCCESS
Commit 06a6a37 successfully deployed Storybook static site 📖 to https://nrn-v2-mst-aptd-gcms-lcz-sty-storybook-3kgtlv1hh-unly-oss.vercel.app
Deployment aliases (1): nrn-v2-mst-aptd-gcms-lcz-sty-storybook.vercel.app

@github-actions
Copy link
Copy Markdown

✅  E2E tests SUCCESS for commit 06a6a37 previously deployed Storybook static site at https://nrn-v2-mst-aptd-gcms-lcz-sty-storybook-3kgtlv1hh-unly-oss.vercel.app

@github-actions
Copy link
Copy Markdown

❌  Deployment FAILED
Commit c5d5eb9 failed to deploy Storybook static site to
click to see logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preset-branch This branch is a preset and is not meant to be merged, but to be used as a DIFF tool for learning. preset-released Preset that's been released and is ready to be used

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants