Skip to content

Conversation

@hbalty
Copy link
Contributor

@hbalty hbalty commented Jan 24, 2026

No description provided.

@revu-bot revu-bot bot requested a review from revu-bot January 24, 2026 01:32
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
20.4% Duplication on New Code (required ≤ 15%)
D Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copy link
Collaborator

@revu-bot revu-bot left a 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.

Comment on lines +1 to +29
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 {}
Copy link
Collaborator

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.

Comment on lines +211 to +221
<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">
Copy link
Collaborator

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.

Suggested change
<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">

Comment on lines +207 to +217
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"
Copy link
Collaborator

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.

Comment on lines +1 to +16
<!--
***************************** 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 *****************************
-->
Copy link
Collaborator

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.

Suggested change
<!--
***************************** 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>

Comment on lines +1 to +18
<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 *****************************
-->
Copy link
Collaborator

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.

Suggested change
<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>

Comment on lines +117 to 120
</div>

<!--
<div class="head-page py-4">
Copy link
Collaborator

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.

Suggested change
</div>
<!--
<div class="head-page py-4">
</div>

@tokenbureau
Copy link

tokenbureau bot commented Jan 24, 2026

🎉 Deployment for commit 3943b3b :

Ingresses
Docker images
  • 📦 docker pull harbor.fabrique.social.gouv.fr/domifa/domifa/backend:sha-3943b3b7458f1dd455ce0409f7a3c4d2bd897f41
  • 📦 docker pull harbor.fabrique.social.gouv.fr/domifa/domifa/frontend:sha-3943b3b7458f1dd455ce0409f7a3c4d2bd897f41
  • 📦 docker pull harbor.fabrique.social.gouv.fr/domifa/domifa/portail-admins:sha-3943b3b7458f1dd455ce0409f7a3c4d2bd897f41
  • 📦 docker pull harbor.fabrique.social.gouv.fr/domifa/domifa/portail-usagers:sha-3943b3b7458f1dd455ce0409f7a3c4d2bd897f41
Debug

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants