Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2020-01-15 00:09:05 +00:00
parent 0b12a5312c
commit c9bd888d38
17 changed files with 66 additions and 234 deletions

View File

@ -1 +1 @@
1.12.0 1.13.0

View File

@ -41,10 +41,6 @@ export default {
type: String, type: String,
required: true, required: true,
}, },
itemActionComponent: {
type: String,
required: true,
},
stagedList: { stagedList: {
type: Boolean, type: Boolean,
required: false, required: false,
@ -142,7 +138,6 @@ export default {
<li v-for="file in fileList" :key="file.key"> <li v-for="file in fileList" :key="file.key">
<list-item <list-item
:file="file" :file="file"
:action-component="itemActionComponent"
:key-prefix="keyPrefix" :key-prefix="keyPrefix"
:staged-list="stagedList" :staged-list="stagedList"
:active-file-key="activeFileKey" :active-file-key="activeFileKey"

View File

@ -19,10 +19,6 @@ export default {
type: Object, type: Object,
required: true, required: true,
}, },
actionComponent: {
type: String,
required: true,
},
keyPrefix: { keyPrefix: {
type: String, type: String,
required: false, required: false,

View File

@ -1,78 +0,0 @@
<script>
import $ from 'jquery';
import { mapActions } from 'vuex';
import { sprintf, __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import tooltip from '~/vue_shared/directives/tooltip';
import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
export default {
components: {
Icon,
GlModal: DeprecatedModal2,
},
directives: {
tooltip,
},
props: {
path: {
type: String,
required: true,
},
},
computed: {
modalId() {
return `discard-file-${this.path}`;
},
modalTitle() {
return sprintf(__('Discard changes to %{path}?'), { path: this.path });
},
},
methods: {
...mapActions(['stageChange', 'discardFileChanges']),
showDiscardModal() {
$(document.getElementById(this.modalId)).modal('show');
},
},
};
</script>
<template>
<div v-once class="multi-file-discard-btn d-flex">
<button
v-tooltip
:aria-label="__('Stage changes')"
:title="__('Stage changes')"
type="button"
class="btn btn-blank align-items-center"
data-container="body"
data-boundary="viewport"
data-placement="bottom"
@click.stop.prevent="stageChange(path)"
>
<icon :size="16" name="mobile-issue-close" class="ml-auto mr-auto" />
</button>
<button
v-tooltip
:aria-label="__('Discard changes')"
:title="__('Discard changes')"
type="button"
class="btn btn-blank align-items-center"
data-container="body"
data-boundary="viewport"
data-placement="bottom"
@click.stop.prevent="showDiscardModal"
>
<icon :size="16" name="remove" class="ml-auto mr-auto" />
</button>
<gl-modal
:id="modalId"
:header-title-text="modalTitle"
:footer-primary-button-text="__('Discard changes')"
footer-primary-button-variant="danger"
@submit="discardFileChanges(path)"
>
{{ __("You will lose all changes you've made to this file. This action cannot be undone.") }}
</gl-modal>
</div>
</template>

View File

@ -1,41 +0,0 @@
<script>
import { mapActions } from 'vuex';
import Icon from '~/vue_shared/components/icon.vue';
import tooltip from '~/vue_shared/directives/tooltip';
export default {
components: {
Icon,
},
directives: {
tooltip,
},
props: {
path: {
type: String,
required: true,
},
},
methods: {
...mapActions(['unstageChange']),
},
};
</script>
<template>
<div v-once class="multi-file-discard-btn d-flex">
<button
v-tooltip
:aria-label="__('Unstage changes')"
:title="__('Unstage changes')"
type="button"
class="btn btn-blank align-items-center"
data-container="body"
data-boundary="viewport"
data-placement="bottom"
@click.stop.prevent="unstageChange(path)"
>
<icon :size="16" name="redo" class="ml-auto mr-auto" />
</button>
</div>
</template>

View File

@ -94,7 +94,6 @@ export default {
:empty-state-text="__('There are no unstaged changes')" :empty-state-text="__('There are no unstaged changes')"
action="stageAllChanges" action="stageAllChanges"
action-btn-icon="stage-all" action-btn-icon="stage-all"
item-action-component="stage-button"
class="is-first" class="is-first"
icon-name="unstaged" icon-name="unstaged"
/> />
@ -108,7 +107,6 @@ export default {
:empty-state-text="__('There are no staged changes')" :empty-state-text="__('There are no staged changes')"
action="unstageAllChanges" action="unstageAllChanges"
action-btn-icon="unstage-all" action-btn-icon="unstage-all"
item-action-component="unstage-button"
icon-name="staged" icon-name="staged"
/> />
</template> </template>

View File

@ -55,6 +55,10 @@
background-color: $gray-light; background-color: $gray-light;
} }
.bg-white {
background-color: $white;
}
.bg-line-target-blue { .bg-line-target-blue {
background: $line-target-blue; background: $line-target-blue;
} }

View File

@ -29,10 +29,13 @@
} }
.border-width-1px { border-width: 1px; } .border-width-1px { border-width: 1px; }
.border-bottom-width-1px { border-bottom-width: 1px; }
.border-style-dashed { border-style: dashed; } .border-style-dashed { border-style: dashed; }
.border-style-solid { border-style: solid; } .border-style-solid { border-style: solid; }
.border-bottom-style-solid { border-bottom-style: solid; }
.border-color-blue-300 { border-color: $blue-300; } .border-color-blue-300 { border-color: $blue-300; }
.border-color-default { border-color: $border-color; } .border-color-default { border-color: $border-color; }
.border-bottom-color-default { border-bottom-color: $border-color; }
.box-shadow-default { box-shadow: 0 2px 4px 0 $black-transparent; } .box-shadow-default { box-shadow: 0 2px 4px 0 $black-transparent; }
.mh-50vh { max-height: 50vh; } .mh-50vh { max-height: 50vh; }

View File

@ -44,6 +44,7 @@ class Projects::IssuesController < Projects::ApplicationController
before_action do before_action do
push_frontend_feature_flag(:vue_issuable_sidebar, project.group) push_frontend_feature_flag(:vue_issuable_sidebar, project.group)
push_frontend_feature_flag(:issue_link_types, project)
end end
around_action :allow_gitaly_ref_name_caching, only: [:discussions] around_action :allow_gitaly_ref_name_caching, only: [:discussions]

View File

@ -0,0 +1,5 @@
---
title: Upgrade Pages to 1.13.0
merge_request: 23023
author:
type: added

View File

@ -773,17 +773,29 @@ do*this*and*do*that*and*another thing
### Footnotes ### Footnotes
Footnotes add a link to a note rendered at the end of a Markdown file: Footnotes add a link to a note that will be rendered at the end of a Markdown file.
To make a footnote, you need both a reference tag and a separate line (anywhere in the file) with the note content.
Regardless of the tag names, the relative order of the reference tags determines the rendered numbering.
```markdown ```markdown
You can add footnotes to your text as follows.[^1] A footnote reference tag looks like this:[^1]
[^1]: This is my awesome footnote (later in file). [^1]: This is the contents of a footnote.
Reference tags can use letters and other characters.[^footnote-note]
[^footnote-note]: Avoid using lowercase `w` or an underscore (`_`) in your tag name until until an [upstream bug](https://gitlab.com/gitlab-org/gitlab/issues/24423) is resolved.
``` ```
You can add footnotes to your text as follows.[^1] A footnote reference tag looks like this:[^1]
[^1]: This is my awesome footnote (later in file). [^1]: This is the contents of a footnote.
Reference tags can use letters and other characters.[^footnote-note]
[^footnote-note]: Avoid using lowercase `w` or an underscore (`_`) in your tag name until until an [upstream bug](https://gitlab.com/gitlab-org/gitlab/issues/24423) is resolved.
### Headers ### Headers

View File

@ -2690,6 +2690,9 @@ msgstr ""
msgid "Blocked" msgid "Blocked"
msgstr "" msgstr ""
msgid "Blocks"
msgstr ""
msgid "Blog" msgid "Blog"
msgstr "" msgstr ""
@ -10137,6 +10140,9 @@ msgstr ""
msgid "Is" msgid "Is"
msgstr "" msgstr ""
msgid "Is blocked by"
msgstr ""
msgid "Is not" msgid "Is not"
msgstr "" msgstr ""
@ -10941,6 +10947,9 @@ msgstr ""
msgid "Linked emails (%{email_count})" msgid "Linked emails (%{email_count})"
msgstr "" msgstr ""
msgid "Linked issues"
msgstr ""
msgid "LinkedIn" msgid "LinkedIn"
msgstr "" msgstr ""
@ -15104,6 +15113,9 @@ msgstr ""
msgid "Related merge requests" msgid "Related merge requests"
msgstr "" msgstr ""
msgid "Relates to"
msgstr ""
msgid "Release" msgid "Release"
msgid_plural "Releases" msgid_plural "Releases"
msgstr[0] "" msgstr[0] ""
@ -17380,9 +17392,6 @@ msgstr ""
msgid "Stage all changes" msgid "Stage all changes"
msgstr "" msgstr ""
msgid "Stage changes"
msgstr ""
msgid "Stage data updated" msgid "Stage data updated"
msgstr "" msgstr ""
@ -18183,6 +18192,9 @@ msgstr ""
msgid "The content of this page is not encoded in UTF-8. Edits can only be made via the Git repository." msgid "The content of this page is not encoded in UTF-8. Edits can only be made via the Git repository."
msgstr "" msgstr ""
msgid "The current issue"
msgstr ""
msgid "The data source is connected, but there is no data to display. %{documentationLink}" msgid "The data source is connected, but there is no data to display. %{documentationLink}"
msgstr "" msgstr ""
@ -19737,9 +19749,6 @@ msgstr ""
msgid "Unstage all changes" msgid "Unstage all changes"
msgstr "" msgstr ""
msgid "Unstage changes"
msgstr ""
msgid "Unstaged" msgid "Unstaged"
msgstr "" msgstr ""
@ -21510,6 +21519,9 @@ msgstr ""
msgid "authored" msgid "authored"
msgstr "" msgstr ""
msgid "blocks"
msgstr ""
msgid "branch name" msgid "branch name"
msgstr "" msgstr ""
@ -21996,6 +22008,9 @@ msgstr ""
msgid "is an invalid IP address range" msgid "is an invalid IP address range"
msgstr "" msgstr ""
msgid "is blocked by"
msgstr ""
msgid "is enabled." msgid "is enabled."
msgstr "" msgstr ""
@ -22471,6 +22486,9 @@ msgstr ""
msgid "register" msgid "register"
msgstr "" msgstr ""
msgid "relates to"
msgstr ""
msgid "released %{time}" msgid "released %{time}"
msgstr "" msgstr ""
@ -22587,6 +22605,9 @@ msgstr ""
msgid "tag name" msgid "tag name"
msgstr "" msgstr ""
msgid "the following issue(s)"
msgstr ""
msgid "this document" msgid "this document"
msgstr "" msgstr ""

View File

@ -1,46 +0,0 @@
import Vue from 'vue';
import store from '~/ide/stores';
import stageButton from '~/ide/components/commit_sidebar/stage_button.vue';
import { createComponentWithStore } from '../../../helpers/vue_mount_component_helper';
import { file, resetStore } from '../../helpers';
describe('IDE stage file button', () => {
let vm;
let f;
beforeEach(() => {
const Component = Vue.extend(stageButton);
f = file();
vm = createComponentWithStore(Component, store, {
path: f.path,
});
jest.spyOn(vm, 'stageChange').mockImplementation(() => {});
jest.spyOn(vm, 'discardFileChanges').mockImplementation(() => {});
vm.$mount();
});
afterEach(() => {
vm.$destroy();
resetStore(vm.$store);
});
it('renders button to discard & stage', () => {
expect(vm.$el.querySelectorAll('.btn-blank').length).toBe(2);
});
it('calls store with stage button', () => {
vm.$el.querySelectorAll('.btn')[0].click();
expect(vm.stageChange).toHaveBeenCalledWith(f.path);
});
it('calls store with discard button', () => {
vm.$el.querySelector('.btn-danger').click();
expect(vm.discardFileChanges).toHaveBeenCalledWith(f.path);
});
});

View File

@ -1,39 +0,0 @@
import Vue from 'vue';
import store from '~/ide/stores';
import unstageButton from '~/ide/components/commit_sidebar/unstage_button.vue';
import { createComponentWithStore } from '../../../helpers/vue_mount_component_helper';
import { file, resetStore } from '../../helpers';
describe('IDE unstage file button', () => {
let vm;
let f;
beforeEach(() => {
const Component = Vue.extend(unstageButton);
f = file();
vm = createComponentWithStore(Component, store, {
path: f.path,
});
jest.spyOn(vm, 'unstageChange').mockImplementation(() => {});
vm.$mount();
});
afterEach(() => {
vm.$destroy();
resetStore(vm.$store);
});
it('renders button to unstage', () => {
expect(vm.$el.querySelectorAll('.btn').length).toBe(1);
});
it('calls store with unnstage button', () => {
vm.$el.querySelector('.btn').click();
expect(vm.unstageChange).toHaveBeenCalledWith(f.path);
});
});

View File

@ -20,7 +20,6 @@ describe('Multi-file editor commit sidebar list item', () => {
vm = createComponentWithStore(Component, store, { vm = createComponentWithStore(Component, store, {
file: f, file: f,
actionComponent: 'stage-button',
activeFileKey: `staged-${f.key}`, activeFileKey: `staged-${f.key}`,
}).$mount(); }).$mount();

View File

@ -17,7 +17,6 @@ describe('Multi-file editor commit sidebar list', () => {
action: 'stageAllChanges', action: 'stageAllChanges',
actionBtnText: 'stage all', actionBtnText: 'stage all',
actionBtnIcon: 'history', actionBtnIcon: 'history',
itemActionComponent: 'stage-button',
activeFileKey: 'staged-testing', activeFileKey: 'staged-testing',
keyPrefix: 'staged', keyPrefix: 'staged',
}); });

View File

@ -6,40 +6,43 @@ export const defaultProps = {
export const issuable1 = { export const issuable1 = {
id: 200, id: 200,
epic_issue_id: 1, epicIssueId: 1,
confidential: false, confidential: false,
reference: 'foo/bar#123', reference: 'foo/bar#123',
displayReference: '#123', displayReference: '#123',
title: 'some title', title: 'some title',
path: '/foo/bar/issues/123', path: '/foo/bar/issues/123',
state: 'opened', state: 'opened',
linkType: 'relates_to',
}; };
export const issuable2 = { export const issuable2 = {
id: 201, id: 201,
epic_issue_id: 2, epicIssueId: 2,
confidential: false, confidential: false,
reference: 'foo/bar#124', reference: 'foo/bar#124',
displayReference: '#124', displayReference: '#124',
title: 'some other thing', title: 'some other thing',
path: '/foo/bar/issues/124', path: '/foo/bar/issues/124',
state: 'opened', state: 'opened',
linkType: 'blocks',
}; };
export const issuable3 = { export const issuable3 = {
id: 202, id: 202,
epic_issue_id: 3, epicIssueId: 3,
confidential: false, confidential: false,
reference: 'foo/bar#125', reference: 'foo/bar#125',
displayReference: '#125', displayReference: '#125',
title: 'some other other thing', title: 'some other other thing',
path: '/foo/bar/issues/125', path: '/foo/bar/issues/125',
state: 'opened', state: 'opened',
linkType: 'is_blocked_by',
}; };
export const issuable4 = { export const issuable4 = {
id: 203, id: 203,
epic_issue_id: 4, epicIssueId: 4,
confidential: false, confidential: false,
reference: 'foo/bar#126', reference: 'foo/bar#126',
displayReference: '#126', displayReference: '#126',
@ -50,7 +53,7 @@ export const issuable4 = {
export const issuable5 = { export const issuable5 = {
id: 204, id: 204,
epic_issue_id: 5, epicIssueId: 5,
confidential: false, confidential: false,
reference: 'foo/bar#127', reference: 'foo/bar#127',
displayReference: '#127', displayReference: '#127',