-
Notifications
You must be signed in to change notification settings - Fork 331
Manage components/features at runtime #842
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
Comments
I would like to implement Option 2. |
I had a quick chat with @AntoLC about this, they have something in mind. Plan would be to have configs in the database in a table I don't know how @AntoLC would like to proceed with this, it would need some synchronization to make a clean implementation. I'm all in favor of a clean json config file on my side :), there is already too much environment variables it will be a mess to manage and document it all. With a structured json that would be a lot easier and we could make a schema to type it etc. we could even explore cue for that. |
The frontend configuration is already a json: {
"AI_FEATURE_ENABLED": true,
"COLLABORATION_WS_URL": "ws://localhost:4444/collaboration/ws/",
"CRISP_WEBSITE_ID": null,
...
} Seems more backend related so. Ideally for you, how would it be backend side so ? |
This comment has been minimized.
This comment has been minimized.
I'm currently developing a PoC |
After some thoughts, discussions, and experiments, i am revoking my proposal above. I think it's better to define the configuration schema in the backend — even for frontend-specific config. Mainly because when a user sets up their frontend through an admin interface, they expect their config to survive schema changes. that means we need proper migrations. If the schema is generated (even partially) from the frontend, migration becomes ambiguous and painful. -- We are already generating the openapi spec from the Django backend. |
Uh oh!
There was an error while loading. Please reload this page.
Feature Request
We should be able to activate or deactivate the components and feature at runtime
At the moment those are:
AI_FEATURE_ENABLED
)FRONTEND_PATH_JSON_FOOTER
is not set)Currently the way we can customize is not entirely consistent between what can be done at build time and runtime and how some components/features can be disabled or enabled.
La Gauffre and Proconnect can be disabled at build time but we should be able to do it at runtime. For instance as hosting provider I may want to activate proconnect for some of my users without needing to manage multiple themes at build time.
While AI can be enabled with
AI_FEATURE_ENABLED
, the footer can be disabled ifFRONTEND_PATH_JSON_FOOTER
is not set. This is not a big issues but is a bit inconsistent. AI could be enabled only ifAI_BASE_URL
is set.Describe the solution you'd like
Option 1:
In Docs everything is done through environment variables so we would need new environment variables for each of those components or a single variables for instance
COMPONENTS_ENABLED
which contains a list of strings.Option 2:
Ideally a json with all Docs config would be better than environment variables which will get messy at one point vs structured data in json.
In the end those variables ends up in a json, so maybe we can already override it if we mount our own custom json ?
Priority: Add a way to disable Homepage and go straight to login
The text was updated successfully, but these errors were encountered: