Skip to content

Replace GlDropdown with GlDisclosureDropdown in action_buttons.vue

What does this MR do and why?

Resolves Migrate "app/assets/javascripts/vue_merge_reque... (#413486 - closed). This MR uses GlDisclosureDropdown to replace deprecated GlDropdown. wiget prop is removed because it's not used. No visual change is supposed to happen.

Screenshots or screen recordings

Before After
image image

How to set up and validate locally

  1. Apply this patch:
widget.patch
Index: ee/app/assets/javascripts/vue_merge_request_widget/extensions/status_checks/index.vue
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/ee/app/assets/javascripts/vue_merge_request_widget/extensions/status_checks/index.vue b/ee/app/assets/javascripts/vue_merge_request_widget/extensions/status_checks/index.vue
--- a/ee/app/assets/javascripts/vue_merge_request_widget/extensions/status_checks/index.vue	(revision 6229da44120c841a0ecba63fac2f29592e6c1132)
+++ b/ee/app/assets/javascripts/vue_merge_request_widget/extensions/status_checks/index.vue	(date 1693388729909)
@@ -87,7 +87,7 @@
     tertiaryButtons() {
       const actionButtons = [];
 
-      if (this.hasError) {
+      if (true || this.hasError) {
         const isLoading = Boolean(this.loadingState);
 
         actionButtons.push({
Index: app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue
--- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue	(revision 6229da44120c841a0ecba63fac2f29592e6c1132)
+++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue	(date 1693385856652)
@@ -63,7 +63,7 @@
     actions() {
       const actions = [];
 
-      if (this.mr.canRevertInCurrentMR) {
+      if (true || this.mr.canRevertInCurrentMR) {
         actions.push({
           text: this.revertLabel,
           tooltipText: this.revertTitle,
@@ -80,7 +80,7 @@
         });
       }
 
-      if (this.mr.canCherryPickInCurrentMR) {
+      if (true || this.mr.canCherryPickInCurrentMR) {
         actions.push({
           text: this.cherryPickLabel,
           tooltipText: this.cherryPickTitle,
Index: app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
--- a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue	(revision 6229da44120c841a0ecba63fac2f29592e6c1132)
+++ b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue	(date 1693385778398)
@@ -201,6 +201,7 @@
       return !['preparing', 'nothingToMerge'].includes(this.mr.state);
     },
     componentName() {
+      return 'mr-widget-merged';
       return stateToComponentMap[this.machineState] || classState[this.mr.state];
     },
     hasPipelineMustSucceedConflict() {
  1. Open any MR
  2. Shrink your viewport to 400px wide
  3. Click on dropdowns in the merge widgets
Edited by Stanislav Lashmanov

Merge request reports

Loading