Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-11-20 06:12:07 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-20 06:12:07 +0300
commit56d256a4670bc8cc22b3fae516aa10c9fb48e410 (patch)
treeb21d2dcf871e71ff2f35961c081edccbc7ec033f
parentd6085b68c5dcc2bd4dc884d2fa6b75831f85c883 (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--app/assets/javascripts/diffs/components/app.vue4
-rw-r--r--app/assets/javascripts/diffs/utils/discussions.js76
-rw-r--r--app/assets/javascripts/experimentation/utils.js2
-rw-r--r--app/assets/javascripts/notes/components/discussion_notes.vue90
-rw-r--r--app/assets/javascripts/notes/components/notes_app.vue4
-rw-r--r--app/assets/stylesheets/framework/contextual_sidebar.scss5
-rw-r--r--app/assets/stylesheets/startup/startup-dark.scss5
-rw-r--r--app/assets/stylesheets/startup/startup-general.scss5
-rw-r--r--doc/development/experiment_guide/gitlab_experiment.md2
-rw-r--r--doc/development/experiment_guide/index.md2
-rw-r--r--doc/development/ruby_upgrade.md2
-rw-r--r--spec/frontend/diffs/components/diff_discussions_spec.js4
-rw-r--r--spec/frontend/diffs/utils/discussions_spec.js133
-rw-r--r--spec/frontend/notes/components/discussion_notes_spec.js4
-rw-r--r--spec/frontend/notes/components/noteable_discussion_spec.js10
-rw-r--r--spec/frontend/notes/components/notes_app_spec.js4
16 files changed, 47 insertions, 305 deletions
diff --git a/app/assets/javascripts/diffs/components/app.vue b/app/assets/javascripts/diffs/components/app.vue
index f405b82b05b..66d06a3a1b6 100644
--- a/app/assets/javascripts/diffs/components/app.vue
+++ b/app/assets/javascripts/diffs/components/app.vue
@@ -44,7 +44,6 @@ import {
TRACKING_MULTIPLE_FILES_MODE,
} from '../constants';
-import { discussionIntersectionObserverHandlerFactory } from '../utils/discussions';
import diffsEventHub from '../event_hub';
import { reviewStatuses } from '../utils/file_reviews';
import { diffsApp } from '../utils/performance';
@@ -87,9 +86,6 @@ export default {
ALERT_MERGE_CONFLICT,
ALERT_COLLAPSED_FILES,
},
- provide: {
- discussionObserverHandler: discussionIntersectionObserverHandlerFactory(),
- },
props: {
endpoint: {
type: String,
diff --git a/app/assets/javascripts/diffs/utils/discussions.js b/app/assets/javascripts/diffs/utils/discussions.js
deleted file mode 100644
index c404705d209..00000000000
--- a/app/assets/javascripts/diffs/utils/discussions.js
+++ /dev/null
@@ -1,76 +0,0 @@
-function normalize(processable) {
- const { entry } = processable;
- const offset = entry.rootBounds.bottom - entry.boundingClientRect.top;
- const direction =
- offset < 0 ? 'Up' : 'Down'; /* eslint-disable-line @gitlab/require-i18n-strings */
-
- return {
- ...processable,
- entry: {
- time: entry.time,
- type: entry.isIntersecting ? 'intersection' : `scroll${direction}`,
- },
- };
-}
-
-function sort({ entry: alpha }, { entry: beta }) {
- const diff = alpha.time - beta.time;
- let order = 0;
-
- if (diff < 0) {
- order = -1;
- } else if (diff > 0) {
- order = 1;
- } else if (alpha.type === 'intersection' && beta.type === 'scrollUp') {
- order = 2;
- } else if (alpha.type === 'scrollUp' && beta.type === 'intersection') {
- order = -2;
- }
-
- return order;
-}
-
-function filter(entry) {
- return entry.type !== 'scrollDown';
-}
-
-export function discussionIntersectionObserverHandlerFactory() {
- let unprocessed = [];
- let timer = null;
-
- return (processable) => {
- unprocessed.push(processable);
-
- if (timer) {
- clearTimeout(timer);
- }
-
- timer = setTimeout(() => {
- unprocessed
- .map(normalize)
- .filter(filter)
- .sort(sort)
- .forEach((discussionObservationContainer) => {
- const {
- entry: { type },
- currentDiscussion,
- isFirstUnresolved,
- isDiffsPage,
- functions: { setCurrentDiscussionId, getPreviousUnresolvedDiscussionId },
- } = discussionObservationContainer;
-
- if (type === 'intersection') {
- setCurrentDiscussionId(currentDiscussion.id);
- } else if (type === 'scrollUp') {
- setCurrentDiscussionId(
- isFirstUnresolved
- ? null
- : getPreviousUnresolvedDiscussionId(currentDiscussion.id, isDiffsPage),
- );
- }
- });
-
- unprocessed = [];
- }, 0);
- };
-}
diff --git a/app/assets/javascripts/experimentation/utils.js b/app/assets/javascripts/experimentation/utils.js
index 7f2a7ff8e40..69fa7adc653 100644
--- a/app/assets/javascripts/experimentation/utils.js
+++ b/app/assets/javascripts/experimentation/utils.js
@@ -1,4 +1,4 @@
-// This file only applies to use of experiments through https://gitlab.com/gitlab-org/gitlab-experiment
+// This file only applies to use of experiments through https://gitlab.com/gitlab-org/ruby/gems/gitlab-experiment
import { get, mapValues, pick } from 'lodash';
import { DEFAULT_VARIANT, CANDIDATE_VARIANT, TRACKING_CONTEXT_SCHEMA } from './constants';
diff --git a/app/assets/javascripts/notes/components/discussion_notes.vue b/app/assets/javascripts/notes/components/discussion_notes.vue
index d1df4eb848b..6fcfa66ea49 100644
--- a/app/assets/javascripts/notes/components/discussion_notes.vue
+++ b/app/assets/javascripts/notes/components/discussion_notes.vue
@@ -1,6 +1,5 @@
<script>
import { mapGetters, mapActions } from 'vuex';
-import { GlIntersectionObserver } from '@gitlab/ui';
import { __ } from '~/locale';
import PlaceholderNote from '~/vue_shared/components/notes/placeholder_note.vue';
import PlaceholderSystemNote from '~/vue_shared/components/notes/placeholder_system_note.vue';
@@ -17,9 +16,7 @@ export default {
ToggleRepliesWidget,
NoteEditedText,
DiscussionNotesRepliesWrapper,
- GlIntersectionObserver,
},
- inject: ['discussionObserverHandler'],
props: {
discussion: {
type: Object,
@@ -57,11 +54,7 @@ export default {
},
},
computed: {
- ...mapGetters([
- 'userCanReply',
- 'previousUnresolvedDiscussionId',
- 'firstUnresolvedDiscussionId',
- ]),
+ ...mapGetters(['userCanReply']),
hasReplies() {
return Boolean(this.replies.length);
},
@@ -84,20 +77,9 @@ export default {
url: this.discussion.discussion_path,
};
},
- isFirstUnresolved() {
- return this.firstUnresolvedDiscussionId === this.discussion.id;
- },
- },
- observerOptions: {
- threshold: 0,
- rootMargin: '0px 0px -50% 0px',
},
methods: {
- ...mapActions([
- 'toggleDiscussion',
- 'setSelectedCommentPositionHover',
- 'setCurrentDiscussionId',
- ]),
+ ...mapActions(['toggleDiscussion', 'setSelectedCommentPositionHover']),
componentName(note) {
if (note.isPlaceholderNote) {
if (note.placeholderType === SYSTEM_NOTE) {
@@ -128,18 +110,6 @@ export default {
this.setSelectedCommentPositionHover();
}
},
- observerTriggered(entry) {
- this.discussionObserverHandler({
- entry,
- isFirstUnresolved: this.isFirstUnresolved,
- currentDiscussion: { ...this.discussion },
- isDiffsPage: !this.isOverviewTab,
- functions: {
- setCurrentDiscussionId: this.setCurrentDiscussionId,
- getPreviousUnresolvedDiscussionId: this.previousUnresolvedDiscussionId,
- },
- });
- },
},
};
</script>
@@ -152,35 +122,33 @@ export default {
@mouseleave="handleMouseLeave(discussion)"
>
<template v-if="shouldGroupReplies">
- <gl-intersection-observer :options="$options.observerOptions" @update="observerTriggered">
- <component
- :is="componentName(firstNote)"
- :note="componentData(firstNote)"
- :line="line || diffLine"
- :discussion-file="discussion.diff_file"
- :commit="commit"
- :help-page-path="helpPagePath"
- :show-reply-button="userCanReply"
- :discussion-root="true"
- :discussion-resolve-path="discussion.resolve_path"
- :is-overview-tab="isOverviewTab"
- @handleDeleteNote="$emit('deleteNote')"
- @startReplying="$emit('startReplying')"
- >
- <template #discussion-resolved-text>
- <note-edited-text
- v-if="discussion.resolved"
- :edited-at="discussion.resolved_at"
- :edited-by="discussion.resolved_by"
- :action-text="resolvedText"
- class-name="discussion-headline-light js-discussion-headline discussion-resolved-text"
- />
- </template>
- <template #avatar-badge>
- <slot name="avatar-badge"></slot>
- </template>
- </component>
- </gl-intersection-observer>
+ <component
+ :is="componentName(firstNote)"
+ :note="componentData(firstNote)"
+ :line="line || diffLine"
+ :discussion-file="discussion.diff_file"
+ :commit="commit"
+ :help-page-path="helpPagePath"
+ :show-reply-button="userCanReply"
+ :discussion-root="true"
+ :discussion-resolve-path="discussion.resolve_path"
+ :is-overview-tab="isOverviewTab"
+ @handleDeleteNote="$emit('deleteNote')"
+ @startReplying="$emit('startReplying')"
+ >
+ <template #discussion-resolved-text>
+ <note-edited-text
+ v-if="discussion.resolved"
+ :edited-at="discussion.resolved_at"
+ :edited-by="discussion.resolved_by"
+ :action-text="resolvedText"
+ class-name="discussion-headline-light js-discussion-headline discussion-resolved-text"
+ />
+ </template>
+ <template #avatar-badge>
+ <slot name="avatar-badge"></slot>
+ </template>
+ </component>
<discussion-notes-replies-wrapper :is-diff-discussion="discussion.diff_discussion">
<toggle-replies-widget
v-if="hasReplies"
diff --git a/app/assets/javascripts/notes/components/notes_app.vue b/app/assets/javascripts/notes/components/notes_app.vue
index 3ab3e7a20d4..e568fd0c2d7 100644
--- a/app/assets/javascripts/notes/components/notes_app.vue
+++ b/app/assets/javascripts/notes/components/notes_app.vue
@@ -8,7 +8,6 @@ import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item
import OrderedLayout from '~/vue_shared/components/ordered_layout.vue';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import draftNote from '../../batch_comments/components/draft_note.vue';
-import { discussionIntersectionObserverHandlerFactory } from '../../diffs/utils/discussions';
import { getLocationHash, doesHashExistInUrl } from '../../lib/utils/url_utility';
import placeholderNote from '../../vue_shared/components/notes/placeholder_note.vue';
import placeholderSystemNote from '../../vue_shared/components/notes/placeholder_system_note.vue';
@@ -39,9 +38,6 @@ export default {
TimelineEntryItem,
},
mixins: [glFeatureFlagsMixin()],
- provide: {
- discussionObserverHandler: discussionIntersectionObserverHandlerFactory(),
- },
props: {
noteableData: {
type: Object,
diff --git a/app/assets/stylesheets/framework/contextual_sidebar.scss b/app/assets/stylesheets/framework/contextual_sidebar.scss
index fa1892903a3..03dcbd2b8f9 100644
--- a/app/assets/stylesheets/framework/contextual_sidebar.scss
+++ b/app/assets/stylesheets/framework/contextual_sidebar.scss
@@ -81,7 +81,6 @@
@include gl-px-0;
@include gl-pb-2;
@include gl-pt-0;
- min-width: 150px;
background-color: $gray-10;
box-shadow: 0 $gl-spacing-scale-2 $gl-spacing-scale-5 $t-gray-a-24, 0 0 $gl-spacing-scale-1 $t-gray-a-24;
border-style: none;
@@ -309,6 +308,10 @@
}
a.has-sub-items + .sidebar-sub-level-items {
+ @include media-breakpoint-up(sm) {
+ min-width: 150px;
+ }
+
.fly-out-top-item {
@include fly-out-top-item($has-sub-items: true);
}
diff --git a/app/assets/stylesheets/startup/startup-dark.scss b/app/assets/stylesheets/startup/startup-dark.scss
index efa4b04ee62..f95dee96262 100644
--- a/app/assets/stylesheets/startup/startup-dark.scss
+++ b/app/assets/stylesheets/startup/startup-dark.scss
@@ -1139,6 +1139,11 @@ input {
border-right: 0.25rem solid #fff;
border-right-color: var(--black, #fff);
}
+@media (min-width: 576px) {
+ .nav-sidebar a.has-sub-items + .sidebar-sub-level-items {
+ min-width: 150px;
+ }
+}
.nav-sidebar a.has-sub-items + .sidebar-sub-level-items .fly-out-top-item {
display: none;
}
diff --git a/app/assets/stylesheets/startup/startup-general.scss b/app/assets/stylesheets/startup/startup-general.scss
index 977f994dc78..8ac547de9c0 100644
--- a/app/assets/stylesheets/startup/startup-general.scss
+++ b/app/assets/stylesheets/startup/startup-general.scss
@@ -1120,6 +1120,11 @@ input {
border-right: 0.25rem solid #000;
border-right-color: var(--black, #000);
}
+@media (min-width: 576px) {
+ .nav-sidebar a.has-sub-items + .sidebar-sub-level-items {
+ min-width: 150px;
+ }
+}
.nav-sidebar a.has-sub-items + .sidebar-sub-level-items .fly-out-top-item {
display: none;
}
diff --git a/doc/development/experiment_guide/gitlab_experiment.md b/doc/development/experiment_guide/gitlab_experiment.md
index af4512dcde0..d81ac5372e3 100644
--- a/doc/development/experiment_guide/gitlab_experiment.md
+++ b/doc/development/experiment_guide/gitlab_experiment.md
@@ -20,7 +20,7 @@ concepts which may seem confusing or advanced without understanding the underpin
of how GitLab uses feature flags in development. One concept: GLEX supports
experiments with multiple variants, which are sometimes referred to as A/B/n tests.
-The [`gitlab-experiment` project](https://gitlab.com/gitlab-org/gitlab-experiment)
+The [`gitlab-experiment` project](https://gitlab.com/gitlab-org/ruby/gems/gitlab-experiment)
exists in a separate repository, so it can be shared across any GitLab property that uses
Ruby. You should feel comfortable reading the documentation on that project as well
if you want to dig into more advanced topics.
diff --git a/doc/development/experiment_guide/index.md b/doc/development/experiment_guide/index.md
index fc88615f874..9937cb2ebd1 100644
--- a/doc/development/experiment_guide/index.md
+++ b/doc/development/experiment_guide/index.md
@@ -44,7 +44,7 @@ If the experiment is successful and becomes part of the product, any items that
## Implementing an experiment
-[`GLEX`](https://gitlab.com/gitlab-org/gitlab-experiment) - or `Gitlab::Experiment`, the `gitlab-experiment` gem - is the preferred option for implementing an experiment in GitLab.
+[`GLEX`](https://gitlab.com/gitlab-org/ruby/gems/gitlab-experiment) - or `Gitlab::Experiment`, the `gitlab-experiment` gem - is the preferred option for implementing an experiment in GitLab.
For more information, see [Implementing an A/B/n experiment using GLEX](gitlab_experiment.md).
diff --git a/doc/development/ruby_upgrade.md b/doc/development/ruby_upgrade.md
index f9816986b2d..064cb8daf98 100644
--- a/doc/development/ruby_upgrade.md
+++ b/doc/development/ruby_upgrade.md
@@ -146,7 +146,7 @@ When upgrading Ruby, consider updating the following repositories:
- [Gitaly](https://gitlab.com/gitlab-org/gitaly) ([example](https://gitlab.com/gitlab-org/gitaly/-/merge_requests/3771))
- [GitLab Labkit](https://gitlab.com/gitlab-org/labkit-ruby) ([example](https://gitlab.com/gitlab-org/labkit-ruby/-/merge_requests/79))
- [GitLab Exporter](https://gitlab.com/gitlab-org/gitlab-exporter) ([example](https://gitlab.com/gitlab-org/gitlab-exporter/-/merge_requests/150))
-- [GitLab Experiment](https://gitlab.com/gitlab-org/gitlab-experiment) ([example](https://gitlab.com/gitlab-org/gitlab-experiment/-/merge_requests/128))
+- [GitLab Experiment](https://gitlab.com/gitlab-org/ruby/gems/gitlab-experiment) ([example](https://gitlab.com/gitlab-org/ruby/gems/gitlab-experiment/-/merge_requests/128))
- [Gollum Lib](https://gitlab.com/gitlab-org/gollum-lib) ([example](https://gitlab.com/gitlab-org/gollum-lib/-/merge_requests/21))
- [GitLab Helm Chart](https://gitlab.com/gitlab-org/charts/gitlab) ([example](https://gitlab.com/gitlab-org/charts/gitlab/-/merge_requests/2162))
- [GitLab Sidekiq fetcher](https://gitlab.com/gitlab-org/sidekiq-reliable-fetch) ([example](https://gitlab.com/gitlab-org/sidekiq-reliable-fetch/-/merge_requests/33))
diff --git a/spec/frontend/diffs/components/diff_discussions_spec.js b/spec/frontend/diffs/components/diff_discussions_spec.js
index c847a79435a..bd6f4cd2545 100644
--- a/spec/frontend/diffs/components/diff_discussions_spec.js
+++ b/spec/frontend/diffs/components/diff_discussions_spec.js
@@ -1,7 +1,6 @@
import { GlIcon } from '@gitlab/ui';
import { mount, createLocalVue } from '@vue/test-utils';
import DiffDiscussions from '~/diffs/components/diff_discussions.vue';
-import { discussionIntersectionObserverHandlerFactory } from '~/diffs/utils/discussions';
import { createStore } from '~/mr_notes/stores';
import DiscussionNotes from '~/notes/components/discussion_notes.vue';
import NoteableDiscussion from '~/notes/components/noteable_discussion.vue';
@@ -20,9 +19,6 @@ describe('DiffDiscussions', () => {
store = createStore();
wrapper = mount(localVue.extend(DiffDiscussions), {
store,
- provide: {
- discussionObserverHandler: discussionIntersectionObserverHandlerFactory(),
- },
propsData: {
discussions: getDiscussionsMockData(),
...props,
diff --git a/spec/frontend/diffs/utils/discussions_spec.js b/spec/frontend/diffs/utils/discussions_spec.js
deleted file mode 100644
index 9a3d442d943..00000000000
--- a/spec/frontend/diffs/utils/discussions_spec.js
+++ /dev/null
@@ -1,133 +0,0 @@
-import { discussionIntersectionObserverHandlerFactory } from '~/diffs/utils/discussions';
-
-describe('Diff Discussions Utils', () => {
- describe('discussionIntersectionObserverHandlerFactory', () => {
- it('creates a handler function', () => {
- expect(discussionIntersectionObserverHandlerFactory()).toBeInstanceOf(Function);
- });
-
- describe('intersection observer handler', () => {
- const functions = {
- setCurrentDiscussionId: jest.fn(),
- getPreviousUnresolvedDiscussionId: jest.fn().mockImplementation((id) => {
- return Number(id) - 1;
- }),
- };
- const defaultProcessableWrapper = {
- entry: {
- time: 0,
- isIntersecting: true,
- rootBounds: {
- bottom: 0,
- },
- boundingClientRect: {
- top: 0,
- },
- },
- currentDiscussion: {
- id: 1,
- },
- isFirstUnresolved: false,
- isDiffsPage: true,
- };
- let handler;
- let getMock;
- let setMock;
-
- beforeEach(() => {
- functions.setCurrentDiscussionId.mockClear();
- functions.getPreviousUnresolvedDiscussionId.mockClear();
-
- defaultProcessableWrapper.functions = functions;
-
- setMock = functions.setCurrentDiscussionId.mock;
- getMock = functions.getPreviousUnresolvedDiscussionId.mock;
- handler = discussionIntersectionObserverHandlerFactory();
- });
-
- it('debounces multiple simultaneous requests into one queue', () => {
- handler(defaultProcessableWrapper);
- handler(defaultProcessableWrapper);
- handler(defaultProcessableWrapper);
- handler(defaultProcessableWrapper);
-
- expect(setTimeout).toHaveBeenCalledTimes(4);
- expect(clearTimeout).toHaveBeenCalledTimes(3);
-
- // By only advancing to one timer, we ensure it's all being batched into one queue
- jest.advanceTimersToNextTimer();
-
- expect(functions.setCurrentDiscussionId).toHaveBeenCalledTimes(4);
- });
-
- it('properly processes, sorts and executes the correct actions for a set of observed intersections', () => {
- handler(defaultProcessableWrapper);
- handler({
- // This observation is here to be filtered out because it's a scrollDown
- ...defaultProcessableWrapper,
- entry: {
- ...defaultProcessableWrapper.entry,
- isIntersecting: false,
- boundingClientRect: { top: 10 },
- rootBounds: { bottom: 100 },
- },
- });
- handler({
- ...defaultProcessableWrapper,
- entry: {
- ...defaultProcessableWrapper.entry,
- time: 101,
- isIntersecting: false,
- rootBounds: { bottom: -100 },
- },
- currentDiscussion: { id: 20 },
- });
- handler({
- ...defaultProcessableWrapper,
- entry: {
- ...defaultProcessableWrapper.entry,
- time: 100,
- isIntersecting: false,
- boundingClientRect: { top: 100 },
- },
- currentDiscussion: { id: 30 },
- isDiffsPage: false,
- });
- handler({
- ...defaultProcessableWrapper,
- isFirstUnresolved: true,
- entry: {
- ...defaultProcessableWrapper.entry,
- time: 100,
- isIntersecting: false,
- boundingClientRect: { top: 200 },
- },
- });
-
- jest.advanceTimersToNextTimer();
-
- expect(setMock.calls.length).toBe(4);
- expect(setMock.calls[0]).toEqual([1]);
- expect(setMock.calls[1]).toEqual([29]);
- expect(setMock.calls[2]).toEqual([null]);
- expect(setMock.calls[3]).toEqual([19]);
-
- expect(getMock.calls.length).toBe(2);
- expect(getMock.calls[0]).toEqual([30, false]);
- expect(getMock.calls[1]).toEqual([20, true]);
-
- [
- setMock.invocationCallOrder[0],
- getMock.invocationCallOrder[0],
- setMock.invocationCallOrder[1],
- setMock.invocationCallOrder[2],
- getMock.invocationCallOrder[1],
- setMock.invocationCallOrder[3],
- ].forEach((order, idx, list) => {
- // Compare each invocation sequence to the one before it (except the first one)
- expect(list[idx - 1] || -1).toBeLessThan(order);
- });
- });
- });
- });
-});
diff --git a/spec/frontend/notes/components/discussion_notes_spec.js b/spec/frontend/notes/components/discussion_notes_spec.js
index ff840a55535..59ac75f00e6 100644
--- a/spec/frontend/notes/components/discussion_notes_spec.js
+++ b/spec/frontend/notes/components/discussion_notes_spec.js
@@ -1,7 +1,6 @@
import { getByRole } from '@testing-library/dom';
import { shallowMount, mount } from '@vue/test-utils';
import '~/behaviors/markdown/render_gfm';
-import { discussionIntersectionObserverHandlerFactory } from '~/diffs/utils/discussions';
import DiscussionNotes from '~/notes/components/discussion_notes.vue';
import NoteableNote from '~/notes/components/noteable_note.vue';
import { SYSTEM_NOTE } from '~/notes/constants';
@@ -27,9 +26,6 @@ describe('DiscussionNotes', () => {
const createComponent = (props, mountingMethod = shallowMount) => {
wrapper = mountingMethod(DiscussionNotes, {
store,
- provide: {
- discussionObserverHandler: discussionIntersectionObserverHandlerFactory(),
- },
propsData: {
discussion: discussionMock,
isExpanded: false,
diff --git a/spec/frontend/notes/components/noteable_discussion_spec.js b/spec/frontend/notes/components/noteable_discussion_spec.js
index 6aab60edc4e..727ef02dcbb 100644
--- a/spec/frontend/notes/components/noteable_discussion_spec.js
+++ b/spec/frontend/notes/components/noteable_discussion_spec.js
@@ -3,7 +3,6 @@ import { nextTick } from 'vue';
import discussionWithTwoUnresolvedNotes from 'test_fixtures/merge_requests/resolved_diff_discussion.json';
import { trimText } from 'helpers/text_helper';
import mockDiffFile from 'jest/diffs/mock_data/diff_file';
-import { discussionIntersectionObserverHandlerFactory } from '~/diffs/utils/discussions';
import DiscussionNotes from '~/notes/components/discussion_notes.vue';
import ReplyPlaceholder from '~/notes/components/discussion_reply_placeholder.vue';
import ResolveWithIssueButton from '~/notes/components/discussion_resolve_with_issue_button.vue';
@@ -32,9 +31,6 @@ describe('noteable_discussion component', () => {
wrapper = mount(NoteableDiscussion, {
store,
- provide: {
- discussionObserverHandler: discussionIntersectionObserverHandlerFactory(),
- },
propsData: { discussion: discussionMock },
});
});
@@ -171,9 +167,6 @@ describe('noteable_discussion component', () => {
wrapper = mount(NoteableDiscussion, {
store,
- provide: {
- discussionObserverHandler: discussionIntersectionObserverHandlerFactory(),
- },
propsData: { discussion: discussionMock },
});
});
@@ -192,9 +185,6 @@ describe('noteable_discussion component', () => {
wrapper = mount(NoteableDiscussion, {
store,
- provide: {
- discussionObserverHandler: discussionIntersectionObserverHandlerFactory(),
- },
propsData: { discussion: discussionMock },
});
});
diff --git a/spec/frontend/notes/components/notes_app_spec.js b/spec/frontend/notes/components/notes_app_spec.js
index b3dbc26878f..e91767687e8 100644
--- a/spec/frontend/notes/components/notes_app_spec.js
+++ b/spec/frontend/notes/components/notes_app_spec.js
@@ -9,7 +9,6 @@ import DraftNote from '~/batch_comments/components/draft_note.vue';
import batchComments from '~/batch_comments/stores/modules/batch_comments';
import axios from '~/lib/utils/axios_utils';
import * as urlUtility from '~/lib/utils/url_utility';
-import { discussionIntersectionObserverHandlerFactory } from '~/diffs/utils/discussions';
import CommentForm from '~/notes/components/comment_form.vue';
import NotesApp from '~/notes/components/notes_app.vue';
import * as constants from '~/notes/constants';
@@ -79,9 +78,6 @@ describe('note_app', () => {
</div>`,
},
{
- provide: {
- discussionObserverHandler: discussionIntersectionObserverHandlerFactory(),
- },
propsData,
store,
},