Skip to content

✨(back) allow theme customnization using a configuration file #948

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

Merged
merged 5 commits into from
May 12, 2025

Conversation

lunika
Copy link
Member

@lunika lunika commented May 7, 2025

Purpose

We want to customize the theme by using a configuration file. This configuration file path can be defined using the settings THEME_CUSTOMIZATION_FILE_PATH. If this file does not exists or is an invalid json, an empty json object will be added in the config endpoint.

Proposal

  • ✨(back) allow theme customnization using a configuration file
  • remove footer endpoint
  • cache config endpoint
  • documentation

@lunika lunika requested a review from AntoLC May 7, 2025 09:56
@lunika lunika self-assigned this May 7, 2025
@lunika lunika marked this pull request as draft May 7, 2025 09:56
@lunika lunika marked this pull request as ready for review May 7, 2025 20:25
@lunika lunika force-pushed the feat/customization-file branch from a30af40 to f7eeef2 Compare May 7, 2025 20:26
@lunika lunika removed the wip label May 7, 2025
@lunika lunika force-pushed the feat/customization-file branch 2 times, most recently from b334c7c to 0a4ec40 Compare May 9, 2025 14:00
@AntoLC AntoLC self-requested a review May 12, 2025 08:33
Copy link
Collaborator

@AntoLC AntoLC left a comment

Choose a reason for hiding this comment

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

To have the test e2e to pass, here:

FRONTEND_FOOTER_FEATURE_ENABLED: true,

You can replace it with:

-  FRONTEND_FOOTER_FEATURE_ENABLED: true,
+  theme_customization: {},

@lunika lunika force-pushed the feat/customization-file branch 2 times, most recently from a6502b9 to 4cd469c Compare May 12, 2025 12:49
@lunika lunika enabled auto-merge (squash) May 12, 2025 13:01
@lunika lunika disabled auto-merge May 12, 2025 13:05
@lunika lunika force-pushed the feat/customization-file branch 2 times, most recently from 8eb56a9 to 3eaecc3 Compare May 12, 2025 13:45
lunika added 5 commits May 12, 2025 15:56
We want to customize the theme by using a configuration file. This
configuration file path can be defined using the settings
THEME_CUSTOMIZATION_FILE_PATH. If this file does not exists or is an
invalid json, an empty json object will be added in the config endpoint.
With the configuration file, the footer endpoint can be removed and will
not be used anymore by the front application.
In order to load a custom theme file with our helm chart, we allow to
load the content of a file into a config map and then use this configmap
as a volume in the backend deployment
We want to change the cache key prefix using an environment variable.
This settings can be changed at every deployment in order to reset to
use a fresh new cache.
The env.d/development/common file sets
AI_FEATURE_ENABLED=true.
When pytest starts it imports these variables, so
the /api/v1.0/config endpoint returns
AI_FEATURE_ENABLED=True and the test_api_config
assertion fails.

Explicitly overriding AI_FEATURE_ENABLED=False in
test_api_config restores the expected behaviour
and makes the whole test-suite green.

Signed-off-by: ReinforcedKnowledge <[email protected]>
@lunika lunika force-pushed the feat/customization-file branch from 3eaecc3 to 4b0fd22 Compare May 12, 2025 13:56
@lunika lunika merged commit 4b0fd22 into main May 12, 2025
20 of 21 checks passed
@lunika lunika deleted the feat/customization-file branch May 12, 2025 14:15
@AntoLC AntoLC mentioned this pull request May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants