Skip to content

Commit

Permalink
Update Next 13 & DSFR Integration (#1388)
Browse files Browse the repository at this point in the history
Integration of https://github.com/dataesr/react-dsfr for header and footer

 ⬆️ Update NextJS 12 => 13 (React 18)
 ➕ Install dsfr for React
 Numerous dependencies upgrades
 💄 Change global font for Marianne
 🐛 Prevent NPE when themes are not loaded
 ✨ Creation of the header in DSFR format
 ✨ Creation of the footer in DSFR format
 ✨ Creation of the backend header in DSFR format
 🌍 Add translations
 🧪 Update tests
Impacts :

Image import => using legacy mode
Linter : most of modified files are linted by prettier
reacti18n : rewrites to Typescript => typings adapations
links : use legacyBehavior on every pre-existing <Link> (to be processed later)
SubscribeNewsletterModal rewrites to use redux for is state (show / hide)

----

* feat: ⬆️ Upgrade Next

feat: ⬆️ Upgrade to Next 12.2
Modify i18n configuration : i18next/next-i18next#1920 / https://github.com/i18next/next-i18next#passing-other-config-options
Rename middleware file : https://nextjs.org/docs/messages/middleware-upgrade-guide#how-to-upgrade

fix: 🐛 Fix typing bug => src take only string input

chore: ⬆️ Upgrade i18next version 22

wip

refactor: ⬆️ Run next-image-to-legacy-image codemod

fix: 🐛 Fix middleware.ts folder

fix: ♻️ Fix TS linter error with react-i18next mainly

chore: ⬆️ Upgrade some dependencies

chore: ⬆️ Upgrades dependencies

fix: ♻️ TS types fixes

chore: ⬆️ Upgrades dependencies

fix: ✅ 🚀

* chore: ➕ Install dsfr for React

* feat: 💄 Change global font for Marianne

* fix: 🐛 Prevent NPE when themes are not loaded

* feat: ✨ Creation of the header in DSFR format

* feat: ✨ Creation of the Footer & Backend Header in DSFR format

Many other adjustment after technical upgrades and UI updates

* fix: 🚸 The translation menu is visible even if the screen is small

* fix: 💄 Fix footer copyright label size
  • Loading branch information
sylvainlg committed Dec 7, 2022
1 parent 685c532 commit 9f2e1d0
Show file tree
Hide file tree
Showing 232 changed files with 22,943 additions and 30,754 deletions.
26 changes: 25 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,30 @@
],
"preLaunchTask": "tsc: build - server/tsconfig.json",
"program": "${workspaceFolder}/server/dist/server.js"
}
},
{
"name": "Next.js: debug server-side",
"type": "node-terminal",
"request": "launch",
"command": "cd client && npm run dev"
},
{
"name": "Next.js: debug client-side",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000"
},
{
"name": "Next.js: debug full stack",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev",
"serverReadyAction": {
"pattern": "started server on .+, url: (https?://.+)",
"uriFormat": "%s",
"action": "debugWithChrome"
}
}

]
}
18 changes: 9 additions & 9 deletions client/next-i18next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ module.exports = {
i18n: {
locales: ["default", "fr", "en", "ps", "fa", "ti", "ru", "ar", "uk"],
defaultLocale: "default",
localeDetection: false,
localePath: "./src/locales",
fallbackLng: "fr",

debug: false,
saveMissing: false,
interpolation: {
escapeValue: true, // react already safes from xss
},
localeDetection: false
},
debug: false,
fallbackLng: "fr",
localePath: "./src/locales",
saveMissing: false,
interpolation: {
escapeValue: true // react already safes from xss
},
returnNull: false
};
Loading

0 comments on commit 9f2e1d0

Please sign in to comment.