-
Notifications
You must be signed in to change notification settings - Fork 1
react router v7 as a framework (SPA mode) rewrite #28
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
base: main
Are you sure you want to change the base?
Conversation
Updated translations.
| COPY ./package.json package-lock.json /app/ | ||
| WORKDIR /app | ||
| RUN npm ci --omit=dev | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On en a encore besoin de ça?
| Install the dependencies: | ||
|
|
||
| ```bash | ||
| npm install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Est-ce que tu pourrais adapter le readme à Yarn et checker si le docker ne va pas nous générer un package.lock.json? Ou supprimer le ReadMe et a partie docker
| "react-refresh": reactRefresh.configs.vite, | ||
| }, | ||
| rules: { | ||
| ...reactHooks.configs.recommended.rules, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il y a un réglage ou un plugging vscode qui manque, il n'y a pas de warning quand il manque une dépendance dans les useEffect. C'est un des réglages les plus importants
|
|
||
| html, | ||
| body { | ||
| min-height: 100vh; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Peux-tu utiliser du dvh à la place? Ça règle les problèmes des browser qui ne prennent pas en compte quand le clavier est visible sur mobile
| Scripts, | ||
| ScrollRestoration, | ||
| } from "react-router"; | ||
| import type { Route } from "./+types/root"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'ai une erreur ici avec le path, est-ce qu'il y a des réglages manquants pour que ça ne soit pas le cas
| ); | ||
| } | ||
|
|
||
| export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ça gagnerait à être dans son propre component, je pense
| .cookie-banner { | ||
| width: 100%; | ||
| position: fixed; | ||
| /* stylelint-disable-next-line custom-property-pattern */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pas moyen de désactiver le réglage dans eslint au lieu de plouer les css avec ça?
| <Link | ||
| className="mr-a" | ||
| href={t("cookie_consent_link")} | ||
| sx={(theme) => ({ marginRight: theme.customProperties.spacing.a })} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est pas bon d'utiliser le spacing de mui par multiple de 8 avec theme.spacing(x)?
Je suis encore traumatisée par toutes les variables de Bootstrap où je retenais pas qu'est-ce qui valait quoi, je devais toujours avoir le fichier des variables ouvert :')
|
|
||
| Note that the path to the locales in these files is different (`#assets` instead of the expcted `@assets`). | ||
| When using react router as a framework, the routes are built via a vite.js plugin, running in node.js (not in the browser). | ||
| The alias here is different than the one define in the tsconfig file. This alias comes from the `imports` property in the package.json file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The alias here is different than the one define in the tsconfig file. This alias comes from the `imports` property in the package.json file. | |
| The alias here is different than the one defined in the tsconfig file. This alias comes from the `imports` property in the package.json file. |
| **`On subsequent renders`**, the `useSuspenseQuery` hook will return stale data while fetching any new data. | ||
|
|
||
| - **Pros**: The `useSuspenseQuery` hook ensures the component only renders when data is available. | ||
| - **Pros**: The `useSuspenseQuery` returns stale data immediately (if available) while new data is fetched. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Est-ce que c'est vraiment un pro dans toutes les situations ? Est-ce que ce comportement est configurable ?
|
|
||
| This ensures that the dashboard route is only accessible to authenticated users. | ||
|
|
||
| At the moment, react rouvet v7 does not support middlewares (it is planned though). You have a couple of options as to **where** to use the `clientLoaderAuthGuard`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| At the moment, react rouvet v7 does not support middlewares (it is planned though). You have a couple of options as to **where** to use the `clientLoaderAuthGuard`: | |
| At the moment, react router v7 does not support middlewares (it is planned though). You have a couple of options as to **where** to use the `clientLoaderAuthGuard`: |
| "https://docs.google.com/spreadsheets/d/e/2PACX-1vQe6sBfW-7S3xGPlYVaOB8v39yfZHx0FqCOeGEChuWlkObw-F5EsuVag_olya-psWYyKOuCl9y8ZGcf/pub?gid=1136921178&single=true&output=csv", | ||
| // Uikit | ||
| "https://docs.google.com/spreadsheets/d/e/2PACX-1vQe6sBfW-7S3xGPlYVaOB8v39yfZHx0FqCOeGEChuWlkObw-F5EsuVag_olya-psWYyKOuCl9y8ZGcf/pub?gid=268501364&single=true&output=csv", | ||
| // Settings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Est-ce qu'on a une update par rapport à TI/la sécurité en utilisant google sheet pour la localisation ?
| @@ -12,13 +12,14 @@ The goal is to standardize how we build web projects in the company. | |||
|
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On veut peut-être donner une version spécifique de Yarn à viser. On peut peut-être aussi linker vers la doc qui est dans /frontend/ directement, plutôt que donner une première étape ici mais le reste dans l'autre README
|
|
||
| To see the logs directly in your console, you can remove the -d flag. Otherwise, you can view output in Docker Desktop. | ||
|
|
||
| ## Update locale files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je pense qu'on pourrait conserver cette section, ainsi que la section "File structure" en dessous
Proposed Changes
What is the new behaviour?
Complete rewrite of the template, now using react router v7 as a framework.
It includes complete examples of:
Checklist
Please check that your PR fulfills the following requirements:
Other information