Skip to content
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

Initialize the feature flag store state on server request #4223

Closed
obulat opened this issue Apr 29, 2024 · 2 comments · Fixed by #4231 or #4295
Closed

Initialize the feature flag store state on server request #4223

obulat opened this issue Apr 29, 2024 · 2 comments · Fixed by #4231 or #4295
Assignees
Labels
💻 aspect: code Concerns the software code in the repository ✨ goal: improvement Improvement to an existing user-facing feature 🟧 priority: high Stalls work on the project or its dependents 🧱 stack: frontend Related to the Nuxt frontend

Comments

@obulat
Copy link
Contributor

obulat commented Apr 29, 2024

Problem

Currently, we check the DEPLOYMENT_ENV value every time we access the feature flag state.
This is probably unnecessary because the env variable will not be changed, or the changed variable will not be read by the Nuxt app, during the run of the app.

Description

We should initialize the flag status (enabled/disabled/switchable) and the default state when initializing the feature flag store. This will make the flag state (on/off) lookup much easier and faster.

Alternatives

If the state of the feature flags was kept somewhere online, we could update a flag status/state without having to deploy the app. Then we would need to fetch this file every time we call the feature flag status/state getter, and would need to re-evaluate every time, even on the client.

Additional context

@obulat obulat added 🟧 priority: high Stalls work on the project or its dependents ✨ goal: improvement Improvement to an existing user-facing feature 💻 aspect: code Concerns the software code in the repository 🧱 stack: frontend Related to the Nuxt frontend labels Apr 29, 2024
@obulat obulat self-assigned this Apr 29, 2024
@sarayourfriend
Copy link
Contributor

Closed by #4231

@obulat
Copy link
Contributor Author

obulat commented May 10, 2024

Re-opening this issue because #4231 initialized the states of the UI and the provider stores, but not the feature flag store's state.

@obulat obulat reopened this May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository ✨ goal: improvement Improvement to an existing user-facing feature 🟧 priority: high Stalls work on the project or its dependents 🧱 stack: frontend Related to the Nuxt frontend
Projects
Archived in project
2 participants