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

Feature flags GUI #513

Merged

Conversation

richardlences
Copy link
Contributor

No description provided.

config/routes.rb Outdated Show resolved Hide resolved
app/views/admin/feature_flags/index.html.erb Outdated Show resolved Hide resolved
test/system/admin/feature_flags_management_test.rb Outdated Show resolved Hide resolved
app/lib/sidebar_menu.rb Outdated Show resolved Hide resolved
Comment on lines 91 to 95
def list_features
AVAILABLE_FEATURE_FLAGS.map do |feature|
{ name: feature.to_s,
enabled: feature_enabled?(feature),
features_including: (feature_flags + [feature.to_s]).join(","),
Copy link
Member

Choose a reason for hiding this comment

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

Toto je interna vec view - cize tam by som to takto rozdeloval, plus teda hladas partition metodu.

Copy link
Member

Choose a reason for hiding this comment

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

@luciajanikova vies tu napisat flags ktore nema byt vidiet - resp. len v ?labs

Copy link
Member

Choose a reason for hiding this comment

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

Viditelne flagy: :audit_log, :archive, :api, :fs_sync
Schovane flagy: :message_draft_import, :fs_api
podla mna takto @jsuchal

Copy link
Member

Choose a reason for hiding this comment

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

@richardlences vies takto nastavit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ano nastavil som to tak

@jsuchal
Copy link
Member

jsuchal commented Nov 23, 2024

@richardlences hod sem nejaky screenshot nech vidime ako to vyzera

@richardlences
Copy link
Contributor Author

Screenshot_20241124_144954

@jsuchal
Copy link
Member

jsuchal commented Nov 25, 2024

@luciajanikova tuto imho potrebujeme si povedat, ze ci toto dovolime zapnut hocikomu alebo niektore dame do "beta" rezimu a nebudu viditelne bezne. By som povedal, ze aby sme to vedeli zapinat nejako lahko, tak ked dame parameter ?labs do url, tak to mozes zapnut?

@richardlences richardlences requested a review from jsuchal December 1, 2024 11:50

def update
authorize([:admin, :feature_flag])
@tenant.feature_flags = feature_flags_params[:enabled] == "true" ? @tenant.feature_flags.union([params[:id]]) : @tenant.feature_flags - [params[:id]]
Copy link
Member

Choose a reason for hiding this comment

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

Tento zapis neviem uplne precitat na prvu lebo nepouzivas uplne bezne metody. Ak chceme len pridat feature flag ak je enabled tak by som mozno zvazil takyto zapis.

Suggested change
@tenant.feature_flags = feature_flags_params[:enabled] == "true" ? @tenant.feature_flags.union([params[:id]]) : @tenant.feature_flags - [params[:id]]
if feature_flags_params[:enabled] == "true"
@tenant.feature_flags << params[:id]
else
@tenant.feature_flags.delete(params[:id])
end

Copy link
Member

@jsuchal jsuchal left a comment

Choose a reason for hiding this comment

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

Este trosku poladme a uz sme skoro tam

@richardlences
Copy link
Contributor Author

No nejako som to opravil ale teda zatial su vsetky aj v available

@richardlences richardlences requested a review from jsuchal December 5, 2024 15:05
@@ -0,0 +1,19 @@
---
Copy link
Member

Choose a reason for hiding this comment

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

Tento súbor tu asi nemá byť

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Aha ano uz som to odstranil

app/lib/sidebar_menu.rb Outdated Show resolved Hide resolved
@jsuchal jsuchal merged commit 42dde8d into slovensko-digital:main Dec 5, 2024
3 checks passed
@jsuchal
Copy link
Member

jsuchal commented Dec 5, 2024

@richardlences dobojovane! diky!

@richardlences
Copy link
Contributor Author

Super

@richardlences richardlences deleted the feature/feature_flags_gui branch December 5, 2024 17:47
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

Successfully merging this pull request may close these issues.

3 participants