-
Notifications
You must be signed in to change notification settings - Fork 175
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
Feature flag changes are ignored on client side when default bundle is used #20991
Comments
Looks like a bug indeed. We can agreed to always rebuild in this case, if the feature flags config is changed comparing to what is in the default/custom bundle. UPD: to optimise this, we would need an extra flag in each feature flag that tells if a feature has only Java or JS/TS codes. Flow will re-build bundle only if it spots a new feature flag (or removing a feature flag) that corresponds to a feature that has JS/TS. |
|
Updates vaadin-featureflags.js before running Vite to disable all feature flags in the bundle. Releated to vaadin/flow#20991
To summarize the issues:
Based on internal discussions, at the moment there should be no need for a custom build if a flag is activated: the default bundles should already contain everything is needed. The only requirement is that the client side flag values are updated based on the project settings. Potential solutions:
The only potential issue would be if a frontend only feature (no Java component class) is not in the default bundle. If such a case is possible, we can potentially add an additional field |
Activating a feature flag in the project does not work when a default bundle is used because the values of the flags sent to the client are hard-coded at bundle build time. Additionally, if a feature flag is active during bundle creation, it remains active on the client side even if the project does not activate it in the `vaadin-featureflags.properties` file. This change ensures that feature flags in the frontend bundle are always disabled initially and are activated on page load based on the current project settings. Fixes #20991
Activating a feature flag in the project does not work when a default bundle is used because the values of the flags sent to the client are hard-coded at bundle build time. Additionally, if a feature flag is active during bundle creation, it remains active on the client side even if the project does not activate it in the `vaadin-featureflags.properties` file. This change ensures that feature flags in the frontend bundle are always disabled initially and are activated on page load based on the current project settings. Fixes #20991
Description of the bug
I downloaded a project from Vaadin Start and enabled the
accessibleDisabledButtons
feature flag via Copilot. When the server starts, the logs show that the feature flag is activated, but it remains false on the client-side. On the contrary, thedashboardComponent
flag appears as true on the client-side even though it's not present invaadin-featureflags.properties
.Setting
vaadin.frontend.hotdeploy=true
resolves the issue, which suggests that it's related to the default bundle, which Vaadin start projects use by default.Expected behavior
It should be possible to activate / deactivate feature flags in Vaadin start projects without setting any additional parameters.
Minimal reproducible example
button-test.zip
Versions
The text was updated successfully, but these errors were encountered: