Skip to content

Commit baf03f2

Browse files
bjlaaClemogdependabot[bot]paulsoucheincubateur-ademe-admin
authored
🔖 Release 2.40.0 (#1413)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Benjamin Arias <12382534+bjlaa@users.noreply.github.com> Co-authored-by: Clément <55186402+Clemog@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Clément <clem.auger@hotmail.fr> Co-authored-by: Paul Souche <paul@bettercallpaul.fr> Co-authored-by: Bot Incubateur Ademe <153178900+incubateur-ademe-admin@users.noreply.github.com>
1 parent 68d443d commit baf03f2

File tree

72 files changed

+1024
-854
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1024
-854
lines changed

‎package.json‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "nosgestesclimat-site-nextjs",
33
"license": "MIT",
4-
"version": "2.39.0",
4+
"version": "2.40.0",
55
"description": "The leading open source climate footprint calculator",
66
"type": "module",
77
"repository": {
@@ -48,7 +48,7 @@
4848
},
4949
"dependencies": {
5050
"@incubateur-ademe/legal-pages-react": "^0.5.0",
51-
"@incubateur-ademe/nosgestesclimat": "^4.0.0",
51+
"@incubateur-ademe/nosgestesclimat": "^4.2.0",
5252
"@next/mdx": "^15.5.6",
5353
"@publicodes/react-ui": "^1.10.0",
5454
"@publicodes/tools": "^1.8.0",
@@ -92,14 +92,14 @@
9292
"tailwind-merge": "^3.0.1",
9393
"tailwindcss": "^4.1.11",
9494
"use-count-up": "^3.0.1",
95-
"uuid": "^11.0.5"
95+
"uuid": "^13.0.0"
9696
},
9797
"devDependencies": {
9898
"@babel/core": "^7.26.8",
9999
"@babel/eslint-parser": "^7.26.8",
100100
"@chromatic-com/storybook": "^4.0.1",
101101
"@faker-js/faker": "^10.1.0",
102-
"@incubateur-ademe/nosgestesclimat-scripts": "^0.7.0",
102+
"@incubateur-ademe/nosgestesclimat-scripts": "^0.8.0",
103103
"@mdx-js/loader": "^3.1.0",
104104
"@mdx-js/react": "^3.1.0",
105105
"@next/bundle-analyzer": "15.5.6",
@@ -124,7 +124,7 @@
124124
"@types/webpack": "^5.28.5",
125125
"@typescript-eslint/eslint-plugin": "^8.46.1",
126126
"@typescript-eslint/parser": "^8.46.1",
127-
"@vitejs/plugin-react": "^4.6.0",
127+
"@vitejs/plugin-react": "^5.0.4",
128128
"@vitest/browser": "^3.1.1",
129129
"@vitest/coverage-v8": "^3.2.4",
130130
"@vitest/ui": "^3.2.4",
@@ -151,7 +151,7 @@
151151
"glob": "^11.0.1",
152152
"happy-dom": "^20.0.7",
153153
"husky": "^9.1.7",
154-
"jsdom": "^26.1.0",
154+
"jsdom": "^27.0.1",
155155
"json-stable-stringify": "^1.3.0",
156156
"msw": "^2.11.6",
157157
"msw-storybook-addon": "^2.0.5",
@@ -169,7 +169,7 @@
169169
"ts-prune": "^0.10.3",
170170
"typescript": "^5.9.3",
171171
"typescript-eslint": "^8.46.1",
172-
"vite": "^5.4.10",
172+
"vite": "^5.4.21",
173173
"vitest": "^3.2.4",
174174
"yaml-loader": "^0.8.1",
175175
"yargs": "^18.0.0"

‎src/app/[locale]/(large-layout)/layout.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import ContentLarge from '@/components/layout/ContentLarge'
22
import Footer from '@/components/layout/Footer'
3-
import Header from '@/components/layout/Header'
3+
import Header from '@/components/layout/HeaderClient'
44
import type { DefaultPageProps } from '@/types'
55
import type { PropsWithChildren } from 'react'
6-
import { ClientLayout } from '../_components/ClientLayout'
6+
import { ClientLayout } from '../../../components/layout/ClientLayout'
77

88
type LayoutProps = PropsWithChildren & DefaultPageProps
99

‎src/app/[locale]/(narrow-layout)/layout.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import ContentNarrow from '@/components/layout/ContentNarrow'
22
import Footer from '@/components/layout/Footer'
3-
import Header from '@/components/layout/Header'
3+
import Header from '@/components/layout/HeaderClient'
44
import type { DefaultPageProps } from '@/types'
55
import type { PropsWithChildren } from 'react'
6-
import { ClientLayout } from '../_components/ClientLayout'
6+
import { ClientLayout } from '../../../components/layout/ClientLayout'
77

88
type LayoutProps = PropsWithChildren & DefaultPageProps
99

‎src/app/[locale]/(simulation)/(large-layout)/layout.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import ContentLarge from '@/components/layout/ContentLarge'
2-
import Header from '@/components/layout/Header'
2+
import Header from '@/components/layout/HeaderClient'
33
import type { PropsWithChildren } from 'react'
44

55
export default function LargeLayout({ children }: PropsWithChildren) {

‎src/app/[locale]/(simulation)/(large-layout-nosticky)/fin/_components/TallyForm.tsx‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
'use client'
22

33
import Trans from '@/components/translation/trans/TransClient'
4-
import { DONT_KNOW_FEATURE_FLAG_KEY } from '@/constants/ab-test'
54
import Emoji from '@/design-system/utils/Emoji'
6-
import { useIsTestVersion } from '@/hooks/abTesting/useIsTestVersion'
75
import { useClientTranslation } from '@/hooks/useClientTranslation'
86
import { useIframe } from '@/hooks/useIframe'
97
import { useLocale } from '@/hooks/useLocale'
@@ -43,19 +41,20 @@ export default function TallyForm() {
4341
? process.env.NEXT_PUBLIC_TALLY_FORM_ID
4442
: process.env.NEXT_PUBLIC_TALLY_FORM_ID_EN) ?? ''
4543

46-
const isTestVersion = useIsTestVersion(DONT_KNOW_FEATURE_FLAG_KEY)
47-
4844
// Add hidden fields parameters to URL for Tally
4945
useEffect(() => {
5046
const params = new URLSearchParams(window.location.search)
51-
params.set('featureFlagKey', DONT_KNOW_FEATURE_FLAG_KEY)
52-
params.set('abTestVariant', isTestVersion ? 'test' : 'control')
47+
48+
// Uncomment this to pass the feature flag key to Tally
49+
// params.set('featureFlagKey', DONT_KNOW_FEATURE_FLAG_KEY)
50+
// params.set('abTestVariant', isTestVersion ? 'test' : 'control')
51+
5352
params.set('deviceType', isMobile() ? 'mobile' : 'desktop')
5453
params.set('iframe', isIframe ? 'true' : 'false')
5554

5655
const newUrl = `${window.location.pathname}?${params.toString()}`
5756
window.history.replaceState({}, '', newUrl)
58-
}, [isTestVersion, isIframe])
57+
}, [isIframe])
5958

6059
const handleOpenForm = () => {
6160
window.Tally.openPopup(FORM_ID, {})

‎src/app/[locale]/(simulation)/(large-layout-nosticky)/layout.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import ContentLarge from '@/components/layout/ContentLarge'
2-
import Header from '@/components/layout/Header'
2+
import Header from '@/components/layout/HeaderClient'
33
import type { PropsWithChildren } from 'react'
44

55
export default function LargeLayoutNoSticky({ children }: PropsWithChildren) {

‎src/app/[locale]/(simulation)/layout.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import EngineProviders from '@/components/providers/EngineProviders'
33
import { getSupportedRegions } from '@/helpers/modelFetching/getSupportedRegions'
44
import type { DefaultPageProps } from '@/types'
55
import type { PropsWithChildren } from 'react'
6-
import { ClientLayout } from '../_components/ClientLayout'
6+
import { ClientLayout } from '../../../components/layout/ClientLayout'
77

88
type LayoutProps = PropsWithChildren & DefaultPageProps
99

‎src/app/[locale]/(simulation)/simulateur/[root]/_components/simulateur/form/FunFact.tsx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ type Props = { question: DottedName }
1414
export default function FunFact({ question }: Props) {
1515
const { currentCategory } = useFormState()
1616

17-
if (question === 'logement . âge') {
17+
if (question === 'logement . surface') {
1818
return (
1919
<div
20-
className={`rounded-xl border-2 ${getBorderCategoryColor(currentCategory, '200')} ${getBgCategoryColor(currentCategory, '100')} px-4 py-6 text-sm`}>
20+
className={`rounded-xl border-2 ${getBorderCategoryColor(currentCategory, '200')} ${getBgCategoryColor(currentCategory, '100')} hidden px-4 py-6 text-sm md:block`}>
2121
<h3 className="mb-2">
2222
<Emoji>💡</Emoji> Le saviez vous ?
2323
</h3>
@@ -28,11 +28,11 @@ export default function FunFact({ question }: Props) {
2828
</Trans>
2929
</strong>{' '}
3030
<Trans>
31-
sur ces 50 dernières années, passant de 23 à 40,4 m² par habitant,
31+
sur ces 50 dernières années, passant de 23 à 40 m² par habitant,
3232
soit
3333
</Trans>{' '}
3434
<strong>
35-
<Trans>90,9 m² en moyenne pour un foyer de 2,2 personnes.</Trans>
35+
<Trans>90 m² en moyenne pour un foyer de 2,2 personnes.</Trans>
3636
</strong>
3737
</p>
3838
</div>
@@ -42,7 +42,7 @@ export default function FunFact({ question }: Props) {
4242
if (question === 'divers . textile . volume') {
4343
return (
4444
<div
45-
className={`rounded-xl border-2 ${getBorderCategoryColor(currentCategory, '200')} ${getBgCategoryColor(currentCategory, '100')} px-4 py-6 text-sm`}>
45+
className={`rounded-xl border-2 ${getBorderCategoryColor(currentCategory, '200')} ${getBgCategoryColor(currentCategory, '100')} hidden px-4 py-6 text-sm md:block`}>
4646
<h3 className="mb-2">
4747
<Emoji>💡</Emoji> Le saviez vous ?
4848
</h3>

‎src/app/[locale]/404/page.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Main from '@/design-system/layout/Main'
55
import { t } from '@/helpers/metadata/fakeMetadataT'
66
import { getCommonMetadata } from '@/helpers/metadata/getCommonMetadata'
77
import type { DefaultPageProps } from '@/types'
8-
import { ClientLayout } from '../_components/ClientLayout'
8+
import { ClientLayout } from '../../../components/layout/ClientLayout'
99

1010
export const generateMetadata = getCommonMetadata({
1111
title: t('404 - Nos Gestes Climat'),

‎src/app/[locale]/_components/MainLayoutProviders.tsx‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { IframeOptionsProvider } from '../_components/mainLayoutProviders/Iframe
1111
import MainHooks from '../_components/mainLayoutProviders/MainHooks'
1212
import { PreventNavigationProvider } from '../_components/mainLayoutProviders/PreventNavigationProvider'
1313
import QueryClientProviderWrapper from '../_components/mainLayoutProviders/QueryClientProviderWrapper'
14-
import { marianne } from '../layout'
1514

1615
export default function MainLayoutProviders({ children }: PropsWithChildren) {
1716
return (
@@ -23,14 +22,10 @@ export default function MainLayoutProviders({ children }: PropsWithChildren) {
2322
migrationInstructions={migrationInstructions}>
2423
<PartnerProvider>
2524
<IframeOptionsProvider>
26-
{(containerRef: React.RefObject<HTMLBodyElement | null>) => (
25+
{(containerRef: React.RefObject<HTMLDivElement | null>) => (
2726
<PreventNavigationProvider>
2827
<MainHooks>
29-
<body
30-
className={`${marianne.className} text-default bg-white transition-colors duration-700`}
31-
ref={containerRef}>
32-
{children}
33-
</body>
28+
<div ref={containerRef}>{children}</div>
3429
</MainHooks>
3530
</PreventNavigationProvider>
3631
)}

0 commit comments

Comments
 (0)