Skip to content

Commit b318698

Browse files
committed
fix(frontend): add dsfr banner
1 parent c156307 commit b318698

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

packages/frontend/src/app/app.component.html

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,39 @@
3636
</nav>
3737
<app-help-modal></app-help-modal>
3838

39+
<div
40+
*ngIf="!dsfrBannerClosed"
41+
class="alert alert-info text-center mb-0 rounded-0 d-print-none alert-dismissible"
42+
role="alert"
43+
>
44+
<div class="container py-1">
45+
<p class="mb-0">
46+
🖌️
47+
<strong
48+
>Changement de design du site DomiFa prévu le mercredi 29 avril
49+
2026</strong
50+
><br />
51+
Dans le cadre de l'amélioration continue des services publics en ligne,
52+
notre site adopte le design de l'État afin de renforcer sa lisibilité et
53+
son accessibilité. <br />Cette évolution est sans impact sur vos
54+
démarches, vos accès et vos données.
55+
<a
56+
href="https://pyassine.github.io/domifa-dsfr-docs/"
57+
target="_blank"
58+
rel="noopener noreferrer"
59+
(click)="trackDsfrBannerClick()"
60+
>Découvrez les exemples de changement à venir.</a
61+
>
62+
</p>
63+
<button
64+
type="button"
65+
class="btn-close"
66+
aria-label="Fermer le message"
67+
(click)="closeDsfrBanner()"
68+
></button>
69+
</div>
70+
</div>
71+
3972
<app-navbar [me]="me"></app-navbar>
4073

4174
<main role="main" id="page">

packages/frontend/src/app/app.component.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export class AppComponent implements OnInit, OnDestroy {
5050
private readonly subscription = new Subscription();
5151

5252
public readonly partnerLinks = LIENS_PARTENAIRES;
53+
public dsfrBannerClosed = false;
5354

5455
constructor(
5556
private readonly authService: AuthService,
@@ -65,6 +66,8 @@ export class AppComponent implements OnInit, OnDestroy {
6566
this.submitted = false;
6667
this.loading = false;
6768
this.me = null;
69+
this.dsfrBannerClosed =
70+
sessionStorage.getItem("dsfr-banner-closed") === "true";
6871
this.initCguForm();
6972
this.checkMatomo();
7073
}
@@ -216,6 +219,20 @@ export class AppComponent implements OnInit, OnDestroy {
216219
});
217220
}
218221

222+
public trackDsfrBannerClick(): void {
223+
this.matomo.trackEvent(
224+
"DSFR_MIGRATION",
225+
"BANNER_LINK_CLICK",
226+
"PREVIEW_DOCS",
227+
1
228+
);
229+
}
230+
231+
public closeDsfrBanner(): void {
232+
this.dsfrBannerClosed = true;
233+
sessionStorage.setItem("dsfr-banner-closed", "true");
234+
}
235+
219236
public closeModals(): void {
220237
this.modalService.dismissAll();
221238
}

0 commit comments

Comments
 (0)