diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index 58fa1101834..f9382637610 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -126,6 +126,8 @@ .frontend-dependency-patterns: &frontend-dependency-patterns - "{package.json,yarn.lock}" + - "config/webpack.config.js" + - "config/helpers/*.js" .frontend-patterns: &frontend-patterns - "{package.json,yarn.lock}" diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index d669e046dde..35c5e6f75ec 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -b3a047a5626ff654ad998dd7a94c6a51624f54b4 +2b34fc78dfb8e7f55f7f2fc30602381b43c54fc3 diff --git a/app/assets/javascripts/boards/components/board_assignee_dropdown.vue b/app/assets/javascripts/boards/components/board_assignee_dropdown.vue index 5d381f9a570..c5cb61ae21c 100644 --- a/app/assets/javascripts/boards/components/board_assignee_dropdown.vue +++ b/app/assets/javascripts/boards/components/board_assignee_dropdown.vue @@ -39,50 +39,51 @@ export default { data() { return { search: '', - participants: [], + issueParticipants: [], selected: [], }; }, apollo: { - participants: { - query() { - return this.isSearchEmpty ? getIssueParticipants : searchUsers; - }, + issueParticipants: { + query: getIssueParticipants, + variables() { + return { + id: `gid://gitlab/Issue/${this.activeIssue.iid}`, + }; + }, + update(data) { + return data.issue?.participants?.nodes || []; + }, + }, + searchUsers: { + query: searchUsers, variables() { - if (this.isSearchEmpty) { - return { - id: `gid://gitlab/Issue/${this.activeIssue.iid}`, - }; - } - return { search: this.search, }; }, - update(data) { - if (this.isSearchEmpty) { - return data.issue?.participants?.nodes || []; - } - - return data.users?.nodes || []; - }, - debounce() { - const { noSearchDelay, searchDelay } = this.$options; - - return this.isSearchEmpty ? noSearchDelay : searchDelay; + update: (data) => data.users?.nodes || [], + skip() { + return this.isSearchEmpty; }, + debounce: 250, }, }, computed: { ...mapGetters(['activeIssue']), ...mapState(['isSettingAssignees']), + participants() { + return this.isSearchEmpty ? this.issueParticipants : this.searchUsers; + }, assigneeText() { return n__('Assignee', '%d Assignees', this.selected.length); }, unSelectedFiltered() { - return this.participants.filter(({ username }) => { - return !this.selectedUserNames.includes(username); - }); + return ( + this.participants?.filter(({ username }) => { + return !this.selectedUserNames.includes(username); + }) || [] + ); }, selectedIsEmpty() { return this.selected.length === 0; @@ -96,6 +97,11 @@ export default { currentUser() { return gon?.current_username; }, + isLoading() { + return ( + this.$apollo.queries.issueParticipants?.loading || this.$apollo.queries.searchUsers?.loading + ); + }, }, created() { this.selected = cloneDeep(this.activeIssue.assignees); @@ -147,7 +153,7 @@ export default {