-
Notifications
You must be signed in to change notification settings - Fork 10
feat(frontend): integrating dsfr faq #4063
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: feat-init-frontend-dsfr
Are you sure you want to change the base?
Conversation
|
revu-bot
left a comment
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.
Summary
This PR refactors the FAQ section to use DSFR components with lazy-loaded routing and splits content into multiple components. The implementation is generally solid with good structure and accessibility considerations.
Key Changes
- ✅ Implements lazy-loaded routing for FAQ sections
- ✅ Splits FAQ into logical components (Discover, Usage, Security, Fiches, Video Tutorials)
- ✅ Uses DSFR accordion components for better UX
- ✅ Maintains accessibility with proper ARIA attributes
Issues Found
- CRITICAL: Duplicate accordion IDs will break accessibility and functionality
- IMPORTANT: Missing CommonModule import in routing module
- IMPORTANT: Inconsistent email obfuscation pattern
- MINOR: Commented-out code should be removed before merge
The refactoring improves maintainability significantly by breaking down a large monolithic FAQ into manageable components.
| import { NgModule } from "@angular/core"; | ||
| import { RouterModule, Routes } from "@angular/router"; | ||
| import { FaqComponent } from "./faq.component"; | ||
| import { FaqSecurityComponent } from "./fragments/faq-security/faq-security.component"; | ||
| import { FaqDiscoverComponent } from "./fragments/faq-discover/faq-discover.component"; | ||
| import { FaqUsageComponent } from "./fragments/faq-usage/faq-usage.component"; | ||
| import { FaqFichesComponent } from "./fragments/faq-fiches/faq-fiches.component"; | ||
| import { FaqVideoTutorialComponent } from "./fragments/faq-video-tutorial/faq-video-tutorial.component"; | ||
|
|
||
| const routes: Routes = [ | ||
| { | ||
| path: "", | ||
| component: FaqComponent, | ||
| children: [ | ||
| { path: "", redirectTo: "decouvrir-domifa", pathMatch: "full" }, | ||
| { path: "decouvrir-domifa", component: FaqDiscoverComponent }, | ||
| { path: "utiliser-domifa", component: FaqUsageComponent }, | ||
| { path: "securite-et-confidentialite", component: FaqSecurityComponent }, | ||
| { path: "fiches-pratiques", component: FaqFichesComponent }, | ||
| { path: "tutoriels-videos", component: FaqVideoTutorialComponent }, | ||
| ], | ||
| }, | ||
| ]; | ||
|
|
||
| @NgModule({ | ||
| imports: [RouterModule.forChild(routes)], | ||
| exports: [RouterModule], | ||
| }) | ||
| export class FaqRoutingModule {} |
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.
[IMPORTANT] Missing CommonModule import for standalone components
Why it matters:
- The routing module references standalone components that use CommonModule
- Without proper imports, the lazy-loaded module may fail at runtime
- Angular's module system requires explicit imports for dependencies
Recommendation:
While standalone components import CommonModule themselves, ensure the routing module is properly configured. Consider adding explicit imports if you encounter runtime issues.
| <button | ||
| type="button" | ||
| class="fr-accordion__btn" | ||
| aria-expanded="false" | ||
| aria-controls="accordion-usage-9" | ||
| > | ||
| Comment modifier les informations de la structure (adresse, nom du | ||
| responsable, paramètres) ? | ||
| </button> | ||
| </div> | ||
| <div class="fr-collapse" id="accordion-usage-9"> |
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.
[CRITICAL] Duplicate accordion IDs break accessibility and functionality
Why it matters:
- Multiple accordions use
id="accordion-usage-9"through the file - Duplicate IDs violate HTML standards and break ARIA relationships
- Screen readers and keyboard navigation will malfunction
- JavaScript accordion behavior will be unpredictable
Impact:
- Accessibility compliance failure
- Broken user experience for keyboard/screen reader users
- Only the first accordion with each ID will work correctly
Required action:
Ensure each accordion section has a unique ID. The IDs should increment sequentially (accordion-usage-1, accordion-usage-2, etc.) throughout the entire file.
| <button | |
| type="button" | |
| class="fr-accordion__btn" | |
| aria-expanded="false" | |
| aria-controls="accordion-usage-9" | |
| > | |
| Comment modifier les informations de la structure (adresse, nom du | |
| responsable, paramètres) ? | |
| </button> | |
| </div> | |
| <div class="fr-collapse" id="accordion-usage-9"> | |
| <button | |
| type="button" | |
| class="fr-accordion__btn" | |
| aria-expanded="false" | |
| aria-controls="accordion-usage-9" | |
| > | |
| Comment modifier les informations de la structure (adresse, nom du | |
| responsable, paramètres) ? | |
| </button> | |
| </div> | |
| <div class="fr-collapse" id="accordion-usage-9"> |
| Une structure peut à tout moment arrêter d'utiliser DomiFa. Dans son | ||
| compte administrateur, la structure peut exporter sa base de données si | ||
| besoin. Elle peut aussi supprimer l'entièreté des dossiers de | ||
| domiciliation sur la plateforme. | ||
| </p> | ||
| <p> | ||
| Pour une demande de suppression d'un compte structure, merci de nous | ||
| envoyer un message à l'adresse | ||
| <a | ||
| href="mailto:contact.domifa{{ '@' }}fabrique.social.gouv.fr" | ||
| title="Envoyer un email à l'équipe DomiFa" |
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.
[IMPORTANT] Inconsistent email obfuscation pattern
Why it matters:
- This file uses
{{ '@' }}and{{ "@" }}for email obfuscation - The faq-usage component uses plain
@in email addresses - Inconsistent patterns make maintenance harder and may indicate incomplete security measures
Recommendation:
Standardize the email obfuscation approach across all FAQ components. If obfuscation is needed for anti-spam, apply it consistently. If not needed, remove the template interpolation for cleaner code.
| <!-- | ||
| ***************************** Remove Block ***************************** | ||
| TODO : remettre le commentaires une fois que les fiches sont prêtes à être publiés | ||
| N'oubliez pas de mettre à jour les lien en cas de changement de support de partage (Ex: Docs) | ||
| ***************************** *********** ***************************** | ||
| --> | ||
|
|
||
| <h2 class="fr-h2">Fiches pratiques</h2> | ||
|
|
||
| <div class="fr-callout"> | ||
| <h3 class="fr-callout__title">Bientôt</h3> | ||
| <p class="fr-callout__text">Fiches pratiques à venir</p> | ||
| </div> | ||
| <!-- | ||
| ***************************** End Temporary Block ***************************** | ||
| --> |
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.
[MINOR] Remove commented-out code before merging
Why it matters:
- Large blocks of commented code (lines 1-15 and 18-296) reduce readability
- Version control already preserves history
- The TODO comment suggests this is temporary scaffolding
Recommendation:
If the fiches are truly coming soon, keep only the callout message. Remove all commented HTML to keep the codebase clean. You can always retrieve this code from git history when needed.
| <!-- | |
| ***************************** Remove Block ***************************** | |
| TODO : remettre le commentaires une fois que les fiches sont prêtes à être publiés | |
| N'oubliez pas de mettre à jour les lien en cas de changement de support de partage (Ex: Docs) | |
| ***************************** *********** ***************************** | |
| --> | |
| <h2 class="fr-h2">Fiches pratiques</h2> | |
| <div class="fr-callout"> | |
| <h3 class="fr-callout__title">Bientôt</h3> | |
| <p class="fr-callout__text">Fiches pratiques à venir</p> | |
| </div> | |
| <!-- | |
| ***************************** End Temporary Block ***************************** | |
| --> | |
| <h2 class="fr-h2">Fiches pratiques</h2> | |
| <div class="fr-callout"> | |
| <h3 class="fr-callout__title">Bientôt</h3> | |
| <p class="fr-callout__text">Fiches pratiques à venir</p> | |
| </div> |
| <h2 class="fr-h2">Tutoriels vidéos</h2> | ||
| <!-- | ||
| ***************************** Remove Block ***************************** | ||
| TODO : | ||
| - Les mettres les vidéos et leurs transcriptions | ||
| - Modifier les titles ID | ||
| - Modifier les liens / urls / chemins video | ||
| - Modifier les ids et les aria-controls pour lier les transcripts avec les vidéos | ||
| ***************************** *********** ***************************** | ||
| --> | ||
| <div class="fr-callout"> | ||
| <h3 class="fr-callout__title">Bientôt</h3> | ||
| <p class="fr-callout__text">Vidéos tutoriels à venir</p> | ||
| </div> | ||
| <!-- | ||
| ***************************** End Temporary Block ***************************** | ||
| --> |
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.
[MINOR] Remove commented-out video tutorial scaffolding
Why it matters:
- Similar to faq-fiches, this contains extensive commented code (lines 1-14 and 18-628)
- The TODO indicates this is placeholder content
- Keeping commented code bloats the file unnecessarily
Recommendation:
Remove all commented HTML scaffolding. Keep only the callout message indicating videos are coming soon.
| <h2 class="fr-h2">Tutoriels vidéos</h2> | |
| <!-- | |
| ***************************** Remove Block ***************************** | |
| TODO : | |
| - Les mettres les vidéos et leurs transcriptions | |
| - Modifier les titles ID | |
| - Modifier les liens / urls / chemins video | |
| - Modifier les ids et les aria-controls pour lier les transcripts avec les vidéos | |
| ***************************** *********** ***************************** | |
| --> | |
| <div class="fr-callout"> | |
| <h3 class="fr-callout__title">Bientôt</h3> | |
| <p class="fr-callout__text">Vidéos tutoriels à venir</p> | |
| </div> | |
| <!-- | |
| ***************************** End Temporary Block ***************************** | |
| --> | |
| <h2 class="fr-h2">Tutoriels vidéos</h2> | |
| <div class="fr-callout"> | |
| <h3 class="fr-callout__title">Bientôt</h3> | |
| <p class="fr-callout__text">Vidéos tutoriels à venir</p> | |
| </div> |
| </div> | ||
|
|
||
| <!-- | ||
| <div class="head-page py-4"> |
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.
[MINOR] Remove old FAQ implementation
Why it matters:
- 484 lines of commented-out legacy code (lines 118-602)
- This is the old FAQ implementation that's been replaced
- Keeping it makes the file unnecessarily large and harder to navigate
Recommendation:
Delete the entire commented block. The old implementation is preserved in git history if needed for reference.
| </div> | |
| <!-- | |
| <div class="head-page py-4"> | |
| </div> |




No description provided.