Skip to content

Fix feature settings block toggle

What does this MR do and why?

There was a change to the toggle animation logic in the shared SettingsBlock component that caused a regression to the settings toggle in FeatureSettingsBlock component. This component is used in Model Selection and Duo Self-Hosted feature settings pages.

This MR resolves this regression by:

  • Updating FeatureSettingsBlock to handle toggle state.
  • Revert horizontal padding change for chevron icon in SettingsBlock component

References

Screenshots or screen recordings

Description Before After
Model selection model_selection_before model_selection_after
Duo Self-Hosted duo_self_hosted_before.mov duo_self_hosted_after.mov
SettingsBlock padding change settings_block_before.mov settings_block_after.mov
SettingsBlock HAML component has no regressions settings_block_haml_before.mov settings_block_haml_after.mov

How to set up and validate locally

Model Selection
  • Run GDK on SAAS mode: GITLAB_SIMULATE_SAAS=1 gdk start
  • Run the following setup script: GITLAB_SIMULATE_SAAS=1 bundle exec 'rake gitlab:duo:setup'
  • Go to groups/gitlab-duo/-/settings/gitlab_duo/model_selection

Duo Self-Hosted

  • You need an active online or offline, Ultimate or Premium license.
  • Run GDK on non-SAAS mode: GITLAB_SIMULATE_SAAS=0 gdk start
  • Run the following setup script for Duo Enterprise add-on: GITLAB_SIMULATE_SAAS=0 bundle exec 'rake gitlab:duo:setup[duo_enterprise]'
  • Go to /admin/ai/duo_self_hosted/features

Settings Block

  • I chose the SettingsBlock implemented within Organizations UI for this case.
  • Enable the flag: ui_for_organizations
  • Go to /-/organizations/default/settings/general
  • Observe icon has equal padding
Settings Block HAML
  • We can use the first couple settings in the Admin Settings
  • Go to https://gdk.test:3443/admin/application_settings/general
  • Observe no regressions to toggle animation and/or padding

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Cindy Halim

Merge request reports

Loading