diff --git a/app/assets/javascripts/blob/line_highlighter.js b/app/assets/javascripts/blob/line_highlighter.js index a1f59aa1b54..a8932f8c73b 100644 --- a/app/assets/javascripts/blob/line_highlighter.js +++ b/app/assets/javascripts/blob/line_highlighter.js @@ -37,6 +37,7 @@ const LineHighlighter = function (options = {}) { options.fileHolderSelector = options.fileHolderSelector || '.file-holder'; options.scrollFileHolder = options.scrollFileHolder || false; options.hash = options.hash || window.location.hash; + options.scrollBehavior = options.scrollBehavior || 'smooth'; this.options = options; this._hash = options.hash; @@ -74,6 +75,7 @@ LineHighlighter.prototype.highlightHash = function (newHash) { // Scroll to the first highlighted line on initial load // Add an offset of -100 for some context offset: -100, + behavior: this.options.scrollBehavior, }); } } diff --git a/app/assets/javascripts/invite_members/components/group_select.vue b/app/assets/javascripts/invite_members/components/group_select.vue index 04a8ec3400f..fc14b2eba6a 100644 --- a/app/assets/javascripts/invite_members/components/group_select.vue +++ b/app/assets/javascripts/invite_members/components/group_select.vue @@ -24,10 +24,6 @@ export default { prop: 'selectedGroup', }, props: { - accessLevels: { - type: Object, - required: true, - }, groupsFilter: { type: String, required: false, @@ -58,13 +54,6 @@ export default { isFetchResultEmpty() { return this.groups.length === 0; }, - defaultFetchOptions() { - return { - exclude_internal: true, - active: true, - min_access_level: this.accessLevels.Guest, - }; - }, }, watch: { searchTerm() { @@ -107,9 +96,13 @@ export default { fetchGroups() { switch (this.groupsFilter) { case GROUP_FILTERS.DESCENDANT_GROUPS: - return getDescendentGroups(this.parentGroupId, this.searchTerm, this.defaultFetchOptions); + return getDescendentGroups( + this.parentGroupId, + this.searchTerm, + this.$options.defaultFetchOptions, + ); default: - return getGroups(this.searchTerm, this.defaultFetchOptions); + return getGroups(this.searchTerm, this.$options.defaultFetchOptions); } }, }, @@ -118,6 +111,10 @@ export default { searchPlaceholder: s__('GroupSelect|Search groups'), emptySearchResult: s__('GroupSelect|No matching results'), }, + defaultFetchOptions: { + exclude_internal: true, + active: true, + }, };