Refactor deprecated object options to arrays
What does this MR do and why?
The object format for options in GlFormRadioGroup, GlFormSelect, and GlFormCheckboxGroup is deprecated, see form-options.js#L78-83. While working on a Bootstrap vue migration, gitlab-org/gitlab-services/design.gitlab.com!5836 (merged), I noticed we still use this format in 2 locations. This MR refactors those to arrays.
Replace deprecated object format `:options` props with
arrays for `gl-form-radio-group` and `gl-form-select`:
- `duo_chat_history_expiration.vue`: Convert
`EXPIRATION_COLUMNS` from object to array
- `geo_site_form_selective_sync.vue`: Add computed
that converts the object prop via `Object.values()`
- Update corresponding specs to match new formatReferences
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
duo_chat_history_expiration.vue
- GDK running in Self Managed (
export GITLAB_SIMULATE_SAAS=0in env.runit file) - Go to Admin > Gitlab duo > Change configuration
- Select "After the conversation was last updated" or "After the conversation was created" and save
- Go back to same settings and verify your selection was saved
geo_site_form_selective_sync.vue
- Apply patch
diff --git a/ee/app/assets/javascripts/geo_sites/components/app.vue b/ee/app/assets/javascripts/geo_sites/components/app.vue
index 05ec8ef2a718..3754932341ef 100644
--- a/ee/app/assets/javascripts/geo_sites/components/app.vue
+++ b/ee/app/assets/javascripts/geo_sites/components/app.vue
@@ -108,7 +108,7 @@ export default {
<template>
<section>
- <page-heading v-if="hasSites" :heading="$options.i18n.geoSites">
+ <page-heading v-if="true" :heading="$options.i18n.geoSites">
<template #actions>
<gl-button
variant="confirm"- Go to Admin > Geo > Sites > Add new site
- Select different options in "Selective synchronization" dropdown and validate it changes the conditional rendering below it
| All projects | Projects in certain groups | Projects in certain storage shards |
|---|---|---|
![]() |
![]() |
![]() |
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 Lorenz van Herwaarden


