diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 19:05:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 19:05:49 +0300 |
commit | 43a25d93ebdabea52f99b05e15b06250cd8f07d7 (patch) | |
tree | dceebdc68925362117480a5d672bcff122fb625b /app/assets/javascripts/commons | |
parent | 20c84b99005abd1c82101dfeff264ac50d2df211 (diff) |
Add latest changes from gitlab-org/gitlab@16-0-stable-eev16.0.0-rc42
Diffstat (limited to 'app/assets/javascripts/commons')
-rw-r--r-- | app/assets/javascripts/commons/bootstrap.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/commons/nav/user_merge_requests.js | 12 | ||||
-rw-r--r-- | app/assets/javascripts/commons/vue.js | 2 |
3 files changed, 13 insertions, 5 deletions
diff --git a/app/assets/javascripts/commons/bootstrap.js b/app/assets/javascripts/commons/bootstrap.js index e5e23f2fb5e..17c9f55a8a0 100644 --- a/app/assets/javascripts/commons/bootstrap.js +++ b/app/assets/javascripts/commons/bootstrap.js @@ -1,10 +1,6 @@ import $ from 'jquery'; // bootstrap jQuery plugins -import 'bootstrap/js/dist/alert'; -import 'bootstrap/js/dist/button'; -import 'bootstrap/js/dist/collapse'; -import 'bootstrap/js/dist/modal'; import 'bootstrap/js/dist/dropdown'; import 'bootstrap/js/dist/tab'; diff --git a/app/assets/javascripts/commons/nav/user_merge_requests.js b/app/assets/javascripts/commons/nav/user_merge_requests.js index b105273ece7..90dca0310f3 100644 --- a/app/assets/javascripts/commons/nav/user_merge_requests.js +++ b/app/assets/javascripts/commons/nav/user_merge_requests.js @@ -30,6 +30,12 @@ function updateMergeRequestCounts(newCount) { * Refresh user counts (and broadcast if open) */ export function refreshUserMergeRequestCounts() { + if (gon?.use_new_navigation) { + // The new sidebar manages _all_ the counts in + // ~/super_sidebar/user_counts_manager.js + document.dispatchEvent(new CustomEvent('userCounts:fetch')); + return Promise.resolve(); + } return getUserCounts() .then(({ data }) => { const assignedMergeRequests = data.assigned_merge_requests; @@ -67,6 +73,12 @@ export function closeUserCountsBroadcast() { * no special functionality lost except cross tab notifications */ export function openUserCountsBroadcast() { + if (gon?.use_new_navigation) { + // The new sidebar broadcasts _all counts_ and updates + // them accordingly. Therefore we do not need this manager + // ~/super_sidebar/user_counts_manager.js + return; + } closeUserCountsBroadcast(); if (window.BroadcastChannel) { diff --git a/app/assets/javascripts/commons/vue.js b/app/assets/javascripts/commons/vue.js index cd24a503631..09d2e065e58 100644 --- a/app/assets/javascripts/commons/vue.js +++ b/app/assets/javascripts/commons/vue.js @@ -9,4 +9,4 @@ if (process.env.NODE_ENV !== 'production') { Vue.use(GlFeatureFlagsPlugin); Vue.use(Translate); -Vue.config.ignoredElements = ['gl-emoji']; +Vue.config.ignoredElements = ['gl-emoji', 'copy-code']; |