Skip to content

Commit d5f14b5

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 9d485c1 commit d5f14b5

File tree

27 files changed

+349
-238
lines changed

27 files changed

+349
-238
lines changed

GITALY_SERVER_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6941c499e077fe2303dd5c31a08807d14ad7a616
1+
529ef59e73a21d1abc54833c4edbe92cbcc9fb64

app/assets/javascripts/boards/stores/actions.js

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ import issueSetMilestoneMutation from '../graphql/issue_set_milestone.mutation.g
4040
import listsIssuesQuery from '../graphql/lists_issues.query.graphql';
4141
import * as types from './mutation_types';
4242

43-
const notImplemented = () => {
44-
/* eslint-disable-next-line @gitlab/require-i18n-strings */
45-
throw new Error('Not implemented!');
46-
};
47-
4843
export const gqlClient = createGqClient(
4944
{},
5045
{
@@ -737,28 +732,4 @@ export default {
737732
unsetError: ({ commit }) => {
738733
commit(types.SET_ERROR, undefined);
739734
},
740-
741-
fetchBacklog: () => {
742-
notImplemented();
743-
},
744-
745-
bulkUpdateIssues: () => {
746-
notImplemented();
747-
},
748-
749-
fetchIssue: () => {
750-
notImplemented();
751-
},
752-
753-
toggleIssueSubscription: () => {
754-
notImplemented();
755-
},
756-
757-
showPage: () => {
758-
notImplemented();
759-
},
760-
761-
toggleEmptyState: () => {
762-
notImplemented();
763-
},
764735
};

app/assets/javascripts/boards/stores/mutation_types.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ export const GENERATE_DEFAULT_LISTS_FAILURE = 'GENERATE_DEFAULT_LISTS_FAILURE';
99
export const RECEIVE_BOARD_LISTS_SUCCESS = 'RECEIVE_BOARD_LISTS_SUCCESS';
1010
export const RECEIVE_BOARD_LISTS_FAILURE = 'RECEIVE_BOARD_LISTS_FAILURE';
1111
export const SHOW_PROMOTION_LIST = 'SHOW_PROMOTION_LIST';
12-
export const REQUEST_ADD_LIST = 'REQUEST_ADD_LIST';
1312
export const RECEIVE_ADD_LIST_SUCCESS = 'RECEIVE_ADD_LIST_SUCCESS';
14-
export const RECEIVE_ADD_LIST_ERROR = 'RECEIVE_ADD_LIST_ERROR';
1513
export const MOVE_LIST = 'MOVE_LIST';
1614
export const UPDATE_LIST_FAILURE = 'UPDATE_LIST_FAILURE';
1715
export const TOGGLE_LIST_COLLAPSED = 'TOGGLE_LIST_COLLAPSED';
@@ -20,19 +18,11 @@ export const REMOVE_LIST_FAILURE = 'REMOVE_LIST_FAILURE';
2018
export const REQUEST_ITEMS_FOR_LIST = 'REQUEST_ITEMS_FOR_LIST';
2119
export const RECEIVE_ITEMS_FOR_LIST_FAILURE = 'RECEIVE_ITEMS_FOR_LIST_FAILURE';
2220
export const RECEIVE_ITEMS_FOR_LIST_SUCCESS = 'RECEIVE_ITEMS_FOR_LIST_SUCCESS';
23-
export const REQUEST_ADD_ISSUE = 'REQUEST_ADD_ISSUE';
24-
export const RECEIVE_ADD_ISSUE_SUCCESS = 'RECEIVE_ADD_ISSUE_SUCCESS';
25-
export const RECEIVE_ADD_ISSUE_ERROR = 'RECEIVE_ADD_ISSUE_ERROR';
2621
export const UPDATE_BOARD_ITEM = 'UPDATE_BOARD_ITEM';
2722
export const REMOVE_BOARD_ITEM = 'REMOVE_BOARD_ITEM';
28-
export const REQUEST_UPDATE_ISSUE = 'REQUEST_UPDATE_ISSUE';
2923
export const MUTATE_ISSUE_SUCCESS = 'MUTATE_ISSUE_SUCCESS';
30-
export const RECEIVE_UPDATE_ISSUE_SUCCESS = 'RECEIVE_UPDATE_ISSUE_SUCCESS';
31-
export const RECEIVE_UPDATE_ISSUE_ERROR = 'RECEIVE_UPDATE_ISSUE_ERROR';
3224
export const ADD_BOARD_ITEM_TO_LIST = 'ADD_BOARD_ITEM_TO_LIST';
3325
export const REMOVE_BOARD_ITEM_FROM_LIST = 'REMOVE_BOARD_ITEM_FROM_LIST';
34-
export const SET_CURRENT_PAGE = 'SET_CURRENT_PAGE';
35-
export const TOGGLE_EMPTY_STATE = 'TOGGLE_EMPTY_STATE';
3626
export const SET_ACTIVE_ID = 'SET_ACTIVE_ID';
3727
export const UPDATE_BOARD_ITEM_BY_ID = 'UPDATE_BOARD_ITEM_BY_ID';
3828
export const SET_ASSIGNEE_LOADING = 'SET_ASSIGNEE_LOADING';

app/assets/javascripts/boards/stores/mutations.js

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ import { formatIssue } from '../boards_util';
66
import { issuableTypes } from '../constants';
77
import * as mutationTypes from './mutation_types';
88

9-
const notImplemented = () => {
10-
/* eslint-disable-next-line @gitlab/require-i18n-strings */
11-
throw new Error('Not implemented!');
12-
};
13-
149
const updateListItemsCount = ({ state, listId, value }) => {
1510
const list = state.boardLists[listId];
1611
if (state.issuableType === issuableTypes.epic) {
@@ -94,18 +89,10 @@ export default {
9489
state.error = s__('Boards|An error occurred while generating lists. Please reload the page.');
9590
},
9691

97-
[mutationTypes.REQUEST_ADD_LIST]: () => {
98-
notImplemented();
99-
},
100-
10192
[mutationTypes.RECEIVE_ADD_LIST_SUCCESS]: (state, list) => {
10293
Vue.set(state.boardLists, list.id, list);
10394
},
10495

105-
[mutationTypes.RECEIVE_ADD_LIST_ERROR]: () => {
106-
notImplemented();
107-
},
108-
10996
[mutationTypes.MOVE_LIST]: (state, { movedList, listAtNewIndex }) => {
11097
const { boardLists } = state;
11198
Vue.set(boardLists, movedList.id, movedList);
@@ -172,35 +159,11 @@ export default {
172159
state.isSettingAssignees = isLoading;
173160
},
174161

175-
[mutationTypes.REQUEST_ADD_ISSUE]: () => {
176-
notImplemented();
177-
},
178-
179-
[mutationTypes.RECEIVE_ADD_ISSUE_SUCCESS]: () => {
180-
notImplemented();
181-
},
182-
183-
[mutationTypes.RECEIVE_ADD_ISSUE_ERROR]: () => {
184-
notImplemented();
185-
},
186-
187162
[mutationTypes.MUTATE_ISSUE_SUCCESS]: (state, { issue }) => {
188163
const issueId = getIdFromGraphQLId(issue.id);
189164
Vue.set(state.boardItems, issueId, formatIssue({ ...issue, id: issueId }));
190165
},
191166

192-
[mutationTypes.REQUEST_UPDATE_ISSUE]: () => {
193-
notImplemented();
194-
},
195-
196-
[mutationTypes.RECEIVE_UPDATE_ISSUE_SUCCESS]: () => {
197-
notImplemented();
198-
},
199-
200-
[mutationTypes.RECEIVE_UPDATE_ISSUE_ERROR]: () => {
201-
notImplemented();
202-
},
203-
204167
[mutationTypes.ADD_BOARD_ITEM_TO_LIST]: (
205168
state,
206169
{ itemId, listId, moveBeforeId, moveAfterId, atIndex },
@@ -220,14 +183,6 @@ export default {
220183
Vue.delete(state.boardItems, itemId);
221184
},
222185

223-
[mutationTypes.SET_CURRENT_PAGE]: () => {
224-
notImplemented();
225-
},
226-
227-
[mutationTypes.TOGGLE_EMPTY_STATE]: () => {
228-
notImplemented();
229-
},
230-
231186
[mutationTypes.REQUEST_GROUP_PROJECTS]: (state, fetchNext) => {
232187
Vue.set(state, 'groupProjectsFlags', {
233188
[fetchNext ? 'isLoadingMore' : 'isLoading']: true,

app/assets/javascripts/vue_shared/directives/validation.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ const focusFirstInvalidInput = (e) => {
3333
}
3434
};
3535

36+
const getInputElement = (el) => {
37+
return el.querySelector('input') || el;
38+
};
39+
3640
const isEveryFieldValid = (form) => Object.values(form.fields).every(({ state }) => state === true);
3741

3842
const createValidator = (context, feedbackMap) => ({ el, reportInvalidInput = false }) => {
@@ -91,8 +95,9 @@ export default function initValidation(customFeedbackMap = {}) {
9195
const elDataMap = new WeakMap();
9296

9397
return {
94-
inserted(el, binding, { context }) {
98+
inserted(element, binding, { context }) {
9599
const { arg: showGlobalValidation } = binding;
100+
const el = getInputElement(element);
96101
const { form: formEl } = el;
97102

98103
const validate = createValidator(context, feedbackMap);
@@ -121,7 +126,8 @@ export default function initValidation(customFeedbackMap = {}) {
121126

122127
validate({ el, reportInvalidInput: showGlobalValidation });
123128
},
124-
update(el, binding) {
129+
update(element, binding) {
130+
const el = getInputElement(element);
125131
const { arg: showGlobalValidation } = binding;
126132
const { validate, isTouched, isBlurred } = elDataMap.get(el);
127133
const showValidationFeedback = showGlobalValidation || (isTouched && isBlurred);

app/models/concerns/issuable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def award_emojis_loaded?
103103
end
104104
scope :assigned_to, ->(u) do
105105
assignees_table = Arel::Table.new("#{to_ability_name}_assignees")
106-
sql = assignees_table.project('true').where(assignees_table[:user_id].in(u)).where(Arel::Nodes::SqlLiteral.new("#{to_ability_name}_id = #{to_ability_name}s.id"))
106+
sql = assignees_table.project('true').where(assignees_table[:user_id].in(u.id)).where(Arel::Nodes::SqlLiteral.new("#{to_ability_name}_id = #{to_ability_name}s.id"))
107107
where("EXISTS (#{sql.to_sql})")
108108
end
109109
# rubocop:enable GitlabSecurity/SqlInjection

app/models/merge_request.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,15 +381,15 @@ def public_merge_status
381381
scope :review_requested_to, ->(user) do
382382
where(
383383
reviewers_subquery
384-
.where(Arel::Table.new("#{to_ability_name}_reviewers")[:user_id].eq(user))
384+
.where(Arel::Table.new("#{to_ability_name}_reviewers")[:user_id].eq(user.id))
385385
.exists
386386
)
387387
end
388388

389389
scope :no_review_requested_to, ->(user) do
390390
where(
391391
reviewers_subquery
392-
.where(Arel::Table.new("#{to_ability_name}_reviewers")[:user_id].eq(user))
392+
.where(Arel::Table.new("#{to_ability_name}_reviewers")[:user_id].eq(user.id))
393393
.exists
394394
.not
395395
)

app/views/layouts/nav/sidebar/_project_menus.html.haml

Lines changed: 0 additions & 34 deletions
This file was deleted.

app/views/shared/nav/_sidebar.html.haml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@
1111
- if sidebar.render_raw_menus_partial
1212
= render sidebar.render_raw_menus_partial
1313

14+
= render partial: 'shared/nav/sidebar_hidden_menu_item', collection: sidebar.hidden_menu&.items
1415
= render 'shared/sidebar_toggle_button'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
%li.hidden
2+
= link_to sidebar_hidden_menu_item.link, **sidebar_hidden_menu_item.container_html_options do
3+
= sidebar_hidden_menu_item.title

0 commit comments

Comments
 (0)