Skip to content

feat(homepage): #IMPULS-6022, design and save the customization form - #1122

Open
jcbe-ode wants to merge 26 commits into
develop-b2schoolfrom
feat-IMPULS-6022
Open

feat(homepage): #IMPULS-6022, design and save the customization form#1122
jcbe-ode wants to merge 26 commits into
develop-b2schoolfrom
feat-IMPULS-6022

Conversation

@jcbe-ode

@jcbe-ode jcbe-ode commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

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.

  • Chore (PATCH)
  • Doc (PATCH)
  • Bug fix (PATCH)
  • New feature (MINOR)

Which packages changed?

Please check the name of the package you changed

  • admin
  • app-registry
  • archive
  • auth
  • cas
  • common
  • communication
  • conversation
  • directory
  • feeder
  • infra
  • portal
  • session
  • test
  • tests
  • timeline
  • workspace

Tests

  1. Describe here the tests you performed
  2. Step by step
  3. With expected results

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 ! 😃

jcbe-ode and others added 19 commits September 4, 2026 09:33
…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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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';

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sans déc' ?!

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 thread timeline/frontend/src/hooks/useCustomization.ts Outdated
Comment thread timeline/frontend/src/hooks/useCustomizationForm.ts
Comment on lines +46 to +50
await savePreferences({
language: { 'default-domain': selectedLanguage },
background: selectedBackground,
});
await customizeService.saveSkin(theme.themeName, selectedFont);
Comment thread timeline/frontend/src/hooks/useCustomizationForm.ts Outdated
Comment on lines +74 to +76
http.put('/userbook/api/preferences', () =>
HttpResponse.json({ status: 'ok' }),
),
Comment thread timeline/frontend/src/components/CustomizationForm/CustomizationForm.tsx Outdated
jcbe-ode and others added 5 commits September 4, 2026 10:07
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>
@sonarqubecloud

sonarqubecloud Bot commented Sep 4, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants