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

Clearer distinction in options/app configuraiton #533

Open
PragTob opened this issue Dec 23, 2024 · 0 comments
Open

Clearer distinction in options/app configuraiton #533

PragTob opened this issue Dec 23, 2024 · 0 comments

Comments

@PragTob
Copy link
Collaborator

PragTob commented Dec 23, 2024

Follow up from #506

I found the organization of feature flags as they exist in the application right now a bit hard to follow and mixed up:

  • naming doesn't seem to be consistent
  • some feature flags are actually more like configuration options

For reference their current state:

# enable/disable brainstorming teasers and configure delete brainstormings option:
config :mindwendel, :options,
  feature_brainstorming_teasers: EnvHelper.enabled?("MW_FEATURE_BRAINSTORMING_TEASER", "true"),
  feature_file_upload: feature_file_upload,
  feature_brainstorming_removal_after_days: delete_brainstormings_after_days,
  feature_privacy_imprint_enabled: feature_privacy_imprint_enabled,
  # use a strict csp everywhere except in development. we need to relax the setting a bit for webpack
  csp_relax: config_env() == :dev
  • most of them are pre-fixed feature
  • one has an _enabled suffix
  • brainstorming removal after days is more of an option

I'd suggest to split it:

  • feature flags get their own key to be organized under (either inside of options or another one) to promote organization/consistency and so we can drop the consistent feature_ prefix
  • brainstorming_removal_after_days (and csp_relax) can stay in options - we could create an Options module similar to the feature flag module to unify access to them

of course that's a small/cosmetic kind of change but it'd help before it grows more :)

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

No branches or pull requests

1 participant