Skip to content
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

🔖 Release v2.10.0 #859

Closed
wants to merge 691 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
691 commits
Select commit Hold shift + click to select a range
480da72
feat: hide inapp debug
florianpanchout Oct 2, 2024
5ad79a2
feat: use dynamic redirection
florianpanchout Oct 2, 2024
d7d725d
feat: remove isMobile package
florianpanchout Oct 2, 2024
bc6a5f2
♻️ Amélioration affichage abbr résultats de groupes + réajout fonctio…
bjlaa Oct 3, 2024
33df801
🔧 Fixes for release 2.1.0 (#738)
bjlaa Oct 3, 2024
c89197f
wip
florianpanchout Oct 3, 2024
3d7200c
feat: add more inapp config
florianpanchout Oct 3, 2024
1bc542f
Merge branch 'main' into preprod
bjlaa Oct 3, 2024
4dec101
feat: stop using detect inapp library
florianpanchout Oct 3, 2024
5b5935d
feat: revert to isMobile
florianpanchout Oct 3, 2024
c44ad45
fix: remove useless changes
florianpanchout Oct 3, 2024
e184927
fix: use only region code
florianpanchout Oct 3, 2024
7393e90
Merge branch 'preprod' into NGC-220
bjlaa Oct 3, 2024
ee82aa7
👷 Add husky pre-commit script (#741)
bjlaa Oct 3, 2024
77c9467
:speech_balloon: Add abbreviations (#739)
bjlaa Oct 3, 2024
178f703
♻️ Minor text fix (#742)
bjlaa Oct 7, 2024
1e43ee5
:bug: Add check to avoid app crash (#743)
bjlaa Oct 7, 2024
0fb5b4c
:bug: Fix landing page canonical URL (#744)
bjlaa Oct 7, 2024
ee44650
Prendre en compte les navigateurs "éphémères” (in-app) [NGC 220] (#737)
florianpanchout Oct 8, 2024
4d0a944
fix: typo
florianpanchout Oct 8, 2024
016f877
Ajouter la region dans la simulation [NGC-773] (#748)
florianpanchout Oct 8, 2024
688b0b0
:sparkles: Use the subcategories values newly stored in the computedR…
bjlaa Oct 8, 2024
2474363
:green_heart: Update Github workflow (#740)
bjlaa Oct 8, 2024
dfe66ee
:sparkles: Add sticker effect illustrations (#746)
bjlaa Oct 8, 2024
2d9d545
wip
florianpanchout Oct 9, 2024
55aa09f
🐛 Fix simulation not being loaded with email link (#750)
bjlaa Oct 10, 2024
286a9fe
:bug: Harmonize filtering between orga view and poll view (#745)
bjlaa Oct 10, 2024
014810c
Merge branch 'main' into preprod
bjlaa Oct 10, 2024
42910e8
wip
florianpanchout Oct 15, 2024
18eea02
feat: check that groups array is not empty
florianpanchout Oct 15, 2024
a239674
Recette / Check que le fait qu’on puisse save des simu non terminées …
florianpanchout Oct 15, 2024
d687f2b
feat: add suspense for providers
florianpanchout Oct 15, 2024
082f055
feat: add back trans
florianpanchout Oct 15, 2024
544d312
feat: put back i18n everywhere
florianpanchout Oct 15, 2024
4d1cffb
feat: add back geoloc
florianpanchout Oct 15, 2024
5bfb971
feat: send france if no region
florianpanchout Oct 15, 2024
65aff4f
feat: add geoloc to server component
florianpanchout Oct 15, 2024
59306ba
feat: remove mobile circles
florianpanchout Oct 15, 2024
f3e5442
feat: add back icons
florianpanchout Oct 15, 2024
2ab6319
:lipstick: Improve ring color for focused elements (#749)
bjlaa Oct 15, 2024
1d4c919
feat: put back translations
florianpanchout Oct 16, 2024
a573f3b
feat: put back some translations
florianpanchout Oct 16, 2024
8345934
feat: bigger chunks for bigger perfs
florianpanchout Oct 16, 2024
5279036
Merge remote-tracking branch 'origin/preprod' into NGC-1223-bis
florianpanchout Oct 17, 2024
28a7974
feat: add missing i18n
florianpanchout Oct 17, 2024
b1e52d9
SEO / Rendering JS lent pour Google [NGC-1223] (#757)
florianpanchout Oct 17, 2024
40d5653
feat: wait before geolocation
florianpanchout Oct 17, 2024
9917f9f
fix: geoloc is now working
florianpanchout Oct 17, 2024
7cb9bd3
feat: add specific pr param component
florianpanchout Oct 17, 2024
49fb09b
fix: geoloc now calling relative route
florianpanchout Oct 17, 2024
dc104e2
feat: remove useless suspense
florianpanchout Oct 17, 2024
5d536d9
:bug: Fix simulation being saved twice on test end page (#758)
bjlaa Oct 18, 2024
f791e13
fix: remove non supported option
florianpanchout Oct 21, 2024
64ea683
feat: put back server side geolocation
florianpanchout Oct 21, 2024
ad62463
Merge remote-tracking branch 'origin/main' into preprod
florianpanchout Oct 22, 2024
e8d52ad
feat: wrap pages inside MainHooks
florianpanchout Oct 23, 2024
6af34f1
Merge remote-tracking branch 'origin/preprod' into NGC-1313
florianpanchout Oct 23, 2024
32a71e8
SEO / Optimisation du chargement du modèle [NGC-1313] [NGC-1312] (#759)
florianpanchout Oct 23, 2024
6fd763a
:bug: Fixing the preprod (#764)
bjlaa Oct 28, 2024
bb3bc82
Use correct classname to display dynamic color ring around suggestion…
bjlaa Nov 4, 2024
64b713b
Merge branch 'main' into preprod
bjlaa Nov 12, 2024
729499d
Merge branch 'main' into preprod
bjlaa Nov 12, 2024
ea1d321
:arrow_up: eslint-config-next
paulsouche Nov 18, 2024
d242c60
:wrench: add consistent-type-imports
paulsouche Nov 18, 2024
fa5643a
:lipstick: import type
paulsouche Nov 18, 2024
7b57540
:wrench: update lint and format scripts
paulsouche Nov 18, 2024
9d86e9b
:lipstick: ran format
paulsouche Nov 18, 2024
f33ceff
:wrench: improve project lint (#771)
paulsouche Nov 19, 2024
7f9de39
✨ Add water footprint landing page [NGC-1318] (#765)
bjlaa Nov 19, 2024
503952c
Merge branch 'main' into preprod
bjlaa Nov 19, 2024
a338efe
Merge branch 'main' into preprod
bjlaa Nov 19, 2024
c709f13
Merge branch 'main' into preprod
bjlaa Nov 19, 2024
02e73cc
Merge branch 'main' into preprod
bjlaa Nov 19, 2024
c96e074
✨ Update the main homepage (#767)
bjlaa Nov 20, 2024
bec3300
♻️ Update budget page (#777)
bjlaa Nov 20, 2024
4ebb8fb
♻️ Updates on the main LP after QA (#778)
bjlaa Nov 27, 2024
7f6cc6a
✨ Add carbon footprint landing page (#769)
bjlaa Dec 2, 2024
1681da8
♻️ Homepage improvements (#779)
bjlaa Dec 2, 2024
5f704db
✨ Add trackers to the new landing pages (#776)
bjlaa Dec 2, 2024
9b602ec
Merge branch 'main' into preprod
bjlaa Dec 3, 2024
ea9e84e
🐛 Fix 404 being broken (#781)
bjlaa Dec 4, 2024
3570c99
Merge branch 'main' into preprod
bjlaa Dec 4, 2024
79a56b8
💄 Remove double footer on 404 page (#787)
bjlaa Dec 4, 2024
5cf5414
:fire: SeeDetailedReportAndExport
paulsouche Nov 7, 2024
0714649
:alien: quizz-answers API (NGC-1330)
paulsouche Oct 30, 2024
5620e38
:alien: northstar-ratings API (NGC-1330)
paulsouche Oct 30, 2024
e5dd8fc
:alien: groups API (NGC-1330)
paulsouche Oct 30, 2024
4f91acf
:alien: organisationss API (NGC-1330)
paulsouche Oct 30, 2024
c9be643
:alien: polls API (NGC-1330)
paulsouche Nov 5, 2024
6e42657
:alien: polls public API (NGC-1330)
paulsouche Nov 12, 2024
4219baf
:alien: simulations API (NGC-1330)
paulsouche Nov 18, 2024
76df350
:lipstick: remove dtos
paulsouche Dec 3, 2024
c754b4b
:lipstick: name import
paulsouche Dec 9, 2024
bbd063c
:lipstick: bang bang <3
paulsouche Dec 9, 2024
d938667
:lipstick: add comment
paulsouche Dec 9, 2024
caa6a0d
:sparkles: consume new API (NGC-1330) (#780)
paulsouche Dec 9, 2024
d263f67
Replace the word "simulateur" with "calculateur" throughout the site …
bjlaa Dec 9, 2024
b2f117a
🐛 Fix Vigieau API integration (#782)
bjlaa Dec 10, 2024
517e75f
🐛 Fix Iframe locale reloading bug (#784)
bjlaa Dec 10, 2024
545dc5f
:necktie: change send simulation email logic (NGC-1420)
paulsouche Dec 11, 2024
eb5a6ea
:bug: do not url encode localstorage email
paulsouche Dec 11, 2024
80ffe80
:bug: ask the backend to send and email or not + store it correctly (…
paulsouche Dec 11, 2024
805af64
:bug: poll customAdditionalQuestions (NGC-1434)
paulsouche Dec 16, 2024
21f38ee
feat: add warning for `plafond`
Clemog Dec 16, 2024
85431f5
fix: ui
Clemog Dec 16, 2024
85deb84
:bug: poll customAdditionalQuestions (NGC-1434) (#791)
paulsouche Dec 17, 2024
b49a5ba
feat: improve format
Clemog Dec 19, 2024
1020f13
fix: disable "plus" in mosaic question if `plafond`
Clemog Dec 19, 2024
5d13f63
pkg: use pre released model
Clemog Dec 19, 2024
06f5fd8
Merge branch 'preprod' into feat-add-plafond
Clemog Dec 19, 2024
eff64c2
feat: delete actions/plus pages
Clemog Dec 23, 2024
f1c52d3
:wrench: deploy assets on scaleway
paulsouche Dec 23, 2024
7b069d6
pkg: use pre released model 2
Clemog Dec 23, 2024
56432eb
fix: types
Clemog Dec 23, 2024
b06da50
:wrench: deploy assets on scaleway (#794)
paulsouche Dec 23, 2024
3cd6533
feat: traduction
Clemog Dec 23, 2024
1a8f22d
fiw: add type guard
Clemog Dec 24, 2024
f1460c9
Merge branch 'preprod' into delete-actions-plus
paulsouche Dec 24, 2024
4b942a5
⬆️ upgrade node version to 22
Clemog Dec 24, 2024
a9e912d
⬆️ use last model version
Clemog Dec 24, 2024
2edde66
:rotating_light: fix types
Clemog Dec 23, 2024
8b0e996
⬆️ upgrade node + use last model version (#795)
Clemog Dec 24, 2024
3485ce0
Merge branch 'preprod' into feat-add-plafond
Clemog Dec 24, 2024
9c5b68a
🐛 set `logement . chauffage . bois . type` as priority
Clemog Dec 26, 2024
896a4b1
🩹 all boolean mosaic children must be updated
Clemog Dec 26, 2024
e154936
:sparkles: filter situation and foldedsteps on value change
Clemog Dec 30, 2024
9e5011b
🐛 Set `logement . chauffage . bois . type` as priority (NGC-684) (#796)
Clemog Dec 30, 2024
0b621ab
🎨 naming
Clemog Dec 30, 2024
5c02468
:bug: "non merci" button doesn't route to home anymore
Clemog Dec 31, 2024
0dd65ca
:sparkles: add cross on modal
Clemog Dec 31, 2024
576bb75
:bug: Remove the dynamic loading of the image
bjlaa Dec 31, 2024
1299594
:bug: Remove the dynamic loading of the image
Clemog Jan 2, 2025
f6141f1
Revert ":bug: Remove the dynamic loading of the image"
Clemog Jan 2, 2025
6c0f6a8
✨ new behaviour for back home modal
Clemog Jan 2, 2025
a10b78d
✨ modal closes by clicking outside
Clemog Jan 2, 2025
b35fb58
Merge branch 'preprod' into fix-situation-update
Clemog Jan 2, 2025
fe247aa
:bug: Remove the dynamic loading of the image (NGC-1406) (#801)
Clemog Jan 6, 2025
6541ac4
Merge branch 'preprod' into fix-situation-update
Clemog Jan 6, 2025
361c901
Retirer les clés rendue non applicables des foldedSteps et de la situ…
Clemog Jan 6, 2025
e7d4cb5
:art: better readability
Clemog Jan 6, 2025
031dfd3
:art: extract getValueIsOverFloorOrCeiling in helper
Clemog Jan 6, 2025
130be93
Merge branch 'preprod' into feat-add-plafond
bjlaa Jan 6, 2025
d667392
:bug: Fix typo (#804)
bjlaa Jan 7, 2025
7b945fd
Merge branch 'preprod' into feat-add-plafond
Clemog Jan 7, 2025
15fa081
Merge branch 'main' into preprod
bjlaa Jan 7, 2025
392e059
Merge branch 'preprod' into feat-add-plafond
Clemog Jan 7, 2025
91166a7
✨ go back home if email already registered
Clemog Jan 7, 2025
378bc6e
:sparkles: logique de plafonds (NGC-1378) (#792)
Clemog Jan 7, 2025
9f57393
🎨 pass title props to form
Clemog Jan 7, 2025
dbcd3cb
🗑️ Remove unused code with ts-prune [NGC-1449] (#800)
bjlaa Jan 8, 2025
e67ba07
🎨 same confirmation message on save
Clemog Jan 8, 2025
795f05e
🎨 avoid code duplication
Clemog Jan 8, 2025
71a2b33
🎨 refacto SaveModal
Clemog Jan 8, 2025
468305d
Merge branch 'preprod' into fix-save-modal
Clemog Jan 8, 2025
7323f5a
✨ Lazy load iframe added by our iframe scripts (#805)
bjlaa Jan 8, 2025
cdb7d00
Merge branch 'preprod' into fix-save-modal
Clemog Jan 8, 2025
710e252
🐛 fix modale “sauvegarder son test” (NGC-1404) (#798)
Clemog Jan 8, 2025
6ad8317
⬆️ use nosgestesclimat 3.5.0
Clemog Jan 8, 2025
8396005
⬆️ use nosgestesclimat 3.5.0 (NGC-1524) (#808)
Clemog Jan 9, 2025
101bc95
🐛 use locale instead of region code
Clemog Jan 13, 2025
db66bc7
:sparkles: Activate beta.gouv Matomo (#803)
bjlaa Jan 13, 2025
47d3f80
:bug: Fix wrong content being displayed upon groups and orga fetching…
bjlaa Jan 13, 2025
cc64c7e
✨ Re-add restart button on landing pages (#811)
bjlaa Jan 13, 2025
84cff9d
🐛 wrong translation tag
Clemog Jan 13, 2025
3287016
✨ add newly created boards
Clemog Jan 13, 2025
c3cf581
Merge branch 'preprod' into delete-actions-plus
Clemog Jan 13, 2025
abd55d6
🔍️ add redirection and keep ghost actions/plus pages
Clemog Jan 13, 2025
eac0703
✨ add translation
Clemog Jan 15, 2025
c7ecbe4
Merge branch 'preprod' into update-page-stats
Clemog Jan 16, 2025
495a368
✨ Stats: MAJ boards metabase (NGC-1517) (#812)
Clemog Jan 16, 2025
0f510d0
Merge branch 'preprod' into delete-actions-plus
Clemog Jan 20, 2025
8013bdc
:bulb: add explanation about redirection
Clemog Jan 20, 2025
e4318cf
:fire: actions/plus pages (NGC-1544) (#793)
Clemog Jan 20, 2025
8c2d7cb
🐛 priority only applies on applicable question
Clemog Jan 21, 2025
8689f30
🐛 Fix organisation link in Header not fetching data
bjlaa Jan 21, 2025
93d7fd4
🐛 Fix organisation link in Header not fetching data (#818)
paulsouche Jan 21, 2025
4284761
Merge branch 'preprod' into fix-question-priority
Clemog Jan 21, 2025
5d7b2ec
🐛 priority only applies on applicable question (NGC-1563) (#816)
Clemog Jan 22, 2025
c12e55c
♻️ Remove lazy loading from our iframe scripts (#820)
bjlaa Jan 22, 2025
5520d9e
✨ Add new blog homepage, category and article pages (#789)
bjlaa Jan 23, 2025
a1ef2b7
⬆️ use nosgestesclimat 3.5.1
Clemog Jan 27, 2025
7d4fee5
✨ trad
Clemog Jan 27, 2025
c3e1183
✨ New footer (#824)
bjlaa Jan 27, 2025
522f721
Merge branch 'preprod' into update-model-version
Clemog Jan 27, 2025
c992153
⬆️ use nosgestesclimat 3.5.1 (#823)
Clemog Jan 27, 2025
42faed1
Merge branch 'main' into preprod
bjlaa Jan 27, 2025
2e79c58
Merge branch 'main' into preprod
bjlaa Jan 28, 2025
0a608bf
Merge branch 'main' into preprod
bjlaa Jan 28, 2025
3c00528
Merge branch 'main' into preprod
bjlaa Feb 3, 2025
81f9858
🐛 Fix cmsClient errors, and useOldLocalStorage sometimes breaking the…
bjlaa Feb 3, 2025
79ca9fa
✨ Better display the water footprint throughout the test (#815)
bjlaa Feb 3, 2025
77817e1
Merge branch 'main' into preprod
bjlaa Feb 4, 2025
31dc85c
Merge branch 'main' into preprod
bjlaa Feb 4, 2025
ef13c6c
✨ Avoid re-showing email input after verification code validation
bjlaa Feb 4, 2025
594594e
:adhesive_bandage: CMS client and polls (#838)
paulsouche Feb 5, 2025
4bff904
Merge branch 'main' into preprod
bjlaa Feb 5, 2025
35d78a2
♻️ Make organisation type field required (#836)
bjlaa Feb 5, 2025
b6b825e
:recycle: get main newsletters subscribers
paulsouche Jan 13, 2025
142254c
Merge branch 'main' into preprod
bjlaa Feb 6, 2025
d74f7ac
:recycle: use server mainNewsletter route to reduce vercel API calls …
paulsouche Feb 6, 2025
00f7394
:fire: remove old netlify links
Clemog Feb 10, 2025
abd4f26
:fire: remove old netlify links (NGC-1491) (#843)
Clemog Feb 10, 2025
224e14a
:bug: Fix broken redirection on orga connexion page (#844)
bjlaa Feb 10, 2025
5c14965
:wrench: Update matomo config to better track iframes (#845)
bjlaa Feb 10, 2025
c356fc7
♻️ Custom questions are enabled by default (#846)
bjlaa Feb 10, 2025
a1954e2
Merge branch 'main' into preprod
bjlaa Feb 11, 2025
7e36f42
✨ Add fields on the organisation and poll forms (#837)
bjlaa Feb 11, 2025
7ba7430
:sparkles: Improve Iframe tracking (#848)
bjlaa Feb 11, 2025
50a25ba
:bulb: split testing tracking is disabled
Clemog Feb 12, 2025
d84d55d
✨ first posthog set up and config
Clemog Feb 12, 2025
7115e90
:chart_with_upwards_trend: capture pageviews
Clemog Feb 12, 2025
6bb8fcb
:chart_with_upwards_trend: try to send some events
Clemog Feb 12, 2025
39a35d1
📈 2 events for iframeVisit and iframeInteraction
Clemog Feb 12, 2025
e234175
:truck: `matomo` -> `analytics` folder
Clemog Feb 13, 2025
1403f25
:bulb: split testing tracking is disabled (#849)
Clemog Feb 17, 2025
8f00e34
:adhesive_bandage: CMS client and polls (#838)
paulsouche Feb 5, 2025
622530c
🔖 Release v2.9.1 (#839)
bjlaa Feb 5, 2025
eddb737
♻️ Make organisation type field required (#836)
bjlaa Feb 5, 2025
3e97772
:bug: Comment orga AdminSection until server is fixed (#841)
bjlaa Feb 5, 2025
aba81bd
Revert ":bug: Comment orga AdminSection until server is fixed (#841)"
bjlaa Feb 6, 2025
a0d39c2
:recycle: get main newsletters subscribers
paulsouche Jan 13, 2025
82447ba
:fire: remove old netlify links
Clemog Feb 10, 2025
db0209f
:bug: Fix broken redirection on orga connexion page (#844)
bjlaa Feb 10, 2025
bbcb962
:wrench: Update matomo config to better track iframes (#845)
bjlaa Feb 10, 2025
0e1195c
♻️ Custom questions are enabled by default (#846)
bjlaa Feb 10, 2025
e8b7162
:bug: Fix dead links (end page and news pages) [NGC-1644] (#847)
bjlaa Feb 11, 2025
4bba0f2
✨ Add fields on the organisation and poll forms (#837)
bjlaa Feb 11, 2025
1659ec3
:sparkles: Improve Iframe tracking (#848)
bjlaa Feb 11, 2025
a69fe0f
:bulb: split testing tracking is disabled
Clemog Feb 12, 2025
bd77eb7
🐛 Hotfix : display back poll admin section when user is administrator…
bjlaa Feb 13, 2025
b4cfd99
🐛 Fix category pages going to 404 if no mainArticle (#855)
bjlaa Feb 13, 2025
714ba89
Merge branch 'preprod' of https://github.com/incubateur-ademe/nosgest…
bjlaa Feb 17, 2025
bb91915
:bug: Fix / improve the submission behaviour of custom questions, add…
bjlaa Feb 17, 2025
b9b282f
📈 try to send all events with default format
Clemog Feb 17, 2025
1eb603a
Revert "🐛 Hotfix : display back poll admin section when user is admin…
paulsouche Feb 17, 2025
a6f1036
Revert "🐛 Hotfix : display back poll admin section when user is admin…
paulsouche Feb 17, 2025
a1ca99f
📈 consider iframe interaction only on click
Clemog Feb 17, 2025
9a1d2f0
:bug: Fix hydration error [NGC-1577] (#821)
bjlaa Feb 17, 2025
d27f303
Merge branch 'preprod' into add-event-iframe-visit
Clemog Feb 17, 2025
fbb846a
✨ Improve iframe display (#842)
bjlaa Feb 17, 2025
906dc3c
Merge branch 'preprod' into add-event-iframe-visit
Clemog Feb 17, 2025
d99951c
📈 2 events for iframeVisit and iframeInteraction (NGC-1475) (#851)
Clemog Feb 18, 2025
45ea043
Merge branch 'preprod' into set-up-posthog
Clemog Feb 18, 2025
7af3443
📈 answer forgotten for suggestion click
Clemog Feb 18, 2025
507a1e7
♻️ delete unnecessary constant
Clemog Feb 18, 2025
eace4be
⬆️ use nosgestesclimat 3.5.4 (#858)
Clemog Feb 18, 2025
3ac84ef
Merge branch 'preprod' into set-up-posthog
Clemog Feb 18, 2025
5c0d0e5
:chart_with_upwards_trend: Set up Posthog (#850)
Clemog Feb 18, 2025
d22da47
Update package.json
bjlaa Feb 18, 2025
4bfb26b
Merge branch 'preprod' into release-2-10-0
bjlaa Feb 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nosgestesclimat-site-nextjs",
"license": "MIT",
"version": "2.9.4",
"version": "2.10.0",
"description": "The leading open source climate footprint calculator",
"repository": {
"type": "git",
Expand Down Expand Up @@ -37,7 +37,7 @@
"dependencies": {
"@babel/runtime": "^7.23.1",
"@incubateur-ademe/legal-pages-react": "^0.2.0",
"@incubateur-ademe/nosgestesclimat": "3.5.1",
"@incubateur-ademe/nosgestesclimat": "3.5.4",
"@mdx-js/loader": "^3.0.0",
"@mdx-js/react": "^3.0.0",
"@next/bundle-analyzer": "^14.1.0",
Expand Down Expand Up @@ -67,6 +67,7 @@
"next": "14.2.7",
"next-i18n-router": "^4.1.1",
"postcss": "8.4.36",
"posthog-js": "^1.217.2",
"process": "^0.11.10",
"publicodes": "1.4.0",
"qrcode.react": "^3.1.0",
Expand Down
24 changes: 24 additions & 0 deletions public/demo-iframeLazy.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Demo Iframe Lazy</title>
</head>
<body>
<header>
<h2>iframe paramétré</h2>
<p>
Ci-dessous, nosgestesclimat.fr intégré comme un iframe paramétré. Son
chargement est déclenché lorsque l'utilisateur interagit avec la page.
Veuillez vous déplacer vers le bas de la page pour voir l'intégration.
</p>
</header>
<main style="margin-top: 1000px">
<script
id="nosgestesclimat"
src="/iframe.js"
data-share-data="true"></script>
</main>
</body>
</html>
29 changes: 29 additions & 0 deletions public/demo-iframeSimulationHomepage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Demo Iframe Simulation with Homepage</title>
</head>
<body>
<header>
<h2>
Exemple d'intégration du test avec région fixée par l'intégrateur.
</h2>
<p>
Ci-dessous, nosgestesclimat.fr intégré comme un iframe paramétré pour
afficher uniquement le parcours utilisateur du test Nos Gestes Climat,
de la page d'accueil à la page de résultats.
</p>
<p>La hauteur de l'iframe est fixée à 500px.</p>
</header>
<main style="padding-bottom: 1000px; max-width: 600px">
<script
id="nosgestesclimat"
src="/iframeSimulation.js"
data-only-simulation="true"
data-with-homepage="true"
data-max-height="500"></script>
</main>
</body>
</html>
4 changes: 4 additions & 0 deletions public/iframe.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ const script =
document.getElementById('ecolab-climat') ||
document.getElementById('nosgestesclimat')

if (!script) {
console.error('Iframe Nos Gestes Climat: No target element found')
}

const integratorUrl = encodeURIComponent(window.location.href.toString())

const srcURL = new URL(script.src)
Expand Down
42 changes: 25 additions & 17 deletions public/iframeSimulation.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ const script =
document.getElementById('ecolab-climat') ||
document.getElementById('nosgestesclimat')

if (!script) {
console.error('Iframe Nos Gestes Climat: No target element found')
}

const integratorUrl = encodeURIComponent(window.location.href.toString())

const srcURL = new URL(script.src)
Expand All @@ -13,24 +17,35 @@ const possibleOptions = [
{ key: 'lang' },
{ key: 'onlySimulation' },
{ key: 'pr' },
{ key: 'withHomepage' },
{ key: 'maxHeight' },
]

const lang = script.dataset.lang

const url = new URL(hostname)

url.pathname = `/${lang ? lang + '/' : ''}simulateur/bilan`
// Check if withHomepage is true
const withHomepage = script.dataset.withHomepage

if (withHomepage) {
url.pathname = `/${lang ? lang + '/accueil-iframe' : 'accueil-iframe'}`
} else {
url.pathname = `/${lang ? lang + '/' : ''}simulateur/bilan`
}

url.searchParams.append('iframe', 'true')
url.searchParams.append('integratorUrl', integratorUrl)

possibleOptions.forEach(({ key, legacy }) => {
const value = script.dataset[key] || script.dataset[legacy]
possibleOptions
.filter(({ key }) => key !== 'maxHeight')
.forEach(({ key, legacy }) => {
const value = script.dataset[key] || script.dataset[legacy]

if (value) {
url.searchParams.append(key === 'pr' ? 'PR' : key, value)
}
})
if (value) {
url.searchParams.append(key === 'pr' ? 'PR' : key, value)
}
})

const iframe = document.createElement('iframe')

Expand All @@ -41,20 +56,13 @@ const iframeAttributes = {
mozallowfullscreen: true,
allow: 'fullscreen',
id: 'iframeNGC',
style: 'border: none; width: 100%; display: block; height: 801px;',
style: `border: none; width: 100%; display: block; height: 801px; ${
script.dataset.maxHeight ? `max-height: ${script.dataset.maxHeight}px;` : ''
}`,
}

for (var key in iframeAttributes) {
iframe.setAttribute(key, iframeAttributes[key])
}

script.parentNode.insertBefore(iframe, script)

window.addEventListener('message', function (evt) {
if (
evt.data.kind === 'resize-height' &&
iframe.style.height !== `${evt.data.value}px`
) {
iframe.style.height = `${evt.data.value}px`
}
})
3 changes: 0 additions & 3 deletions public/images/actions/README.md

This file was deleted.

6 changes: 3 additions & 3 deletions src/app/(large-layout)/stats/_components/StatsContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
useCurrentMonthWebsites,
useGetSharedSimulationEvents,
} from '@/helpers/matomo'
import { useNumberSubscribers } from '@/hooks/useNumberSubscriber'
import { useMainNewsletter } from '@/hooks/useMainNewsletter'
import type { UseQueryResult } from '@tanstack/react-query'
import AcquisitionBlock from './content/AcquisitionBlock'
import MetabaseIframe from './content/MetabaseIframe'
Expand Down Expand Up @@ -70,7 +70,7 @@ export default function StatsContent() {
const currentMonthWebsites = useCurrentMonthWebsites()
const currentMonthSocials = useCurrentMonthSocials()
const allSharedSimulationEvents = useGetSharedSimulationEvents()
const allSubscribers = useNumberSubscribers()
const { data: mainNewsletter } = useMainNewsletter()

return (
<div>
Expand Down Expand Up @@ -127,7 +127,7 @@ export default function StatsContent() {
currentMonthIframeVisitsData,
]) => (
<AcquisitionBlock
allSubscribers={allSubscribers}
mainNewsletter={mainNewsletter}
allSharedSimulationEventsData={allSharedSimulationEventsData}
currentMonthWebsitesData={currentMonthWebsitesData}
currentMonthSocialsData={currentMonthSocialsData}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import Trans from '@/components/translation/Trans'
import Card from '@/design-system/layout/Card'
import { useLocale } from '@/hooks/useLocale'
import type { Newsletter } from '@/hooks/useMainNewsletter'
import { formatPercentage, formatValue } from '../utils/formatFigure'
import Sources from './Sources'

type Props = {
allSubscribers: any
mainNewsletter?: Newsletter
allSharedSimulationEventsData: any
currentMonthWebsitesData: any
currentMonthSocialsData: any
Expand All @@ -14,7 +15,7 @@ type Props = {
}

export default function AcquisitionBlock({
allSubscribers,
mainNewsletter,
allSharedSimulationEventsData,
currentMonthWebsitesData,
currentMonthSocialsData,
Expand All @@ -27,9 +28,11 @@ export default function AcquisitionBlock({
<div className="mt-4">
<div className="flex flex-row gap-4">
<Card className="flex-1">
<strong className="text-3xl">
{formatValue(allSubscribers?.data, locale)}
</strong>{' '}
{!!mainNewsletter && (
<strong className="text-3xl">
{formatValue(mainNewsletter.totalSubscribers, locale)}
</strong>
)}
<p className="mb-0 text-sm">
<Trans>inscrits à l'infolettre</Trans>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
useTempEngine,
useUser,
} from '@/publicodes-state'
import { trackEvent } from '@/utils/matomo/trackEvent'
import { trackEvent } from '@/utils/analytics/trackEvent'
import type { DottedName, NGCRuleNode } from '@incubateur-ademe/nosgestesclimat'
import { utils } from 'publicodes'
import ActionForm from '../../_components/actionsContent/actions/ActionForm'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Emoji from '@/design-system/utils/Emoji'
import { getCarbonFootprint } from '@/helpers/actions/getCarbonFootprint'
import { useClientTranslation } from '@/hooks/useClientTranslation'
import { useCurrentSimulation, useEngine, useUser } from '@/publicodes-state'
import { trackEvent } from '@/utils/matomo/trackEvent'
import { trackEvent } from '@/utils/analytics/trackEvent'

export default function ActionsTutorial() {
const { t, i18n } = useClientTranslation()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Trans from '@/components/translation/Trans'
import { actionsClickAdeme } from '@/constants/tracking/pages/actions'
import Card from '@/design-system/layout/Card'
import { useClientTranslation } from '@/hooks/useClientTranslation'
import { trackEvent } from '@/utils/matomo/trackEvent'
import { trackEvent } from '@/utils/analytics/trackEvent'

export default function AllerPlusLoin() {
const { t } = useClientTranslation()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
useTempEngine,
useUser,
} from '@/publicodes-state'
import { trackEvent } from '@/utils/matomo/trackEvent'
import { trackEvent } from '@/utils/analytics/trackEvent'
import { encodeRuleName } from '@/utils/publicodes/encodeRuleName'
import type { DottedName } from '@incubateur-ademe/nosgestesclimat'
import { useCallback } from 'react'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
useEngine,
useUser,
} from '@/publicodes-state'
import { trackEvent } from '@/utils/matomo/trackEvent'
import { trackEvent } from '@/utils/analytics/trackEvent'
import { Fragment } from 'react'
import ActionCard from './ActionCard'
import ActionForm from './ActionForm'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
getTextDarkColor,
} from '@/helpers/getCategoryColorClass'
import { useRule } from '@/publicodes-state'
import { trackEvent } from '@/utils/matomo/trackEvent'
import { trackEvent } from '@/utils/analytics/trackEvent'
import type { DottedName } from '@incubateur-ademe/nosgestesclimat'
import { useRouter, useSearchParams } from 'next/navigation'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import EmailInput from '@/design-system/inputs/EmailInput'
import PrenomInput from '@/design-system/inputs/PrenomInput'
import { useClientTranslation } from '@/hooks/useClientTranslation'
import { useUser } from '@/publicodes-state'
import { trackEvent } from '@/utils/analytics/trackEvent'
import { formatEmail } from '@/utils/format/formatEmail'
import { trackEvent } from '@/utils/matomo/trackEvent'
import { useRouter } from 'next/navigation'
import { useForm as useReactHookForm } from 'react-hook-form'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import { useEndPage } from '@/hooks/navigation/useEndPage'
import { useSimulateurPage } from '@/hooks/navigation/useSimulateurPage'
import { useClientTranslation } from '@/hooks/useClientTranslation'
import { useCurrentSimulation, useUser } from '@/publicodes-state'
import { trackEvent } from '@/utils/analytics/trackEvent'
import { formatEmail } from '@/utils/format/formatEmail'
import { trackEvent } from '@/utils/matomo/trackEvent'
import { captureException } from '@sentry/react'
import { useSearchParams } from 'next/navigation'
import { useEffect, useState } from 'react'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { useIsGroupOwner } from '@/hooks/groups/useIsGroupOwner'
import { useUpdateGroup } from '@/hooks/groups/useUpdateGroup'
import { useClientTranslation } from '@/hooks/useClientTranslation'
import type { Group } from '@/types/groups'
import { trackEvent } from '@/utils/matomo/trackEvent'
import { trackEvent } from '@/utils/analytics/trackEvent'
import { captureException } from '@sentry/react'
import { useState } from 'react'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { amisDashboardCopyLink } from '@/constants/tracking/pages/amisDashboard'
import Button from '@/design-system/inputs/Button'
import Emoji from '@/design-system/utils/Emoji'
import type { Group } from '@/types/groups'
import { trackEvent } from '@/utils/matomo/trackEvent'
import { trackEvent } from '@/utils/analytics/trackEvent'
import { useEffect, useRef, useState } from 'react'

const SubmitButton = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { linkToClassement } from '@/helpers/navigation/classementPages'
import { useDeleteGroup } from '@/hooks/groups/useDeleteGroup'
import { useUser } from '@/publicodes-state'
import type { Group } from '@/types/groups'
import { trackEvent } from '@/utils/matomo/trackEvent'
import { trackEvent } from '@/utils/analytics/trackEvent'
import { captureException } from '@sentry/react'
import { useRouter } from 'next/navigation'
import { useEffect, useRef, useState } from 'react'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Trans from '@/components/translation/Trans'
import { classementCreateOrganisation } from '@/constants/tracking/pages/classements'
import ButtonLink from '@/design-system/inputs/ButtonLink'
import type { Organisation } from '@/types/organisations'
import { trackEvent } from '@/utils/matomo/trackEvent'
import { trackEvent } from '@/utils/analytics/trackEvent'

type Props = {
organisations?: Organisation[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Trans from '@/components/translation/Trans'
import { classementClickOrganisation } from '@/constants/tracking/pages/classements'
import Badge from '@/design-system/layout/Badge'
import type { Organisation } from '@/types/organisations'
import { trackEvent } from '@/utils/matomo/trackEvent'
import { trackEvent } from '@/utils/analytics/trackEvent'

export default function OrganisationItem({
organisation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Trans from '@/components/translation/Trans'
import { classementClickOrganisation } from '@/constants/tracking/pages/classements'
import { getLinkToPollDashboard } from '@/helpers/navigation/pollPages'
import type { Organisation, OrganisationPoll } from '@/types/organisations'
import { trackEvent } from '@/utils/matomo/trackEvent'
import { trackEvent } from '@/utils/analytics/trackEvent'

type Props = {
organisation: Organisation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Emoji from '@/design-system/utils/Emoji'
import { getLinkToGroupDashboard } from '@/helpers/navigation/groupPages'
import { useUser } from '@/publicodes-state'
import type { Group } from '@/types/groups'
import { trackEvent } from '@/utils/matomo/trackEvent'
import { trackEvent } from '@/utils/analytics/trackEvent'

type Props = {
group: Group
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
import Button from '@/design-system/inputs/Button'
import ButtonLink from '@/design-system/inputs/ButtonLink'
import { useClientTranslation } from '@/hooks/useClientTranslation'
import { trackEvent } from '@/utils/matomo/trackEvent'
import { trackEvent } from '@/utils/analytics/trackEvent'

type Props = {
linkToPrev: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Emoji from '@/design-system/utils/Emoji'
import { useSimulateurPage } from '@/hooks/navigation/useSimulateurPage'
import { usePollQueryParams } from '@/hooks/organisations/usePollQueryParams'
import { useCurrentSimulation } from '@/publicodes-state'
import { trackEvent } from '@/utils/matomo/trackEvent'
import { trackEvent } from '@/utils/analytics/trackEvent'
import { useContext, useEffect, useState } from 'react'
import { InfosContext } from '../_components/InfosProvider'

Expand Down
Loading
Loading