feat(homepage): #IMPULS-6022, design and save the customization form - #1122
Open
jcbe-ode wants to merge 26 commits into
Open
feat(homepage): #IMPULS-6022, design and save the customization form#1122jcbe-ode wants to merge 26 commits into
jcbe-ode wants to merge 26 commits into
Conversation
22 tasks
jcbe-ode
force-pushed
the
feat-IMPULS-6022
branch
from
August 27, 2026 15:12
0854b66 to
1fd603d
Compare
jenkinsEdificePublic
force-pushed
the
develop-b2school
branch
2 times, most recently
from
September 1, 2026 14:31
51d1252 to
3066afd
Compare
jcbe-ode
force-pushed
the
feat-IMPULS-6022
branch
from
September 3, 2026 07:52
1fd603d to
ec2d72c
Compare
…rowser offline) (#1123) Le front timeline ne mockait que le bootstrap Edifice, sans handlers metier (notifications, flash messages, dernieres infos) ni mode browser mocke, alors que la homepage repose presque entierement sur des containers @edifice.io/react/homepage qui appellent ces endpoints. Les mocks sont separes en platform/ (endpoints de plateforme ou consommes par un composant @edifice.io/*, calque sur la structure de edifice-frontend-framework/packages/config/src/msw pour preparer une mutualisation future) et app/ (uniquement i18n, teste seulement, car sa charge utile depend de l'arborescence du repo entcore). pnpm dev:mock demarre desormais l'app complete (homepage + /customize + BetaSwitch) sans backend, sans .env, sans recette.
jcbe-ode
force-pushed
the
feat-IMPULS-6022
branch
from
September 4, 2026 07:35
3396da3 to
0963466
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Critical build dependency and mock failures remain, alongside functional, accessibility, and hook dependency issues.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds Timeline homepage customization for language, font, and background preferences, with persistence and mock-development support.
Changes:
- Implements the customization form, routing, styling, and feedback.
- Adds preference APIs, localization, and persistence.
- Reorganizes MSW handlers and fixtures.
- Adds backend preference-mapping coverage.
File summaries
| File | Description |
|---|---|
timeline/src/main/resources/i18n/fr.json |
Adds customization messages. |
timeline/frontend/vite.config.ts |
Disables proxies in mock mode. |
timeline/frontend/src/vite-env.d.ts |
Types the mock environment flag. |
timeline/frontend/src/services/queries/customize.ts |
Adds background queries. |
timeline/frontend/src/services/api/preferenceService.ts |
Updates preference typing. |
timeline/frontend/src/services/api/customizeService.ts |
Adds customization APIs. |
timeline/frontend/src/routes/pages/customize/index.ts |
Exports the customization route. |
timeline/frontend/src/routes/pages/customize/customize.tsx |
Integrates form saving and navigation. |
timeline/frontend/src/routes/pages/customize/customize.css |
Styles customization choices. |
timeline/frontend/src/routes/index.tsx |
Updates lazy route loading. |
timeline/frontend/src/mocks/test-handlers.ts |
Aggregates test handlers. |
timeline/frontend/src/mocks/server.ts |
Configures test handlers. |
timeline/frontend/src/mocks/README.md |
Documents mock architecture. |
timeline/frontend/src/mocks/platform/index.ts |
Groups platform handlers. |
timeline/frontend/src/mocks/platform/handlers/workspace.ts |
Mocks workspace quota. |
timeline/frontend/src/mocks/platform/handlers/userbook.ts |
Mocks userbook and preferences. |
timeline/frontend/src/mocks/platform/handlers/timeline.ts |
Mocks Timeline endpoints. |
timeline/frontend/src/mocks/platform/handlers/theme.ts |
Mocks theme configuration. |
timeline/frontend/src/mocks/platform/handlers/index.ts |
Exports platform handlers. |
timeline/frontend/src/mocks/platform/handlers/directory.ts |
Mocks directory endpoints. |
timeline/frontend/src/mocks/platform/handlers/common.ts |
Mocks shared platform endpoints. |
timeline/frontend/src/mocks/platform/handlers/auth.ts |
Mocks session information. |
timeline/frontend/src/mocks/platform/handlers/actualites.ts |
Mocks latest news. |
timeline/frontend/src/mocks/platform/data/userinfo.ts |
Adds session fixtures. |
timeline/frontend/src/mocks/platform/data/preferences.ts |
Adds preference fixtures. |
timeline/frontend/src/mocks/platform/data/notification.ts |
Adds notification fixtures. |
timeline/frontend/src/mocks/platform/data/lastInfos.ts |
Adds news fixtures. |
timeline/frontend/src/mocks/platform/data/index.ts |
Exports platform fixtures. |
timeline/frontend/src/mocks/platform/data/flashMessage.ts |
Adds flash-message fixtures. |
timeline/frontend/src/mocks/platform/data/customize.ts |
Adds customization fixtures. |
timeline/frontend/src/mocks/platform/data/children.ts |
Adds child-account fixtures. |
timeline/frontend/src/mocks/middleware.ts |
Adds simulated latency. |
timeline/frontend/src/mocks/index.ts |
Removes obsolete mock content. |
timeline/frontend/src/mocks/handlers.ts |
Removes monolithic handlers. |
timeline/frontend/src/mocks/browser.ts |
Configures the browser worker. |
timeline/frontend/src/mocks/browser-handlers.ts |
Aggregates browser handlers. |
timeline/frontend/src/mocks/app/index.ts |
Groups application handlers. |
timeline/frontend/src/mocks/app/handlers/index.ts |
Exports application handlers. |
timeline/frontend/src/mocks/app/handlers/i18n.ts |
Mocks translation endpoints. |
timeline/frontend/src/main.tsx |
Initializes mocks before rendering. |
timeline/frontend/src/hooks/useCustomizeForm.ts |
Removes the obsolete form hook. |
timeline/frontend/src/hooks/useCustomizationForm.ts |
Implements form state and saving. |
timeline/frontend/src/hooks/useCustomization.ts |
Loads and persists preferences. |
timeline/frontend/src/components/CustomizeForm/CustomizeForm.tsx |
Removes the former form. |
timeline/frontend/src/components/CustomizeForm/ChoiceButton.tsx |
Removes the former choice button. |
timeline/frontend/src/components/CustomizationForm/index.ts |
Exports the new form. |
timeline/frontend/src/components/CustomizationForm/CustomizationForm.tsx |
Renders customization choices. |
timeline/frontend/src/components/CustomizationForm/ChoiceSkeleton.tsx |
Adds loading placeholders. |
timeline/frontend/src/components/CustomizationForm/ChoiceButton.tsx |
Adds variant-aware choice buttons. |
timeline/frontend/src/components/CustomizationForm/ChoiceButton.css |
Styles choice buttons. |
timeline/frontend/public/mockServiceWorker.js |
Adds the generated MSW worker. |
timeline/frontend/package.json |
Adds mock-development configuration. |
directory/src/test/java/org/entcore/directory/services/impl/DefaultPreferenceServiceTest.java |
Tests background preference mapping. |
Review details
Suppressed comments (1)
timeline/src/main/resources/i18n/fr.json:208
- This placeholder will be rendered literally: the React i18next setup configures
[[/]]as interpolation delimiters, while this message uses{{code}}. Use[[code]]so the failing preference name appears in the toast.
- Files reviewed: 51/59 changed files
- Comments generated: 9
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| @@ -0,0 +1,62 @@ | |||
| import { useToast, useUserPreferences } from '@edifice.io/react'; | |||
Comment on lines
+5
to
+9
| const FAKE_AVATAR = | ||
| 'data:image/svg+xml;base64,' + | ||
| btoa( | ||
| '<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect width="100" height="100" fill="#ccc"/></svg>', | ||
| ); |
Comment on lines
+46
to
+50
| await savePreferences({ | ||
| language: { 'default-domain': selectedLanguage }, | ||
| background: selectedBackground, | ||
| }); | ||
| await customizeService.saveSkin(theme.themeName, selectedFont); |
Comment on lines
+74
to
+76
| http.put('/userbook/api/preferences', () => | ||
| HttpResponse.json({ status: 'ok' }), | ||
| ), |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Volet de Personnalisation de la homepage.
Fixes
https://edifice-community.atlassian.net/browse/IMPULS-6022
Type of change
Please check options that are relevant.
Which packages changed?
Please check the name of the package you changed
Tests
Reminder
Security flaws
Performance impacts (think bulk !)
Unit tests were replayed
Unit tests were added and/or changed
I have updated the reminder for the version including my modifications
All done ! 😃