From 03c59b405a82dc1e5dcb39d5da0681dcdcadcfc5 Mon Sep 17 00:00:00 2001
From: GitLab Renovate Bot <gitlab-bot@gitlab.com>
Date: Thu, 16 Feb 2023 16:23:25 +0000
Subject: [PATCH 1/5] Update dependency @gitlab/ui to v56

---
 package.json | 2 +-
 yarn.lock    | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/package.json b/package.json
index ebf860be405b69..99c89daf0730b7 100644
--- a/package.json
+++ b/package.json
@@ -57,7 +57,7 @@
     "@gitlab/favicon-overlay": "2.0.0",
     "@gitlab/fonts": "^1.2.0",
     "@gitlab/svgs": "3.20.0",
-    "@gitlab/ui": "55.2.1",
+    "@gitlab/ui": "56.0.0",
     "@gitlab/visual-review-tools": "1.7.3",
     "@gitlab/web-ide": "0.0.1-dev-20230210211358",
     "@rails/actioncable": "6.1.4-7",
diff --git a/yarn.lock b/yarn.lock
index 83cffa6c497a19..a9063326279582 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1347,10 +1347,10 @@
   resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-3.20.0.tgz#4ee4f2f24304d13ccce58f82c2ecd87e556f35b4"
   integrity sha512-nYTF4j5kon4XbBr/sAzuubgxjIne9+RTZLmSrSaL9FL4eyuv9aa7YMCcOrlIbYX5jlSYlcD+ck2F2M1sqXXOBA==
 
-"@gitlab/ui@55.2.1":
-  version "55.2.1"
-  resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-55.2.1.tgz#140d8e2c7428777a745fb1cfb33c29c3f1133113"
-  integrity sha512-fIvGzM4nZtHWaUWfaM9PSPJJJFcnvCLCrdAsobiiMlxFFCEwDNm99oL+uzQgbatQRjjIdHqyFKFNMo3rg6U+AQ==
+"@gitlab/ui@56.0.0":
+  version "56.0.0"
+  resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-56.0.0.tgz#fd3b144893b01a8eae408ce8ca4477240aeb493e"
+  integrity sha512-kuoI+q5zYmmK9stpb1YJKvJNTD+NXiG6EOCw5+UQDpo5PgeDzrQ4vm7JuocYU9dNZlHMR2vVPMxi3uG0+y5JkA==
   dependencies:
     "@popperjs/core" "^2.11.2"
     bootstrap-vue "2.20.1"
-- 
GitLab


From 23cf2d865d7431623d0ae73264e38c0ed1814b50 Mon Sep 17 00:00:00 2001
From: Olena Horal-Koretska <ohoralkoretska@gitlab.com>
Date: Mon, 6 Feb 2023 20:33:04 +0200
Subject: [PATCH 2/5] Fix super sidebar MR menu

---
 .../components/merge_request_menu.vue            | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/app/assets/javascripts/super_sidebar/components/merge_request_menu.vue b/app/assets/javascripts/super_sidebar/components/merge_request_menu.vue
index edc13e305cfb23..94fc6aedcc09a1 100644
--- a/app/assets/javascripts/super_sidebar/components/merge_request_menu.vue
+++ b/app/assets/javascripts/super_sidebar/components/merge_request_menu.vue
@@ -12,29 +12,19 @@ export default {
       required: true,
     },
   },
-  methods: {
-    navigate() {
-      this.$refs.link.click();
-    },
-  },
 };
 </script>
 
 <template>
-  <gl-disclosure-dropdown :items="items" placement="center" @action="navigate">
+  <gl-disclosure-dropdown :items="items" placement="center">
     <template #toggle>
       <slot></slot>
     </template>
     <template #list-item="{ item }">
-      <a
-        ref="link"
-        class="gl-display-flex gl-align-items-center gl-justify-content-space-between gl-hover-text-gray-900 gl-hover-text-decoration-none gl-text-gray-900"
-        :href="item.href"
-        tabindex="-1"
-      >
+      <span class="gl-display-flex gl-align-items-center gl-justify-content-space-between">
         {{ item.text }}
         <gl-badge pill size="sm" variant="neutral">{{ item.count || 0 }}</gl-badge>
-      </a>
+      </span>
     </template>
   </gl-disclosure-dropdown>
 </template>
-- 
GitLab


From 5afc58f1666efd0b83e53080fd780d9b0f170e61 Mon Sep 17 00:00:00 2001
From: Olena Horal-Koretska <ohoralkoretska@gitlab.com>
Date: Mon, 6 Feb 2023 20:43:45 +0200
Subject: [PATCH 3/5] Beautify pending comment header

---
 .../components/preview_dropdown.vue           | 20 +++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/app/assets/javascripts/batch_comments/components/preview_dropdown.vue b/app/assets/javascripts/batch_comments/components/preview_dropdown.vue
index 4ac0c8c4894e57..4e290739e26127 100644
--- a/app/assets/javascripts/batch_comments/components/preview_dropdown.vue
+++ b/app/assets/javascripts/batch_comments/components/preview_dropdown.vue
@@ -55,17 +55,21 @@ export default {
 <template>
   <gl-disclosure-dropdown :items="listItems" dropup data-qa-selector="review_preview_dropdown">
     <template #toggle>
-      <gl-button
-        >{{ __('Pending comments') }} <drafts-count variant="neutral" /><gl-icon
-          class="dropdown-chevron"
-          name="chevron-up"
-      /></gl-button>
+      <gl-button>
+        {{ __('Pending comments') }}
+        <drafts-count variant="neutral" />
+        <gl-icon class="dropdown-chevron" name="chevron-up" />
+      </gl-button>
     </template>
 
     <template #header>
-      <p class="gl-dropdown-header-top">
-        {{ n__('%d pending comment', '%d pending comments', draftsCount) }}
-      </p>
+      <div
+        class="gl-display-flex gl-align-items-center gl-p-4! gl-min-h-8 gl-border-b-1 gl-border-b-solid gl-border-b-gray-200"
+      >
+        <span class="gl-flex-grow-1 gl-font-weight-bold gl-font-sm gl-pr-2">
+          {{ n__('%d pending comment', '%d pending comments', draftsCount) }}
+        </span>
+      </div>
     </template>
 
     <template #list-item="{ item }">
-- 
GitLab


From 0ba45bc9ba7e69dec7d7c7e8a85093c1dcaaec5c Mon Sep 17 00:00:00 2001
From: Olena Horal-Koretska <ohoralkoretska@gitlab.com>
Date: Wed, 8 Feb 2023 20:42:51 +0200
Subject: [PATCH 4/5] Update new sidebar help menu

---
 .../super_sidebar/components/help_center.vue  | 23 +++++--------------
 1 file changed, 6 insertions(+), 17 deletions(-)

diff --git a/app/assets/javascripts/super_sidebar/components/help_center.vue b/app/assets/javascripts/super_sidebar/components/help_center.vue
index 8e7c7efa631038..ee4c50e7705fd0 100644
--- a/app/assets/javascripts/super_sidebar/components/help_center.vue
+++ b/app/assets/javascripts/super_sidebar/components/help_center.vue
@@ -96,12 +96,6 @@ export default {
       return true;
     },
 
-    handleAction({ action }) {
-      if (action) {
-        action();
-      }
-    },
-
     showKeyboardShortcuts() {
       this.$refs.dropdown.close();
       window?.toggleShortcutsHelp();
@@ -140,11 +134,7 @@ export default {
       :group="itemGroups.versionCheck"
     >
       <template #list-item="{ item }">
-        <a
-          :href="item.href"
-          tabindex="-1"
-          class="gl-display-flex gl-flex-direction-column gl-line-height-24 gl-text-gray-900 gl-hover-text-gray-900 gl-hover-text-decoration-none"
-        >
+        <span class="gl-display-flex gl-flex-direction-column gl-line-height-24">
           <span class="gl-font-sm gl-font-weight-bold">
             {{ item.text }}
             <gl-emoji data-name="rocket" />
@@ -153,7 +143,7 @@ export default {
             <span class="gl-mr-2">{{ item.version }}</span>
             <gitlab-version-check-badge v-if="updateSeverity" :status="updateSeverity" size="sm" />
           </span>
-        </a>
+        </span>
       </template>
     </gl-disclosure-dropdown-group>
 
@@ -162,16 +152,15 @@ export default {
       :bordered="sidebarData.show_version_check"
     />
 
-    <gl-disclosure-dropdown-group :group="itemGroups.helpActions" bordered @action="handleAction">
+    <gl-disclosure-dropdown-group :group="itemGroups.helpActions" bordered>
       <template #list-item="{ item }">
-        <button
-          tabindex="-1"
-          class="gl-bg-transparent gl-w-full gl-border-none gl-display-flex gl-justify-content-space-between gl-p-0 gl-text-gray-900"
+        <span
+          class="gl-display-flex gl-justify-content-space-between gl-align-items-center gl-my-n1"
         >
           {{ item.text }}
           <gl-badge v-if="item.count" pill size="sm" variant="info">{{ item.count }}</gl-badge>
           <kbd v-else-if="item.shortcut" class="flat">?</kbd>
-        </button>
+        </span>
       </template>
     </gl-disclosure-dropdown-group>
   </gl-disclosure-dropdown>
-- 
GitLab


From bad8c5e5a216f0c3c8a5c36fa1b28fc167c964c9 Mon Sep 17 00:00:00 2001
From: Olena Horal-Koretska <ohoralkoretska@gitlab.com>
Date: Thu, 16 Feb 2023 21:11:05 +0200
Subject: [PATCH 5/5] Fix Preview dropdown specs

---
 .../components/preview_dropdown.vue           |  2 +-
 .../components/preview_dropdown_spec.js       | 19 ++++++++++---------
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/app/assets/javascripts/batch_comments/components/preview_dropdown.vue b/app/assets/javascripts/batch_comments/components/preview_dropdown.vue
index 4e290739e26127..ca9cb03ca37020 100644
--- a/app/assets/javascripts/batch_comments/components/preview_dropdown.vue
+++ b/app/assets/javascripts/batch_comments/components/preview_dropdown.vue
@@ -73,7 +73,7 @@ export default {
     </template>
 
     <template #list-item="{ item }">
-      <preview-item :draft="item" :is-last="item.last" @click="onClickDraft(item)" />
+      <preview-item :draft="item" :is-last="item.last" />
     </template>
   </gl-disclosure-dropdown>
 </template>
diff --git a/spec/frontend/batch_comments/components/preview_dropdown_spec.js b/spec/frontend/batch_comments/components/preview_dropdown_spec.js
index f86e003ab5ff75..3a28bf4ade85eb 100644
--- a/spec/frontend/batch_comments/components/preview_dropdown_spec.js
+++ b/spec/frontend/batch_comments/components/preview_dropdown_spec.js
@@ -1,7 +1,6 @@
 import Vue, { nextTick } from 'vue';
 import Vuex from 'vuex';
-import { GlDisclosureDropdown } from '@gitlab/ui';
-import { shallowMount } from '@vue/test-utils';
+import { mount } from '@vue/test-utils';
 import { TEST_HOST } from 'helpers/test_constants';
 import { visitUrl } from '~/lib/utils/url_utility';
 import PreviewDropdown from '~/batch_comments/components/preview_dropdown.vue';
@@ -46,9 +45,11 @@ function factory({ viewDiffsFileByFile = false, draftsCount = 1, sortedDrafts =
     },
   });
 
-  wrapper = shallowMount(PreviewDropdown, {
+  wrapper = mount(PreviewDropdown, {
     store,
-    stubs: { GlDisclosureDropdown },
+    stubs: {
+      PreviewItem: true,
+    },
   });
 }
 
@@ -59,12 +60,12 @@ describe('Batch comments preview dropdown', () => {
         viewDiffsFileByFile: true,
         sortedDrafts: [{ id: 1, file_hash: 'hash' }],
       });
-
-      findPreviewItem().vm.$emit('click');
-
+      findPreviewItem().trigger('click');
       await nextTick();
 
       expect(setCurrentFileHash).toHaveBeenCalledWith(expect.anything(), 'hash');
+
+      await nextTick();
       expect(scrollToDraft).toHaveBeenCalledWith(
         expect.anything(),
         expect.objectContaining({ id: 1, file_hash: 'hash' }),
@@ -77,7 +78,7 @@ describe('Batch comments preview dropdown', () => {
         sortedDrafts: [{ id: 1 }],
       });
 
-      findPreviewItem().vm.$emit('click');
+      findPreviewItem().trigger('click');
 
       await nextTick();
 
@@ -93,7 +94,7 @@ describe('Batch comments preview dropdown', () => {
         sortedDrafts: [{ id: 1, position: { head_sha: '1234' } }],
       });
 
-      findPreviewItem().vm.$emit('click');
+      findPreviewItem().trigger('click');
 
       await nextTick();
 
-- 
GitLab