Commit c9bd888d authored by GitLab Bot's avatar GitLab Bot

Add latest changes from gitlab-org/gitlab@master

parent 0b12a531
......@@ -41,10 +41,6 @@ export default {
type: String,
required: true,
},
itemActionComponent: {
type: String,
required: true,
},
stagedList: {
type: Boolean,
required: false,
......@@ -142,7 +138,6 @@ export default {
<li v-for="file in fileList" :key="file.key">
<list-item
:file="file"
:action-component="itemActionComponent"
:key-prefix="keyPrefix"
:staged-list="stagedList"
:active-file-key="activeFileKey"
......
......@@ -19,10 +19,6 @@ export default {
type: Object,
required: true,
},
actionComponent: {
type: String,
required: true,
},
keyPrefix: {
type: String,
required: false,
......
<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>
<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>
......@@ -94,7 +94,6 @@ export default {
:empty-state-text="__('There are no unstaged changes')"
action="stageAllChanges"
action-btn-icon="stage-all"
item-action-component="stage-button"
class="is-first"
icon-name="unstaged"
/>
......@@ -108,7 +107,6 @@ export default {
:empty-state-text="__('There are no staged changes')"
action="unstageAllChanges"
action-btn-icon="unstage-all"
item-action-component="unstage-button"
icon-name="staged"
/>
</template>
......
......@@ -55,6 +55,10 @@
background-color: $gray-light;
}
.bg-white {
background-color: $white;
}
.bg-line-target-blue {
background: $line-target-blue;
}
......
......@@ -29,10 +29,13 @@
}
.border-width-1px { border-width: 1px; }
.border-bottom-width-1px { border-bottom-width: 1px; }
.border-style-dashed { border-style: dashed; }
.border-style-solid { border-style: solid; }
.border-bottom-style-solid { border-bottom-style: solid; }
.border-color-blue-300 { border-color: $blue-300; }
.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; }
.mh-50vh { max-height: 50vh; }
......
......@@ -44,6 +44,7 @@ class Projects::IssuesController < Projects::ApplicationController
before_action do
push_frontend_feature_flag(:vue_issuable_sidebar, project.group)
push_frontend_feature_flag(:issue_link_types, project)
end
around_action :allow_gitaly_ref_name_caching, only: [:discussions]
......
---
title: Upgrade Pages to 1.13.0
merge_request: 23023
author:
type: added
......@@ -773,17 +773,29 @@ do*this*and*do*that*and*another thing
### 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
You can add footnotes to your text as follows.[^1]
A footnote reference tag looks like this:[^1]
[^1]: This is the contents of a footnote.
[^1]: This is my awesome footnote (later in file).
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 the contents of a footnote.
Reference tags can use letters and other characters.[^footnote-note]
[^1]: This is my awesome footnote (later in file).
[^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
......
......@@ -2690,6 +2690,9 @@ msgstr ""
msgid "Blocked"
msgstr ""
msgid "Blocks"
msgstr ""
msgid "Blog"
msgstr ""
......@@ -10137,6 +10140,9 @@ msgstr ""
msgid "Is"
msgstr ""
msgid "Is blocked by"
msgstr ""
msgid "Is not"
msgstr ""
......@@ -10941,6 +10947,9 @@ msgstr ""
msgid "Linked emails (%{email_count})"
msgstr ""
msgid "Linked issues"
msgstr ""
msgid "LinkedIn"
msgstr ""
......@@ -15104,6 +15113,9 @@ msgstr ""
msgid "Related merge requests"
msgstr ""
msgid "Relates to"
msgstr ""
msgid "Release"
msgid_plural "Releases"
msgstr[0] ""
......@@ -17380,9 +17392,6 @@ msgstr ""
msgid "Stage all changes"
msgstr ""
msgid "Stage changes"
msgstr ""
msgid "Stage data updated"
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."
msgstr ""
msgid "The current issue"
msgstr ""
msgid "The data source is connected, but there is no data to display. %{documentationLink}"
msgstr ""
......@@ -19737,9 +19749,6 @@ msgstr ""
msgid "Unstage all changes"
msgstr ""
msgid "Unstage changes"
msgstr ""
msgid "Unstaged"
msgstr ""
......@@ -21510,6 +21519,9 @@ msgstr ""
msgid "authored"
msgstr ""
msgid "blocks"
msgstr ""
msgid "branch name"
msgstr ""
......@@ -21996,6 +22008,9 @@ msgstr ""
msgid "is an invalid IP address range"
msgstr ""
msgid "is blocked by"
msgstr ""
msgid "is enabled."
msgstr ""
......@@ -22471,6 +22486,9 @@ msgstr ""
msgid "register"
msgstr ""
msgid "relates to"
msgstr ""
msgid "released %{time}"
msgstr ""
......@@ -22587,6 +22605,9 @@ msgstr ""
msgid "tag name"
msgstr ""
msgid "the following issue(s)"
msgstr ""
msgid "this document"
msgstr ""
......
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);
});
});
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);
});
});
......@@ -20,7 +20,6 @@ describe('Multi-file editor commit sidebar list item', () => {
vm = createComponentWithStore(Component, store, {
file: f,
actionComponent: 'stage-button',
activeFileKey: `staged-${f.key}`,
}).$mount();
......
......@@ -17,7 +17,6 @@ describe('Multi-file editor commit sidebar list', () => {
action: 'stageAllChanges',
actionBtnText: 'stage all',
actionBtnIcon: 'history',
itemActionComponent: 'stage-button',
activeFileKey: 'staged-testing',
keyPrefix: 'staged',
});
......
......@@ -6,40 +6,43 @@ export const defaultProps = {
export const issuable1 = {
id: 200,
epic_issue_id: 1,
epicIssueId: 1,
confidential: false,
reference: 'foo/bar#123',
displayReference: '#123',
title: 'some title',
path: '/foo/bar/issues/123',
state: 'opened',
linkType: 'relates_to',
};
export const issuable2 = {
id: 201,
epic_issue_id: 2,
epicIssueId: 2,
confidential: false,
reference: 'foo/bar#124',
displayReference: '#124',
title: 'some other thing',
path: '/foo/bar/issues/124',
state: 'opened',
linkType: 'blocks',
};
export const issuable3 = {
id: 202,
epic_issue_id: 3,
epicIssueId: 3,
confidential: false,
reference: 'foo/bar#125',
displayReference: '#125',
title: 'some other other thing',
path: '/foo/bar/issues/125',
state: 'opened',
linkType: 'is_blocked_by',
};
export const issuable4 = {
id: 203,
epic_issue_id: 4,
epicIssueId: 4,
confidential: false,
reference: 'foo/bar#126',
displayReference: '#126',
......@@ -50,7 +53,7 @@ export const issuable4 = {
export const issuable5 = {
id: 204,
epic_issue_id: 5,
epicIssueId: 5,
confidential: false,
reference: 'foo/bar#127',
displayReference: '#127',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment