Skip to content
Snippets Groups Projects
Unverified Commit d55650f0 authored by Filipa Lacerda's avatar Filipa Lacerda
Browse files

Merge branch 'master' into 54282-tooltip-stuck

* master: (24 commits)
  Adds a PHILOSOPHY.md
  Externalize strings from `/app/views/abuse_reports`
  Fix Issuable container element selector for shortcuts handling
  Enable Rubocop on lib/gitlab
  Add user docs for Pages access control
  Added information about syntax highlighting in Web IDE. Fixes gitlab-org/gitlab-ce#53571
  Align issue status label and confidential icon
  Externalize strings from `/app/views/repository_check_mailer`
  Remove instances of `@extend .monospace`
  Resolve "The reply shortcut can add any text of the page to the "comment" text area"
  Upgrade escape_utils to 1.2.1
  Add dedicated runner tags to assets job
  Upgrade gitlab eslint config to latest
  Fix broken karma specs
  Disable conflicting eslint rules
  Prettify all the things
  Upgrade prettier to 1.15.2
  Added a test for open merge request files
  Update CHANGELOG.md for 11.4.7
  Open first 10 merge request files in IDE
  ...
parents 2133baaf 98fd3627
No related branches found
No related tags found
No related merge requests found
Showing
with 124 additions and 227 deletions
Loading
Loading
@@ -29,8 +29,6 @@ rules:
import/no-useless-path-segments: off
lines-between-class-members: off
# Disabled for now, to make the plugin-vue 4.5 -> 5.0 update smoother
vue/html-closing-bracket-newline: off
vue/html-closing-bracket-spacing: off
vue/no-confusing-v-for-v-if: error
vue/no-unused-components: off
vue/no-use-v-if-with-v-for: off
Loading
Loading
Loading
Loading
@@ -620,7 +620,8 @@ gitlab:assets:compile:
- webpack-report/
- public/assets/
tags:
- docker
- gitlab-org-delivery
- high-cpu
 
karma:
<<: *dedicated-no-docs-pull-cache-job
Loading
Loading
Loading
Loading
@@ -50,7 +50,6 @@ Style/FrozenStringLiteralComment:
- 'danger/**/*'
- 'db/**/*'
- 'ee/**/*'
- 'lib/gitlab/**/*'
- 'lib/tasks/**/*'
- 'qa/**/*'
- 'rubocop/**/*'
Loading
Loading
Loading
Loading
@@ -2,6 +2,10 @@
documentation](doc/development/changelog.md) for instructions on adding your own
entry.
 
## 11.4.7 (2018-11-20)
- No changes.
## 11.4.6 (2018-11-18)
 
### Security (1 change)
Loading
Loading
Loading
Loading
@@ -182,7 +182,7 @@ GEM
encryptor (3.0.0)
equalizer (0.0.11)
erubis (2.7.0)
escape_utils (1.1.1)
escape_utils (1.2.1)
et-orbi (1.0.3)
tzinfo
eventmachine (1.2.7)
Loading
Loading
Loading
Loading
@@ -181,7 +181,7 @@ GEM
encryptor (3.0.0)
equalizer (0.0.11)
erubis (2.7.0)
escape_utils (1.1.1)
escape_utils (1.2.1)
et-orbi (1.0.3)
tzinfo
eventmachine (1.2.7)
Loading
Loading
This document is intended to communicate the product philosophy GitLab uses in creating GitLab Community Edition. The principles can be found in the [Product Section of the GitLab Handbook](https://about.gitlab.com/handbook/product/#product-at-gitlab).
\ No newline at end of file
Loading
Loading
@@ -65,12 +65,7 @@ export default {
 
<template>
<div>
<a
v-show="!isLoading && !hasError"
:href="linkUrl"
target="_blank"
rel="noopener noreferrer"
>
<a v-show="!isLoading && !hasError" :href="linkUrl" target="_blank" rel="noopener noreferrer">
<img
:src="imageUrlWithRetries"
class="project-badge"
Loading
Loading
@@ -80,15 +75,9 @@ export default {
/>
</a>
 
<gl-loading-icon
v-show="isLoading"
:inline="true"
/>
<gl-loading-icon v-show="isLoading" :inline="true" />
 
<div
v-show="hasError"
class="btn-group"
>
<div v-show="hasError" class="btn-group">
<div class="btn btn-default btn-sm disabled">
<icon
:size="16"
Loading
Loading
@@ -97,9 +86,7 @@ export default {
aria-hidden="true"
/>
</div>
<div
class="btn btn-default btn-sm disabled"
>
<div class="btn btn-default btn-sm disabled">
<span class="prepend-left-8 append-right-8">{{ s__('Badges|No badge image') }}</span>
</div>
</div>
Loading
Loading
@@ -112,10 +99,7 @@ export default {
type="button"
@click="reloadImage"
>
<icon
:size="16"
name="retry"
/>
<icon :size="16" name="retry" />
</button>
</div>
</template>
Loading
Loading
@@ -155,10 +155,7 @@ export default {
@submit.prevent.stop="onSubmit"
>
<div class="form-group">
<label
for="badge-link-url"
class="label-bold"
>{{ s__('Badges|Link') }}</label>
<label for="badge-link-url" class="label-bold">{{ s__('Badges|Link') }}</label>
<p v-html="helpText"></p>
<input
id="badge-link-url"
Loading
Loading
@@ -168,19 +165,12 @@ export default {
required
@input="debouncedPreview"
/>
<div class="invalid-feedback">
{{ s__('Badges|Please fill in a valid URL') }}
</div>
<span class="form-text text-muted">
{{ badgeLinkUrlExample }}
</span>
<div class="invalid-feedback">{{ s__('Badges|Please fill in a valid URL') }}</div>
<span class="form-text text-muted"> {{ badgeLinkUrlExample }} </span>
</div>
 
<div class="form-group">
<label
for="badge-image-url"
class="label-bold"
>{{ s__('Badges|Badge image URL') }}</label>
<label for="badge-image-url" class="label-bold">{{ s__('Badges|Badge image URL') }}</label>
<p v-html="helpText"></p>
<input
id="badge-image-url"
Loading
Loading
@@ -190,12 +180,8 @@ export default {
required
@input="debouncedPreview"
/>
<div class="invalid-feedback">
{{ s__('Badges|Please fill in a valid URL') }}
</div>
<span class="form-text text-muted">
{{ badgeImageUrlExample }}
</span>
<div class="invalid-feedback">{{ s__('Badges|Please fill in a valid URL') }}</div>
<span class="form-text text-muted"> {{ badgeImageUrlExample }} </span>
</div>
 
<div class="form-group">
Loading
Loading
@@ -206,37 +192,22 @@ export default {
:image-url="renderedImageUrl"
:link-url="renderedLinkUrl"
/>
<p v-show="isRendering">
<gl-loading-icon
:inline="true"
/>
<p v-show="isRendering"><gl-loading-icon :inline="true" /></p>
<p v-show="!renderedBadge && !isRendering" class="disabled-content">
{{ s__('Badges|No image to preview') }}
</p>
<p
v-show="!renderedBadge && !isRendering"
class="disabled-content"
>{{ s__('Badges|No image to preview') }}</p>
</div>
 
<div
v-if="isEditing"
class="row-content-block"
>
<div v-if="isEditing" class="row-content-block">
<loading-button
:loading="isSaving"
:label="s__('Badges|Save changes')"
type="submit"
container-class="btn btn-success"
/>
<button
class="btn btn-cancel"
type="button"
@click="onCancel"
>{{ __('Cancel') }}</button>
<button class="btn btn-cancel" type="button" @click="onCancel">{{ __('Cancel') }}</button>
</div>
<div
v-else
class="form-group"
>
<div v-else class="form-group">
<loading-button
:loading="isSaving"
:label="s__('Badges|Add badge')"
Loading
Loading
Loading
Loading
@@ -26,32 +26,15 @@ export default {
<div class="card">
<div class="card-header">
{{ s__('Badges|Your badges') }}
<span
v-show="!isLoading"
class="badge badge-pill"
>{{ badges.length }}</span>
<span v-show="!isLoading" class="badge badge-pill">{{ badges.length }}</span>
</div>
<gl-loading-icon
v-show="isLoading"
:size="2"
class="card-body"
/>
<div
v-if="hasNoBadges"
class="card-body"
>
<gl-loading-icon v-show="isLoading" :size="2" class="card-body" />
<div v-if="hasNoBadges" class="card-body">
<span v-if="isGroupBadge">{{ s__('Badges|This group has no badges') }}</span>
<span v-else>{{ s__('Badges|This project has no badges') }}</span>
</div>
<div
v-else
class="card-body"
>
<badge-list-row
v-for="badge in badges"
:key="badge.id"
:badge="badge"
/>
<div v-else class="card-body">
<badge-list-row v-for="badge in badges" :key="badge.id" :badge="badge" />
</div>
</div>
</template>
Loading
Loading
@@ -50,20 +50,14 @@ export default {
<span class="badge badge-pill">{{ badgeKindText }}</span>
</div>
<div class="table-section section-15 table-button-footer">
<div
v-if="canEditBadge"
class="table-action-buttons">
<div v-if="canEditBadge" class="table-action-buttons">
<button
:disabled="badge.isDeleting"
class="btn btn-default append-right-8"
type="button"
@click="editBadge(badge)"
@click="editBadge(badge);"
>
<icon
:size="16"
:aria-label="__('Edit')"
name="pencil"
/>
<icon :size="16" :aria-label="__('Edit')" name="pencil" />
</button>
<button
:disabled="badge.isDeleting"
Loading
Loading
@@ -71,18 +65,11 @@ export default {
type="button"
data-toggle="modal"
data-target="#delete-badge-modal"
@click="updateBadgeInModal(badge)"
@click="updateBadgeInModal(badge);"
>
<icon
:size="16"
:aria-label="__('Delete')"
name="remove"
/>
<icon :size="16" :aria-label="__('Delete')" name="remove" />
</button>
<gl-loading-icon
v-show="badge.isDeleting"
:inline="true"
/>
<gl-loading-icon v-show="badge.isDeleting" :inline="true" />
</div>
</div>
</div>
Loading
Loading
Loading
Loading
@@ -46,7 +46,8 @@ export default {
:header-title-text="s__('Badges|Delete badge?')"
:footer-primary-button-text="s__('Badges|Delete badge')"
footer-primary-button-variant="danger"
@submit="onSubmitModal">
@submit="onSubmitModal"
>
<div class="well">
<badge
:image-url="badgeInModal ? badgeInModal.renderedImageUrl : ''"
Loading
Loading
@@ -56,15 +57,9 @@ export default {
<p v-html="deleteModalText"></p>
</gl-modal>
 
<badge-form
v-show="isEditing"
:is-editing="true"
/>
<badge-form v-show="isEditing" :is-editing="true" />
 
<badge-form
v-show="!isEditing"
:is-editing="false"
/>
<badge-form v-show="!isEditing" :is-editing="false" />
<badge-list v-show="!isEditing" />
</div>
</template>
Loading
Loading
@@ -4,6 +4,7 @@ import _ from 'underscore';
import Sidebar from '../../right_sidebar';
import Shortcuts from './shortcuts';
import { CopyAsGFM } from '../markdown/copy_as_gfm';
import { getSelectedFragment } from '~/lib/utils/common_utils';
 
export default class ShortcutsIssuable extends Shortcuts {
constructor(isMergeRequest) {
Loading
Loading
@@ -24,17 +25,43 @@ export default class ShortcutsIssuable extends Shortcuts {
 
static replyWithSelectedText() {
const $replyField = $('.js-main-target-form .js-vue-comment-form');
const documentFragment = window.gl.utils.getSelectedFragment();
 
if (!$replyField.length) {
if (!$replyField.length || $replyField.is(':hidden') /* Other tab selected in MR */) {
return false;
}
 
const documentFragment = getSelectedFragment(document.querySelector('#content-body'));
if (!documentFragment) {
$replyField.focus();
return false;
}
 
// Sanity check: Make sure the selected text comes from a discussion : it can either contain a message...
let foundMessage = !!documentFragment.querySelector('.md, .wiki');
// ... Or come from a message
if (!foundMessage) {
if (documentFragment.originalNodes) {
documentFragment.originalNodes.forEach(e => {
let node = e;
do {
// Text nodes don't define the `matches` method
if (node.matches && node.matches('.md, .wiki')) {
foundMessage = true;
}
node = node.parentNode;
} while (node && !foundMessage);
});
}
// If there is no message, just select the reply field
if (!foundMessage) {
$replyField.focus();
return false;
}
}
const el = CopyAsGFM.transformGFMSelection(documentFragment.cloneNode(true));
const selected = CopyAsGFM.nodeToGFM(el);
 
Loading
Loading
Loading
Loading
@@ -23,10 +23,12 @@ export default class BlobViewer {
if (!viewer || !viewer.dataset.richType) return;
 
const initViewer = promise =>
promise.then(module => module.default(viewer)).catch(error => {
Flash('Error loading file viewer.');
throw error;
});
promise
.then(module => module.default(viewer))
.catch(error => {
Flash('Error loading file viewer.');
throw error;
});
 
switch (viewer.dataset.richType) {
case 'balsamiq':
Loading
Loading
Loading
Loading
@@ -61,35 +61,25 @@ export default {
 
<template>
<div class="board-blank-state">
<p>
Add the following default lists to your Issue Board with one click:
</p>
<p>Add the following default lists to your Issue Board with one click:</p>
<ul class="board-blank-state-list">
<li
v-for="(label, index) in predefinedLabels"
:key="index"
>
<span
:style="{ backgroundColor: label.color }"
class="label-color">
</span>
<li v-for="(label, index) in predefinedLabels" :key="index">
<span :style="{ backgroundColor: label.color }" class="label-color"> </span>
{{ label.title }}
</li>
</ul>
<p>
Starting out with the default set of lists will get you
right on the way to making the most of your board.
Starting out with the default set of lists will get you right on the way to making the most of
your board.
</p>
<button
class="btn btn-success btn-inverted btn-block"
type="button"
@click.stop="addDefaultLists">
@click.stop="addDefaultLists"
>
Add default lists
</button>
<button
class="btn btn-default btn-block"
type="button"
@click.stop="clearBlankState">
<button class="btn btn-default btn-block" type="button" @click.stop="clearBlankState">
Nevermind, I'll use my own
</button>
</div>
Loading
Loading
Loading
Loading
@@ -79,14 +79,15 @@ export default {
:class="{
'user-can-drag': !disabled && issue.id,
'is-disabled': disabled || !issue.id,
'is-active': issueDetailVisible
'is-active': issueDetailVisible,
}"
:index="index"
:data-issue-id="issue.id"
class="board-card"
@mousedown="mouseDown"
@mousemove="mouseMove"
@mouseup="showIssue($event)">
@mouseup="showIssue($event);"
>
<issue-card-inner
:list="list"
:issue="issue"
Loading
Loading
Loading
Loading
@@ -222,23 +222,22 @@ export default {
 
<template>
<div class="board-list-component">
<div
v-if="loading"
class="board-list-loading text-center"
aria-label="Loading issues">
<div v-if="loading" class="board-list-loading text-center" aria-label="Loading issues">
<gl-loading-icon />
</div>
<board-new-issue
v-if="list.type !== 'closed' && showIssueForm"
:group-id="groupId"
:list="list"/>
:list="list"
/>
<ul
v-show="!loading"
ref="list"
:data-board="list.id"
:data-board-type="list.type"
:class="{ 'is-smaller': showIssueForm }"
class="board-list js-board-list">
class="board-list js-board-list"
>
<board-card
v-for="(issue, index) in issues"
ref="issue"
Loading
Loading
@@ -249,25 +248,12 @@ export default {
:issue-link-base="issueLinkBase"
:group-id="groupId"
:root-path="rootPath"
:disabled="disabled" />
<li
v-if="showCount"
class="board-list-count text-center"
data-issue-id="-1">
<gl-loading-icon
v-show="list.loadingMore"
label="Loading more issues"
/>
<span
v-if="list.issues.length === list.issuesSize"
>
Showing all issues
</span>
<span
v-else
>
Showing {{ list.issues.length }} of {{ list.issuesSize }} issues
</span>
:disabled="disabled"
/>
<li v-if="showCount" class="board-list-count text-center" data-issue-id="-1">
<gl-loading-icon v-show="list.loadingMore" label="Loading more issues" />
<span v-if="list.issues.length === list.issuesSize"> Showing all issues </span>
<span v-else> Showing {{ list.issues.length }} of {{ list.issuesSize }} issues </span>
</li>
</ul>
</div>
Loading
Loading
Loading
Loading
@@ -96,21 +96,11 @@ export default {
<template>
<div class="board-new-issue-form">
<div class="board-card">
<form @submit="submit($event)">
<div
v-if="error"
class="flash-container"
>
<div class="flash-alert">
An error occurred. Please try again.
</div>
<form @submit="submit($event);">
<div v-if="error" class="flash-container">
<div class="flash-alert">An error occurred. Please try again.</div>
</div>
<label
:for="list.id + '-title'"
class="label-bold"
>
Title
</label>
<label :for="list.id + '-title'" class="label-bold"> Title </label>
<input
:id="list.id + '-title'"
ref="input"
Loading
Loading
@@ -120,10 +110,7 @@ export default {
name="issue_title"
autocomplete="off"
/>
<project-select
v-if="groupId"
:group-id="groupId"
/>
<project-select v-if="groupId" :group-id="groupId" />
<div class="clearfix prepend-top-10">
<gl-button
ref="submit-button"
Loading
Loading
@@ -134,12 +121,7 @@ export default {
>
Submit issue
</gl-button>
<gl-button
class="float-right"
type="button"
variant="default"
@click="cancel"
>
<gl-button class="float-right" type="button" variant="default" @click="cancel">
Cancel
</gl-button>
</div>
Loading
Loading
Loading
Loading
@@ -169,17 +169,12 @@ export default {
:title="__('Confidential')"
class="confidential-icon append-right-4"
:aria-label="__('Confidential')"
/><a
:href="issue.path"
:title="issue.title"
class="js-no-trigger"
@mousemove.stop>{{ issue.title }}</a>
/><a :href="issue.path" :title="issue.title" class="js-no-trigger" @mousemove.stop>{{
issue.title
}}</a>
</h4>
</div>
<div
v-if="showLabelFooter"
class="board-card-labels prepend-top-4 d-flex flex-wrap"
>
<div v-if="showLabelFooter" class="board-card-labels prepend-top-4 d-flex flex-wrap">
<button
v-for="label in issue.labels"
v-if="showLabel(label)"
Loading
Loading
@@ -189,13 +184,15 @@ export default {
:title="label.description"
class="badge color-label append-right-4 prepend-top-4"
type="button"
@click="filterByLabel(label)"
@click="filterByLabel(label);"
>
{{ label.title }}
</button>
</div>
<div class="board-card-footer d-flex justify-content-between align-items-end">
<div class="d-flex align-items-start flex-wrap-reverse board-card-number-container js-board-card-number-container">
<div
class="d-flex align-items-start flex-wrap-reverse board-card-number-container js-board-card-number-container"
>
<span
v-if="issue.referencePath"
class="board-card-number d-flex append-right-8 prepend-top-8"
Loading
Loading
@@ -205,13 +202,11 @@ export default {
:title="issueReferencePath"
placement="bottom"
class="board-issue-path block-truncated bold"
>{{ issueReferencePath }}</tooltip-on-truncate>#{{ issue.iid }}
>{{ issueReferencePath }}</tooltip-on-truncate
>#{{ issue.iid }}
</span>
<span class="board-info-items prepend-top-8 d-inline-block">
<issue-due-date
v-if="issue.dueDate"
:date="issue.dueDate"
/><issue-time-estimate
<issue-due-date v-if="issue.dueDate" :date="issue.dueDate" /><issue-time-estimate
v-if="issue.timeEstimate"
:estimate="issue.timeEstimate"
/>
Loading
Loading
@@ -230,8 +225,7 @@ export default {
tooltip-placement="bottom"
>
<span class="js-assignee-tooltip">
<span class="bold d-block">Assignee</span>
{{ assignee.name }}
<span class="bold d-block">Assignee</span> {{ assignee.name }}
<span class="text-white-50">@{{ assignee.username }}</span>
</span>
</user-avatar-link>
Loading
Loading
Loading
Loading
@@ -66,25 +66,17 @@ export default {
 
<template>
<span>
<span
ref="issueDueDate"
class="board-card-info card-number"
>
<span ref="issueDueDate" class="board-card-info card-number">
<icon
:class="{'text-danger': isPastDue, 'board-card-info-icon': true}"
:class="{ 'text-danger': isPastDue, 'board-card-info-icon': true }"
name="calendar"
/><time
:class="{'text-danger': isPastDue}"
datetime="date"
class="board-card-info-text">{{ body }}</time>
/><time :class="{ 'text-danger': isPastDue }" datetime="date" class="board-card-info-text">{{
body
}}</time>
</span>
<gl-tooltip
:target="() => $refs.issueDueDate"
placement="bottom"
>
<span class="bold">{{ __('Due date') }}</span>
<br />
<span :class="{'text-danger-muted': isPastDue}">{{ title }}</span>
<gl-tooltip :target="() => $refs.issueDueDate" placement="bottom">
<span class="bold">{{ __('Due date') }}</span> <br />
<span :class="{ 'text-danger-muted': isPastDue }">{{ title }}</span>
</gl-tooltip>
</span>
</template>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment