Skip to content

🏗️(frontend) footer configurable #959

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

AntoLC
Copy link
Collaborator

@AntoLC AntoLC commented May 12, 2025

Purpose

We need to have different footer per instance.
The footer has to be displayable or not.

Proposal

Bind the frontend footer with the theme configuration file:
https://github.com/suitenumerique/docs/blob/main/src/backend/impress/configuration/theme/default.json

  • The footer is configured from a json to be easily overwritable
  • The legal pages are removed from the codebase, for our instances they will be stored directly in Docs, as a doc.

  • 🏗️(frontend) Footer configurable
  • 🔥(frontend) remove legal pages

Demo

footer-configurable

@AntoLC AntoLC self-assigned this May 12, 2025
The rule @typescript-eslint/no-unused-vars didn't
have a ignore pattern. A ignore pattern can be
usefull in some cases.
@AntoLC AntoLC force-pushed the refacto/footer-from-json branch from 13b6929 to 24febb9 Compare May 13, 2025 10:14
@AntoLC AntoLC marked this pull request as ready for review May 13, 2025 10:15
@AntoLC AntoLC added the refacto label May 13, 2025
AntoLC added 3 commits May 13, 2025 12:35
Improve config testcases:
- let THEME_CUSTOMIZATION_FILE_PATH to be set to
check the default value
- add helper function overrideConfig
To have different footer per instance the
content of the footer is now configurable
from the theme customization file.

See THEME_CUSTOMIZATION_FILE_PATH env var.
Legal pages are not needed anymore in the application.
In the dsfr instances, the legal pages will be
displayed on a Docs pages.
We let the users of Docs managing the legal pages
on their own instances.
@AntoLC AntoLC force-pushed the refacto/footer-from-json branch from 24febb9 to f1d2050 Compare May 13, 2025 10:38
@AntoLC AntoLC changed the title 💄(frontend) footer configurable 🏗️(frontend) footer configurable May 13, 2025
@AntoLC AntoLC requested review from rvveber and PanchoutNathan May 13, 2025 10:39
@AntoLC AntoLC mentioned this pull request May 13, 2025
9 tasks

### Example of JSON

The json must follow some rules: https://github.com/suitenumerique/docs/blob/main/src/backend/impress/configuration/theme/default.json
Copy link
Collaborator

@rvveber rvveber May 13, 2025

Choose a reason for hiding this comment

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

To illustrate the rules, can we point it to the demo.json in helm directory instead of the default.json?

Some customizations, like the translations do not make sense to be in default.json (yet).
I've put them in demo.json to illustrate how it is used.

If the user views this documentation, maybe it is better to link to the same json file.
see here

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

Successfully merging this pull request may close these issues.

2 participants