Skip to content

Commit a948b79

Browse files
yaaaxbellangerqhissalhtQuentin Bellangerbenoitdequick
authored
839 bug mauvaise position de lusager après utilisation des ancres pages dans le rapport (#945)
* Fix duplicate ids in errors and improvements tabs * Update CHANGELOG * Hide dropdown menu instead of removing it from DOM (#881) * Hide dropdown menu instead of removing it from DOM Note: no more smooth transition after this change * Update CHANGELOG * MAJ du label pour le nom de la procédure (#910) * update procedure name field label * update tests * use custom matomo vue plugin * MAJ du DSFR en 1.13.0 (#915) * update dsfr package version * fix audit update notes test * update changelog * Mise à jour de node en version 22.13.0 (#919) * update node version to 22.13 * add .nvmrc * smdlfjk * fix matomo url regex to anonymize urls * Supprime la page Contexte (#924) * remove context page links and usages * remove context page component and route * update changelog --------- Co-authored-by: Quentin Bellanger <hello@quentin-bellanger> * MAJ de la page données personnelles (#923) * update privacy page content * use thead and add border for tables * Fix typo * lint stuff --------- Co-authored-by: Benoît Dequick <33344370+benoitdequick@users.noreply.github.com> Co-authored-by: Quentin Bellanger <hello@quentin-bellanger> * MAJ du plan du site (#925) * add account dashboard, roadmpa and changelog pages to sitemap * add account, sitemap and contact pages to sitemap --------- Co-authored-by: Quentin Bellanger <hello@quentin-bellanger> * fix typo * Supprime la 1ere étape du changement de mot de passe dans le compte (#926) * skip first step * add test for already logged in passord reset * cleanup test * fix NewPasswordForm style * update changelog * add homepage in sitemap when not connected * 859 redondance de linformation en cours (#914) * replace list title with badges * remove status column in audit list * add progress bar value prop * add inline layout for progress bar * increase column gap in audits list * end align percentage * exlude transverse criteria to compute progress * fix duplication type * reduce space between progress bar and value * update changelog --------- Co-authored-by: Quentin Bellanger <hello@quentin-bellanger> * Génère les types des payloads de l'API (#722) * generate and copy api types on install * delete dist folder before generating types * disable config validation when generating types * use generated types in report * use more generated types * use generated types for account and audit listing * hide some props * use generated types in feedback form * generate prisma client before generating types * update dockerfile * clean up * add guideline * hotfix: fix backend dockerfile and a typing issue preventing build * Corrige un petit bug visuel de la liste des audits (#930) * adjust audit list grid columns * make audits list more mobile friendly * remove responsive tablet-like state --------- Co-authored-by: Quentin Bellanger <hello@quentin-bellanger> * Update CHANGELOG * feat(report): top alert message no more sticky * fix(report): scroll to anchor fixed * a hack has been added on DSFR tabs to remove overflow hidden, scroll to anchor then put back overflow hidden * the link behaviour has changed from an instant scroll to a smooth scroll (when javascript is enabled) * fix(ui): move tabs 0.1px up to hide the "one line scrolling backround" at the top * feat(AraTabs): add "icon" and "selectedTab" props * fix(report): remove tabs DSFR hack as planning to use AraTabs * feat(report): minor UI fixes * titles: in blue * results: smaller font * header: smaller bottom margin * feat(report): use AraTabs in Report * fix(AuditGenerationPage): stay on current tab on refresh * fit(ui): smooth scroll behavior (only if prefers-reduced-motion: no-preference) * Fix duplicate ids in errors and improvements tabs (#879) * Fix duplicate ids in errors and improvements tabs * Update CHANGELOG * Explicite louverture des livrables dans un nouvel onglet (#932) * modify steps * modify consult report link in audit page * update changelog * adjust download button * ignore account status * set copy link to secondary * update changelog * Refonte visuelle rapide du rapport (#929) * add separator between improvements + add count on top * remove tests & references accordion, error accordion and topic number * adjust spacing between errors and small css tweaks * update report tests wording * adjust example images size * update wording on report counts * lowercase improvements count * update changelog * update tests --------- Co-authored-by: Quentin Bellanger <hello@quentin-bellanger> * Update PrivacyPage.vue * Update CHANGELOG * fix(report): scroll to anchor fixed * a hack has been added on DSFR tabs to remove overflow hidden, scroll to anchor then put back overflow hidden * the link behaviour has changed from an instant scroll to a smooth scroll (when javascript is enabled) * fix(report): remove tabs DSFR hack as planning to use AraTabs * feat(report): minor UI fixes * titles: in blue * results: smaller font * header: smaller bottom margin * Update CHANGELOG * chore(ReportCriteria): remove useless code * fix(lint): please linter + fix non breakable spaces between « and » characters * fit(ui): remove smooth scroll behavior * chore(lint): authorize irregular whitespaces in texts For example, the non-breakable space, used in french. * fix(doc): modify CHANGELOG to better fit reality + simplify one sentence + add the 🐛 emoji * chore(ui): add comments to explain why -0.1px * chore(css): move filters CSS to a separate file --------- Co-authored-by: Quentin Bellanger <hello@quentin-bellanger.com> Co-authored-by: Adrien Boutigny <adrien@slash-tmp.dev> Co-authored-by: Quentin Bellanger <hello@quentin-bellanger> Co-authored-by: Benoît Dequick <33344370+benoitdequick@users.noreply.github.com>
1 parent 27649bb commit a948b79

10 files changed

Lines changed: 148 additions & 100 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ Tous les changements notables de Ara sont documentés ici avec leur date, leur c
66

77
### Corrections 🐛
88

9+
- Dans la page du rapport, lorsque l’un des deux onglets « Détails des non-conformités » ou « Points d’amélioration » est sélectionné, les liens présents dans le menu latéral de gauche pointent désormais correctement vers les différentes parties du rapport. ([#839](https://github.com/DISIC/Ara/issues/839))
10+
11+
### Autres changements ⚙️
12+
13+
- L’interface du rapport a été revue : la barre d’onglets et le menu latéral de gauche sont désormais positionnés « en adhérence » (_sticky_)
14+
- La page de création d’audit conserve l’onglet sélectionné lorsque l’on rafraichit la page
915
- Corrige la hiérarchie des titres et les annonces d’enregistrement pour les technologies d’assistance ([#933](https://github.com/DISIC/Ara/pull/933))
1016

1117
## 05/02/2025
@@ -608,7 +614,7 @@ Tous les changements notables de Ara sont documentés ici avec leur date, leur c
608614
### Autres changements ⚙️
609615

610616
- Mise à jour du DSFR en version `1.9.0` ([#326](https://github.com/DISIC/Ara/pull/326))
611-
- Mise à jour de l’adresse email de contact : ara@design.numerique.gouv.fr ([#328](https://github.com/DISIC/Ara/pull/328))
617+
- Mise à jour de l’adresse email de contact : <ara@design.numerique.gouv.fr> ([#328](https://github.com/DISIC/Ara/pull/328))
612618

613619
## 08/03/2023
614620

confiture-web-app/.eslintrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@
1717
},
1818
"rules": {
1919
"vue/multi-word-component-names": "off",
20+
"no-irregular-whitespace": "off",
21+
"vue/no-irregular-whitespace": [
22+
"error",
23+
{
24+
"skipStrings": true,
25+
"skipComments": true,
26+
"skipRegExps": true,
27+
"skipTemplates": true,
28+
"skipHTMLAttributeValues": true,
29+
"skipHTMLTextContents": true
30+
}
31+
],
2032
"vue/no-v-html": "off",
2133
"no-duplicate-imports": "error",
2234
"@typescript-eslint/no-explicit-any": "off",

confiture-web-app/src/components/audit/AraTabs.vue

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,18 @@
55
-->
66

77
<script setup lang="ts" generic="T">
8-
import { ref, watch } from "vue";
8+
import { type Component, ref, watch } from "vue";
99
1010
import { useUniqueId } from "../../composables/useUniqueId";
11-
import LayoutIcon from "../icons/LayoutIcon.vue";
1211
1312
const props = defineProps<{
14-
tabs: { label: string; data: T }[];
15-
stickyTop: string;
13+
tabs: {
14+
label: string;
15+
icon?: Component;
16+
data: T;
17+
}[];
18+
selectedTab?: number;
19+
stickyTop?: string;
1620
}>();
1721
1822
defineSlots<{
@@ -27,7 +31,7 @@ const uniqueId = useUniqueId();
2731
const tabId = (i: number) => "tab-" + uniqueId.value + "-" + i;
2832
const panelId = (i: number) => "panel-" + uniqueId.value + "-" + i;
2933
30-
const currentTab = ref(0);
34+
const currentTab = ref(props.selectedTab || 0);
3135
const tabControlRefs = ref<HTMLButtonElement[]>();
3236
3337
const selectNextTab = () => {
@@ -81,7 +85,9 @@ watch(currentTab, (currentTab) => {
8185
@keydown.home.prevent="selectFirstTab"
8286
@keydown.end.prevent="selectLastTab"
8387
>
84-
<LayoutIcon v-if="i === 0" class="fr-mr-2v" />{{ tab.label }}
88+
<component :is="tab.icon" v-if="tab.icon" class="fr-mr-2v" />{{
89+
tab.label
90+
}}
8591
</button>
8692
</li>
8793
</ul>

confiture-web-app/src/components/audit/AuditGenerationHeader.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,8 @@ onMounted(() => {
548548
549549
.sticky-indicator {
550550
position: sticky;
551-
top: 0;
551+
/* Prevent "one line background flickering" when scrolling the page */
552+
top: -0.1px;
552553
z-index: 4;
553554
gap: 0.5rem 0;
554555
align-items: center;

confiture-web-app/src/components/report/ReportCriteria.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function isActive(id: string) {
2323

2424
<template>
2525
<div class="main">
26-
<div class="sidebar">
26+
<div class="sidebar filters-wrapper">
2727
<nav class="fr-sidemenu fr-mb-3w" aria-label="Liste des pages">
2828
<div class="fr-sidemenu__inner">
2929
<button
@@ -86,7 +86,6 @@ function isActive(id: string) {
8686
</nav>
8787
<slot name="filter" />
8888
</div>
89-
9089
<div>
9190
<div class="fr-mb-5w">
9291
<p v-if="topNotice" class="fr-text--sm fr-mb-3w improvements-notice">
@@ -108,6 +107,7 @@ function isActive(id: string) {
108107
</template>
109108

110109
<style scoped>
110+
@import "../../styles/filters.css";
111111
.main {
112112
display: grid;
113113
grid-template-columns: 20rem minmax(0, 1fr);
@@ -118,8 +118,9 @@ function isActive(id: string) {
118118
box-shadow: inset -1px 0 0 0 var(--border-default-grey);
119119
}
120120
121-
.page-title {
121+
:deep(.page-title) {
122122
color: var(--text-active-blue-france);
123+
scroll-margin: 4rem;
123124
}
124125
125126
.fr-sidemenu__inner {
@@ -140,4 +141,8 @@ function isActive(id: string) {
140141
.improvements-notice {
141142
color: var(--text-mention-grey);
142143
}
144+
145+
.filters-wrapper {
146+
--filters-top-offset: 4.5rem;
147+
}
143148
</style>

confiture-web-app/src/pages/audit/AuditGenerationPage.vue

Lines changed: 49 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<script setup lang="ts">
2-
import { computed, onBeforeUnmount, ref, watch } from "vue";
3-
import { onBeforeRouteLeave, useRoute } from "vue-router";
2+
import { type Component, computed, onBeforeUnmount, ref, watch } from "vue";
3+
import { onBeforeRouteLeave, useRoute, useRouter } from "vue-router";
44
55
import AraTabs from "../../components/audit/AraTabs.vue";
66
import AuditGenerationFilters from "../../components/audit/AuditGenerationFilters.vue";
77
import AuditGenerationHeader from "../../components/audit/AuditGenerationHeader.vue";
88
import AuditGenerationPageCriteria from "../../components/audit/AuditGenerationPageCriteria.vue";
9+
import LayoutIcon from "../../components/icons/LayoutIcon.vue";
910
import PageMeta from "../../components/PageMeta";
1011
import { StatDonutTheme } from "../../components/StatDonut.vue";
1112
import BackLink from "../../components/ui/BackLink.vue";
@@ -15,9 +16,10 @@ import rgaa from "../../criteres.json";
1516
import { CRITERIA_BY_AUDIT_TYPE } from "../../criteria";
1617
import { useAuditStore, useFiltersStore, useResultsStore } from "../../store";
1718
import { AuditPage, AuditType, CriteriumResultStatus } from "../../types";
18-
import { pluralize } from "../../utils";
19+
import { pluralize, slugify } from "../../utils";
1920
2021
const route = useRoute();
22+
const router = useRouter();
2123
2224
const uniqueId = computed(() => route.params.uniqueId as string);
2325
const auditStore = useAuditStore();
@@ -77,14 +79,27 @@ const topics = computed(() => {
7779
7880
const auditIsInProgress = computed(() => resultsStore.auditProgress < 1);
7981
80-
function updateCurrentPageId(i: number) {
82+
function updateCurrentPageId(tabIndex: number) {
8183
auditStore.updateCurrentPageId(
82-
i === 0
84+
tabIndex === 0
8385
? auditStore.currentAudit?.transverseElementsPage.id ?? null
8486
: auditStore.currentAudit?.pages
85-
? auditStore.currentAudit?.pages.at(i - 1)?.id ?? null
87+
? auditStore.currentAudit?.pages.at(tabIndex - 1)?.id ?? null
8688
: null
8789
);
90+
91+
// change the URL in the browser adress bar without triggering vue-router navigation
92+
history.pushState(
93+
{},
94+
"null",
95+
router.resolve({
96+
name: "audit-generation",
97+
params: {
98+
uniqueId: uniqueId.value,
99+
tab: slugify(tabsData.value[tabIndex].label)
100+
}
101+
}).fullPath
102+
);
88103
}
89104
90105
const {
@@ -172,7 +187,10 @@ let resizeObserver: ResizeObserver | null = null;
172187
watch(auditGenerationHeader, async () => {
173188
const stickyIndicator = auditGenerationHeader.value?.stickyIndicator;
174189
resizeObserver = new ResizeObserver((entries) => {
175-
stickyTop.value = entries[0].target.clientHeight + "px";
190+
const target = entries[0].target;
191+
stickyTop.value = `calc(${getComputedStyle(target).top} + ${
192+
target.clientHeight
193+
}px)`;
176194
});
177195
stickyIndicator && resizeObserver.observe(stickyIndicator);
178196
});
@@ -211,13 +229,31 @@ const pageTitle = computed(() => {
211229
return "";
212230
});
213231
214-
type TabData = { label: string; data: AuditPage };
232+
const targetTab = ref(route.params.tab as string | undefined);
233+
const targetTabIndex = computed(() => {
234+
let index = tabsData.value.findIndex(
235+
(t) => slugify(t.label).toLowerCase() === targetTab.value?.toLowerCase()
236+
);
237+
return index === -1 ? 0 : index;
238+
});
239+
240+
type TabData = {
241+
label: string;
242+
icon?: Component;
243+
data: AuditPage;
244+
};
215245
216246
const tabsData = computed((): TabData[] => {
217247
const transversePage = auditStore.currentAudit?.transverseElementsPage;
218248
return [
219249
...(transversePage
220-
? [{ label: transversePage?.name, data: transversePage }]
250+
? [
251+
{
252+
label: transversePage?.name,
253+
icon: LayoutIcon,
254+
data: transversePage
255+
}
256+
]
221257
: []),
222258
...(auditStore.currentAudit?.pages.map((p) => ({
223259
label: p.name,
@@ -257,7 +293,7 @@ const tabsData = computed((): TabData[] => {
257293
]"
258294
>
259295
<div
260-
:class="['filters-wrapper', { 'fr-pr-3v': showFilters }]"
296+
:class="['filters-wrapper fr-pt-4v', { 'fr-pr-3v': showFilters }]"
261297
role="search"
262298
:style="{ '--filters-top-offset': stickyTop }"
263299
>
@@ -274,6 +310,7 @@ const tabsData = computed((): TabData[] => {
274310
<AraTabs
275311
:tabs="tabsData"
276312
:sticky-top="stickyTop"
313+
:selected-tab="targetTabIndex"
277314
@change="updateCurrentPageId"
278315
>
279316
<template #panel="{ data }">
@@ -289,6 +326,8 @@ const tabsData = computed((): TabData[] => {
289326
</template>
290327

291328
<style scoped>
329+
@import "../../styles/filters.css";
330+
292331
/* Override DSFR columns width */
293332
.columns {
294333
--gap: 1.5rem;
@@ -316,23 +355,6 @@ const tabsData = computed((): TabData[] => {
316355
display: inline-block;
317356
}
318357
319-
.filters-wrapper {
320-
position: sticky;
321-
top: var(--filters-top-offset, 0);
322-
max-height: calc(100vh - var(--filters-top-offset, 0));
323-
max-height: calc(100dvh - var(--filters-top-offset, 0));
324-
overflow-y: auto;
325-
padding-top: 1rem;
326-
}
327-
328-
@media (width < 48rem) {
329-
.filters-wrapper {
330-
position: static;
331-
max-height: none;
332-
overflow-y: initial;
333-
}
334-
}
335-
336358
.page-wrapper {
337359
display: flex;
338360
flex-wrap: wrap;

confiture-web-app/src/pages/misc/PrivacyPage.vue

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,19 @@ import PageMeta from "../../components/PageMeta";
4949
2019)
5050
</td>
5151
<td rowspan="2">
52-
L’utilisateur·rice peut supprimer son compte et ses données personnelles à tout moment.<br>
53-
Un compte inactif pendant 5 ans est automatiquement supprimé ainsi que les données personnelles de l'utilisateur·rice. Les audits associés sont alors anonymisés.<br>
54-
Les audits réalisés sans compte sont automatiquement anonymisés après 5 ans et les données personnelles de l'utilisateur·rice supprimées.
52+
L’utilisateur·rice peut supprimer son compte et ses données
53+
personnelles à tout moment.<br />
54+
Un compte inactif pendant 5 ans est automatiquement supprimé
55+
ainsi que les données personnelles de l'utilisateur·rice.
56+
Les audits associés sont alors anonymisés.<br />
57+
Les audits réalisés sans compte sont automatiquement
58+
anonymisés après 5 ans et les données personnelles de
59+
l'utilisateur·rice supprimées.
5560
</td>
5661
</tr>
5762
<tr>
5863
<td>Prénom et nom</td>
59-
<td Signer » le rapport d’accessibilité</td>
64+
<td Signer » le rapport d’accessibilité</td>
6065
<td>Intérêt légitime</td>
6166
</tr>
6267
</tbody>
@@ -141,7 +146,7 @@ import PageMeta from "../../components/PageMeta";
141146
<h2>Suivi d’audience et vie privée</h2>
142147
<h3>Cookies déposés et <span lang="en">opt-out</span></h3>
143148
<p>
144-
Ce site dépose un petit fichier texte (un « cookie ») sur votre appareil
149+
Ce site dépose un petit fichier texte (un « cookie ») sur votre appareil
145150
lorsque vous le consultez. Cela nous permet de mesurer le nombre de
146151
visites et de comprendre quelles sont les pages les plus consultées.
147152
</p>
@@ -156,7 +161,7 @@ import PageMeta from "../../components/PageMeta";
156161
</p>
157162
<p>
158163
Nous utilisons pour cela Matomo, un outil libre, paramétré pour être en
159-
conformité avec la recommandation « Cookies » de la CNIL. Cela signifie
164+
conformité avec la recommandation « Cookies » de la CNIL. Cela signifie
160165
que votre adresse IP, par exemple, est anonymisée avant d’être
161166
enregistrée. Il est donc impossible d’associer vos visites sur ce site à
162167
votre personne.

0 commit comments

Comments
 (0)