Merge branch 'master' into issue-discussions-refactor

# Conflicts:
#	app/models/issue.rb
This commit is contained in:
Douwe Maan 2017-08-30 10:14:56 +02:00
commit b181d3124e
521 changed files with 8452 additions and 3738 deletions

View File

@ -68,19 +68,6 @@ stages:
- mysql:latest - mysql:latest
- redis:alpine - redis:alpine
.only-if-want-mysql: &only-if-want-mysql
only:
- /mysql/
- /-stable/
- master@gitlab-org/gitlab-ce
- master@gitlab-org/gitlab-ee
- master@gitlab/gitlabhq
- master@gitlab/gitlab-ee
- tags@gitlab-org/gitlab-ce
- tags@gitlab-org/gitlab-ee
- tags@gitlab/gitlabhq
- tags@gitlab/gitlab-ee
# Skip all jobs except the ones that begin with 'docs/'. # Skip all jobs except the ones that begin with 'docs/'.
# Used for commits including ONLY documentation changes. # Used for commits including ONLY documentation changes.
# https://docs.gitlab.com/ce/development/writing_documentation.html#testing # https://docs.gitlab.com/ce/development/writing_documentation.html#testing
@ -124,7 +111,6 @@ stages:
.rspec-metadata-mysql: &rspec-metadata-mysql .rspec-metadata-mysql: &rspec-metadata-mysql
<<: *rspec-metadata <<: *rspec-metadata
<<: *use-mysql <<: *use-mysql
<<: *only-if-want-mysql
<<: *except-docs <<: *except-docs
.spinach-metadata: &spinach-metadata .spinach-metadata: &spinach-metadata
@ -156,7 +142,6 @@ stages:
.spinach-metadata-mysql: &spinach-metadata-mysql .spinach-metadata-mysql: &spinach-metadata-mysql
<<: *spinach-metadata <<: *spinach-metadata
<<: *use-mysql <<: *use-mysql
<<: *only-if-want-mysql
<<: *except-docs <<: *except-docs
.only-canonical-masters: &only-canonical-masters .only-canonical-masters: &only-canonical-masters

View File

@ -606,6 +606,18 @@ Style/YodaCondition:
Style/Proc: Style/Proc:
Enabled: true Enabled: true
# Use `spam?` instead of `is_spam?`
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
# NamePrefix: is_, has_, have_
# NamePrefixBlacklist: is_, has_, have_
# NameWhitelist: is_a?
Style/PredicateName:
Enabled: true
NamePrefixBlacklist: is_
Exclude:
- 'spec/**/*'
- 'features/**/*'
# Metrics ##################################################################### # Metrics #####################################################################
# A calculated magnitude based on number of assignments, # A calculated magnitude based on number of assignments,
@ -631,7 +643,7 @@ Metrics/ClassLength:
# of test cases needed to validate a method. # of test cases needed to validate a method.
Metrics/CyclomaticComplexity: Metrics/CyclomaticComplexity:
Enabled: true Enabled: true
Max: 16 Max: 15
# Limit lines to 80 characters. # Limit lines to 80 characters.
Metrics/LineLength: Metrics/LineLength:
@ -1181,6 +1193,10 @@ GitlabSecurity/DeepMunge:
- 'lib/**/*.rake' - 'lib/**/*.rake'
- 'spec/**/*' - 'spec/**/*'
# To be enabled by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/13610
GitlabSecurity/JsonSerialization:
Enabled: false
GitlabSecurity/PublicSend: GitlabSecurity/PublicSend:
Enabled: true Enabled: true
Exclude: Exclude:

View File

@ -237,14 +237,6 @@ Style/PercentLiteralDelimiters:
Style/PerlBackrefs: Style/PerlBackrefs:
Enabled: false Enabled: false
# Offense count: 105
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
# NamePrefix: is_, has_, have_
# NamePrefixBlacklist: is_, has_, have_
# NameWhitelist: is_a?
Style/PredicateName:
Enabled: false
# Offense count: 58 # Offense count: 58
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles. # Configuration parameters: EnforcedStyle, SupportedStyles.

View File

@ -2,6 +2,23 @@
documentation](doc/development/changelog.md) for instructions on adding your own documentation](doc/development/changelog.md) for instructions on adding your own
entry. entry.
## 9.5.2 (2017-08-28)
- [FIXED] Fix signing in using LDAP when attribute mapping uses simple strings instead of arrays.
- [FIXED] Show un-highlighted text diffs when we do not have references to the correct blobs.
- [FIXED] Fix display of push events for removed refs.
- [FIXED] Testing of some integrations were broken due to missing ServiceHook record.
- [FIXED] Fire system hooks when a user is created via LDAP.
- [FIXED] Fix new project form not resetting the template value.
## 9.5.1 (2017-08-23)
- [FIXED] Fix merge request pipeline status when pipeline has errors. !13664
- [FIXED] Commit rows would occasionally render with the wrong language.
- [FIXED] Fix caching of future broadcast messages.
- [FIXED] Only require Sidekiq throttling library when enabled, to reduce cache misses.
- Raise Housekeeping timeout to 24 hours. !13719
## 9.5.0 (2017-08-22) ## 9.5.0 (2017-08-22)
- [FIXED] Fix timeouts when creating projects in groups with many members. !13508 - [FIXED] Fix timeouts when creating projects in groups with many members. !13508

View File

@ -164,7 +164,7 @@ Assigning a team label makes sure issues get the attention of the appropriate
people. people.
The current team labels are ~Build, ~CI, ~Discussion, ~Documentation, ~Edge, The current team labels are ~Build, ~CI, ~Discussion, ~Documentation, ~Edge,
~Gitaly, ~Platform, ~Prometheus, ~Release, and ~"UX". ~Geo, ~Gitaly, ~Platform, ~Prometheus, ~Release, and ~"UX".
The descriptions on the [labels page][labels-page] explain what falls under the The descriptions on the [labels page][labels-page] explain what falls under the
responsibility of each team. responsibility of each team.

11
Gemfile
View File

@ -207,9 +207,6 @@ gem 'kubeclient', '~> 2.2.0'
# d3 # d3
gem 'd3_rails', '~> 3.5.0' gem 'd3_rails', '~> 3.5.0'
# underscore-rails
gem 'underscore-rails', '~> 1.8.0'
# Sanitize user input # Sanitize user input
gem 'sanitize', '~> 2.0' gem 'sanitize', '~> 2.0'
gem 'babosa', '~> 1.0.2' gem 'babosa', '~> 1.0.2'
@ -287,7 +284,7 @@ group :metrics do
gem 'influxdb', '~> 0.2', require: false gem 'influxdb', '~> 0.2', require: false
# Prometheus # Prometheus
gem 'prometheus-client-mmap', '~>0.7.0.beta12' gem 'prometheus-client-mmap', '~>0.7.0.beta14'
gem 'raindrops', '~> 0.18' gem 'raindrops', '~> 0.18'
end end
@ -340,7 +337,7 @@ group :development, :test do
gem 'rubocop', '~> 0.49.1', require: false gem 'rubocop', '~> 0.49.1', require: false
gem 'rubocop-rspec', '~> 1.15.1', require: false gem 'rubocop-rspec', '~> 1.15.1', require: false
gem 'rubocop-gitlab-security', '~> 0.0.6', require: false gem 'rubocop-gitlab-security', '~> 0.1.0', require: false
gem 'scss_lint', '~> 0.54.0', require: false gem 'scss_lint', '~> 0.54.0', require: false
gem 'haml_lint', '~> 0.26.0', require: false gem 'haml_lint', '~> 0.26.0', require: false
gem 'simplecov', '~> 0.14.0', require: false gem 'simplecov', '~> 0.14.0', require: false
@ -396,12 +393,12 @@ gem 'net-ssh', '~> 4.1.0'
# Required for ED25519 SSH host key support # Required for ED25519 SSH host key support
group :ed25519 do group :ed25519 do
gem 'rbnacl-libsodium' gem 'rbnacl-libsodium'
gem 'rbnacl', '~> 3.2' gem 'rbnacl', '~> 4.0'
gem 'bcrypt_pbkdf', '~> 1.0' gem 'bcrypt_pbkdf', '~> 1.0'
end end
# Gitaly GRPC client # Gitaly GRPC client
gem 'gitaly', '~> 0.29.0' gem 'gitaly-proto', '~> 0.31.0', require: 'gitaly'
gem 'toml-rb', '~> 0.3.15', require: false gem 'toml-rb', '~> 0.3.15', require: false

View File

@ -203,7 +203,7 @@ GEM
multi_json multi_json
fast_gettext (1.4.0) fast_gettext (1.4.0)
ffaker (2.4.0) ffaker (2.4.0)
ffi (1.9.10) ffi (1.9.18)
flay (2.8.1) flay (2.8.1)
erubis (~> 2.7.0) erubis (~> 2.7.0)
path_expander (~> 1.0) path_expander (~> 1.0)
@ -275,7 +275,7 @@ GEM
po_to_json (>= 1.0.0) po_to_json (>= 1.0.0)
rails (>= 3.2.0) rails (>= 3.2.0)
gherkin-ruby (0.3.2) gherkin-ruby (0.3.2)
gitaly (0.29.0) gitaly-proto (0.31.0)
google-protobuf (~> 3.1) google-protobuf (~> 3.1)
grpc (~> 1.0) grpc (~> 1.0)
github-linguist (4.7.6) github-linguist (4.7.6)
@ -619,7 +619,7 @@ GEM
parser parser
unparser unparser
procto (0.0.3) procto (0.0.3)
prometheus-client-mmap (0.7.0.beta12) prometheus-client-mmap (0.7.0.beta14)
mmap2 (~> 2.2, >= 2.2.7) mmap2 (~> 2.2, >= 2.2.7)
pry (0.10.4) pry (0.10.4)
coderay (~> 1.1.0) coderay (~> 1.1.0)
@ -682,7 +682,7 @@ GEM
rake (12.0.0) rake (12.0.0)
rblineprof (0.3.6) rblineprof (0.3.6)
debugger-ruby_core_source (~> 1.3) debugger-ruby_core_source (~> 1.3)
rbnacl (3.4.0) rbnacl (4.0.2)
ffi ffi
rbnacl-libsodium (1.0.11) rbnacl-libsodium (1.0.11)
rbnacl (>= 3.0.1) rbnacl (>= 3.0.1)
@ -769,7 +769,7 @@ GEM
rainbow (>= 1.99.1, < 3.0) rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1) unicode-display_width (~> 1.0, >= 1.0.1)
rubocop-gitlab-security (0.0.6) rubocop-gitlab-security (0.1.0)
rubocop (>= 0.47.1) rubocop (>= 0.47.1)
rubocop-rspec (1.15.1) rubocop-rspec (1.15.1)
rubocop (>= 0.42.0) rubocop (>= 0.42.0)
@ -899,7 +899,6 @@ GEM
uglifier (2.7.2) uglifier (2.7.2)
execjs (>= 0.3.0) execjs (>= 0.3.0)
json (>= 1.8.0) json (>= 1.8.0)
underscore-rails (1.8.3)
unf (0.1.4) unf (0.1.4)
unf_ext unf_ext
unf_ext (0.0.7.2) unf_ext (0.0.7.2)
@ -1019,7 +1018,7 @@ DEPENDENCIES
gettext (~> 3.2.2) gettext (~> 3.2.2)
gettext_i18n_rails (~> 1.8.0) gettext_i18n_rails (~> 1.8.0)
gettext_i18n_rails_js (~> 1.2.0) gettext_i18n_rails_js (~> 1.2.0)
gitaly (~> 0.29.0) gitaly-proto (~> 0.31.0)
github-linguist (~> 4.7.0) github-linguist (~> 4.7.0)
gitlab-flowdock-git-hook (~> 1.0.1) gitlab-flowdock-git-hook (~> 1.0.1)
gitlab-markup (~> 1.5.1) gitlab-markup (~> 1.5.1)
@ -1094,7 +1093,7 @@ DEPENDENCIES
pg (~> 0.18.2) pg (~> 0.18.2)
poltergeist (~> 1.9.0) poltergeist (~> 1.9.0)
premailer-rails (~> 1.9.7) premailer-rails (~> 1.9.7)
prometheus-client-mmap (~> 0.7.0.beta12) prometheus-client-mmap (~> 0.7.0.beta14)
pry-byebug (~> 3.4.1) pry-byebug (~> 3.4.1)
pry-rails (~> 0.3.4) pry-rails (~> 0.3.4)
rack-attack (~> 4.4.1) rack-attack (~> 4.4.1)
@ -1107,7 +1106,7 @@ DEPENDENCIES
rainbow (~> 2.2) rainbow (~> 2.2)
raindrops (~> 0.18) raindrops (~> 0.18)
rblineprof (~> 0.3.6) rblineprof (~> 0.3.6)
rbnacl (~> 3.2) rbnacl (~> 4.0)
rbnacl-libsodium rbnacl-libsodium
rdoc (~> 4.2) rdoc (~> 4.2)
re2 (~> 1.1.1) re2 (~> 1.1.1)
@ -1126,7 +1125,7 @@ DEPENDENCIES
rspec-set (~> 0.1.3) rspec-set (~> 0.1.3)
rspec_profiling (~> 0.0.5) rspec_profiling (~> 0.0.5)
rubocop (~> 0.49.1) rubocop (~> 0.49.1)
rubocop-gitlab-security (~> 0.0.6) rubocop-gitlab-security (~> 0.1.0)
rubocop-rspec (~> 1.15.1) rubocop-rspec (~> 1.15.1)
ruby-fogbugz (~> 0.2.1) ruby-fogbugz (~> 0.2.1)
ruby-prof (~> 0.16.2) ruby-prof (~> 0.16.2)
@ -1163,7 +1162,6 @@ DEPENDENCIES
truncato (~> 0.7.8) truncato (~> 0.7.8)
u2f (~> 0.2.1) u2f (~> 0.2.1)
uglifier (~> 2.7.2) uglifier (~> 2.7.2)
underscore-rails (~> 1.8.0)
unf (~> 0.1.4) unf (~> 0.1.4)
unicorn (~> 5.1.0) unicorn (~> 5.1.0)
unicorn-worker-killer (~> 0.4.4) unicorn-worker-killer (~> 0.4.4)
@ -1176,4 +1174,4 @@ DEPENDENCIES
wikicloth (= 0.8.1) wikicloth (= 0.8.1)
BUNDLED WITH BUNDLED WITH
1.15.3 1.15.4

View File

@ -55,13 +55,18 @@ const Api = {
// Return projects list. Filtered by query // Return projects list. Filtered by query
projects(query, options, callback) { projects(query, options, callback) {
const url = Api.buildUrl(Api.projectsPath); const url = Api.buildUrl(Api.projectsPath);
const defaults = {
search: query,
per_page: 20,
};
if (gon.current_user_id) {
defaults.membership = true;
}
return $.ajax({ return $.ajax({
url, url,
data: Object.assign({ data: Object.assign(defaults, options),
search: query,
per_page: 20,
membership: true,
}, options),
dataType: 'json', dataType: 'json',
}) })
.done(projects => callback(projects)); .done(projects => callback(projects));
@ -96,18 +101,17 @@ const Api = {
.done(projects => callback(projects)); .done(projects => callback(projects));
}, },
commitMultiple(id, data, callback) { commitMultiple(id, data) {
// see https://docs.gitlab.com/ce/api/commits.html#create-a-commit-with-multiple-files-and-actions
const url = Api.buildUrl(Api.commitPath) const url = Api.buildUrl(Api.commitPath)
.replace(':id', id); .replace(':id', id);
return $.ajax({ return this.wrapAjaxCall({
url, url,
type: 'POST', type: 'POST',
contentType: 'application/json; charset=utf-8', contentType: 'application/json; charset=utf-8',
data: JSON.stringify(data), data: JSON.stringify(data),
dataType: 'json', dataType: 'json',
}) });
.done(commitData => callback(commitData))
.fail(message => callback(message.responseJSON));
}, },
// Return text for a specific license // Return text for a specific license

View File

@ -29,12 +29,14 @@ showTooltip = function(target, title) {
var $target = $(target); var $target = $(target);
var originalTitle = $target.data('original-title'); var originalTitle = $target.data('original-title');
$target if (!$target.data('hideTooltip')) {
.attr('title', 'Copied') $target
.tooltip('fixTitle') .attr('title', 'Copied')
.tooltip('show') .tooltip('fixTitle')
.attr('title', originalTitle) .tooltip('show')
.tooltip('fixTitle'); .attr('title', originalTitle)
.tooltip('fixTitle');
}
}; };
$(function() { $(function() {

View File

@ -183,13 +183,13 @@ import initChangesDropdown from './init_changes_dropdown';
break; break;
case 'dashboard:issues': case 'dashboard:issues':
case 'dashboard:merge_requests': case 'dashboard:merge_requests':
case 'groups:merge_requests':
new ProjectSelect(); new ProjectSelect();
initLegacyFilters(); initLegacyFilters();
break; break;
case 'groups:issues': case 'groups:issues':
case 'groups:merge_requests':
if (filteredSearchEnabled) { if (filteredSearchEnabled) {
const filteredSearchManager = new gl.FilteredSearchManager('issues'); const filteredSearchManager = new gl.FilteredSearchManager(page === 'groups:issues' ? 'issues' : 'merge_requests');
filteredSearchManager.setup(); filteredSearchManager.setup();
} }
new ProjectSelect(); new ProjectSelect();

View File

@ -85,6 +85,13 @@ class DropDown {
const renderableList = this.list.querySelector('ul[data-dynamic]') || this.list; const renderableList = this.list.querySelector('ul[data-dynamic]') || this.list;
renderableList.innerHTML = children.join(''); renderableList.innerHTML = children.join('');
const listEvent = new CustomEvent('render.dl', {
detail: {
list: this,
},
});
this.list.dispatchEvent(listEvent);
} }
renderChildren(data) { renderChildren(data) {

View File

@ -0,0 +1,82 @@
/* global Flash */
import Ajax from '~/droplab/plugins/ajax';
import Filter from '~/droplab/plugins/filter';
import './filtered_search_dropdown';
class DropdownEmoji extends gl.FilteredSearchDropdown {
constructor(options = {}) {
super(options);
this.config = {
Ajax: {
endpoint: `${gon.relative_url_root || ''}/autocomplete/award_emojis`,
method: 'setData',
loadingTemplate: this.loadingTemplate,
onError() {
/* eslint-disable no-new */
new Flash('An error occured fetching the dropdown data.');
/* eslint-enable no-new */
},
},
Filter: {
template: 'name',
},
};
import(/* webpackChunkName: 'emoji' */ '~/emoji')
.then(({ glEmojiTag }) => { this.glEmojiTag = glEmojiTag; })
.catch(() => { /* ignore error and leave emoji name in the search bar */ });
this.unbindEvents();
this.bindEvents();
}
bindEvents() {
super.bindEvents();
this.listRenderedWrapper = this.listRendered.bind(this);
this.dropdown.addEventListener('render.dl', this.listRenderedWrapper);
}
unbindEvents() {
this.dropdown.removeEventListener('render.dl', this.listRenderedWrapper);
super.unbindEvents();
}
listRendered() {
this.replaceEmojiElement();
}
itemClicked(e) {
super.itemClicked(e, (selected) => {
const name = selected.querySelector('.js-data-value').innerText.trim();
return gl.DropdownUtils.getEscapedText(name);
});
}
renderContent(forceShowList = false) {
this.droplab.changeHookList(this.hookId, this.dropdown, [Ajax, Filter], this.config);
super.renderContent(forceShowList);
}
replaceEmojiElement() {
if (!this.glEmojiTag) return;
// Replace empty gl-emoji tag to real content
const dropdownItems = [...this.dropdown.querySelectorAll('.filter-dropdown-item')];
dropdownItems.forEach((dropdownItem) => {
const name = dropdownItem.querySelector('.js-data-value').innerText;
const emojiTag = this.glEmojiTag(name);
const emojiElement = dropdownItem.querySelector('gl-emoji');
emojiElement.outerHTML = emojiTag;
});
}
init() {
this.droplab
.addHook(this.input, this.dropdown, [Ajax, Filter], this.config).init();
}
}
window.gl = window.gl || {};
gl.DropdownEmoji = DropdownEmoji;

View File

@ -61,7 +61,7 @@ class DropdownHint extends gl.FilteredSearchDropdown {
.map(tokenKey => ({ .map(tokenKey => ({
icon: `fa-${tokenKey.icon}`, icon: `fa-${tokenKey.icon}`,
hint: tokenKey.key, hint: tokenKey.key,
tag: `<${tokenKey.symbol}${tokenKey.key}>`, tag: `<${tokenKey.tag}>`,
type: tokenKey.type, type: tokenKey.type,
})); }));

View File

@ -1,3 +1,4 @@
import './dropdown_emoji';
import './dropdown_hint'; import './dropdown_hint';
import './dropdown_non_user'; import './dropdown_non_user';
import './dropdown_user'; import './dropdown_user';

View File

@ -58,6 +58,11 @@ class FilteredSearchDropdownManager {
}, },
element: this.container.querySelector('#js-dropdown-label'), element: this.container.querySelector('#js-dropdown-label'),
}, },
'my-reaction': {
reference: null,
gl: 'DropdownEmoji',
element: this.container.querySelector('#js-dropdown-my-reaction'),
},
hint: { hint: {
reference: null, reference: null,
gl: 'DropdownHint', gl: 'DropdownHint',

View File

@ -439,8 +439,13 @@ class FilteredSearchManager {
const match = this.filteredSearchTokenKeys.searchByKeyParam(keyParam); const match = this.filteredSearchTokenKeys.searchByKeyParam(keyParam);
if (match) { if (match) {
const indexOf = keyParam.indexOf('_'); // Use lastIndexOf because the token key is allowed to contain underscore
const sanitizedKey = indexOf !== -1 ? keyParam.slice(0, keyParam.indexOf('_')) : keyParam; // e.g. 'my_reaction' is the token key of 'my_reaction_emoji'
const lastIndexOf = keyParam.lastIndexOf('_');
let sanitizedKey = lastIndexOf !== -1 ? keyParam.slice(0, lastIndexOf) : keyParam;
// Replace underscore with hyphen in the sanitizedkey.
// e.g. 'my_reaction' => 'my-reaction'
sanitizedKey = sanitizedKey.replace('_', '-');
const symbol = match.symbol; const symbol = match.symbol;
let quotationsToUse = ''; let quotationsToUse = '';
@ -515,7 +520,10 @@ class FilteredSearchManager {
const condition = this.filteredSearchTokenKeys const condition = this.filteredSearchTokenKeys
.searchByConditionKeyValue(token.key, token.value.toLowerCase()); .searchByConditionKeyValue(token.key, token.value.toLowerCase());
const { param } = this.filteredSearchTokenKeys.searchByKey(token.key) || {}; const { param } = this.filteredSearchTokenKeys.searchByKey(token.key) || {};
const keyParam = param ? `${token.key}_${param}` : token.key; // Replace hyphen with underscore to use as request parameter
// e.g. 'my-reaction' => 'my_reaction'
const underscoredKey = token.key.replace('-', '_');
const keyParam = param ? `${underscoredKey}_${param}` : underscoredKey;
let tokenPath = ''; let tokenPath = '';
if (condition) { if (condition) {

View File

@ -4,26 +4,42 @@ const tokenKeys = [{
param: 'username', param: 'username',
symbol: '@', symbol: '@',
icon: 'pencil', icon: 'pencil',
tag: '@author',
}, { }, {
key: 'assignee', key: 'assignee',
type: 'string', type: 'string',
param: 'username', param: 'username',
symbol: '@', symbol: '@',
icon: 'user', icon: 'user',
tag: '@assignee',
}, { }, {
key: 'milestone', key: 'milestone',
type: 'string', type: 'string',
param: 'title', param: 'title',
symbol: '%', symbol: '%',
icon: 'clock-o', icon: 'clock-o',
tag: '%milestone',
}, { }, {
key: 'label', key: 'label',
type: 'array', type: 'array',
param: 'name[]', param: 'name[]',
symbol: '~', symbol: '~',
icon: 'tag', icon: 'tag',
tag: '~label',
}]; }];
if (gon.current_user_id) {
// Appending tokenkeys only logged-in
tokenKeys.push({
key: 'my-reaction',
type: 'string',
param: 'emoji',
symbol: '',
icon: 'thumbs-up',
tag: 'emoji',
});
}
const alternativeTokenKeys = [{ const alternativeTokenKeys = [{
key: 'label', key: 'label',
type: 'string', type: 'string',
@ -84,6 +100,10 @@ class FilteredSearchTokenKeys {
return tokenKeysWithAlternative.find((tokenKey) => { return tokenKeysWithAlternative.find((tokenKey) => {
let tokenKeyParam = tokenKey.key; let tokenKeyParam = tokenKey.key;
// Replace hyphen with underscore to compare keyParam with tokenKeyParam
// e.g. 'my-reaction' => 'my_reaction'
tokenKeyParam = tokenKeyParam.replace('-', '_');
if (tokenKey.param) { if (tokenKey.param) {
tokenKeyParam += `_${tokenKey.param}`; tokenKeyParam += `_${tokenKey.param}`;
} }

View File

@ -132,6 +132,23 @@ class FilteredSearchVisualTokens {
.catch(() => { }); .catch(() => { });
} }
static updateEmojiTokenAppearance(tokenValueContainer, tokenValueElement, tokenValue) {
const container = tokenValueContainer;
const element = tokenValueElement;
return import(/* webpackChunkName: 'emoji' */ '../emoji')
.then((Emoji) => {
if (!Emoji.isEmojiNameValid(tokenValue)) {
return;
}
container.dataset.originalValue = tokenValue;
element.innerHTML = Emoji.glEmojiTag(tokenValue);
})
// ignore error and leave emoji name in the search bar
.catch(() => { });
}
static renderVisualTokenValue(parentElement, tokenName, tokenValue) { static renderVisualTokenValue(parentElement, tokenName, tokenValue) {
const tokenValueContainer = parentElement.querySelector('.value-container'); const tokenValueContainer = parentElement.querySelector('.value-container');
const tokenValueElement = tokenValueContainer.querySelector('.value'); const tokenValueElement = tokenValueContainer.querySelector('.value');
@ -144,6 +161,10 @@ class FilteredSearchVisualTokens {
FilteredSearchVisualTokens.updateUserTokenAppearance( FilteredSearchVisualTokens.updateUserTokenAppearance(
tokenValueContainer, tokenValueElement, tokenValue, tokenValueContainer, tokenValueElement, tokenValue,
); );
} else if (tokenType === 'my-reaction') {
FilteredSearchVisualTokens.updateEmojiTokenAppearance(
tokenValueContainer, tokenValueElement, tokenValue,
);
} }
} }

View File

@ -1,5 +1,5 @@
export const isSticky = (el, scrollY, stickyTop) => { export const isSticky = (el, scrollY, stickyTop) => {
const top = el.offsetTop - scrollY; const top = Math.floor(el.offsetTop - scrollY);
if (top <= stickyTop) { if (top <= stickyTop) {
el.classList.add('is-stuck'); el.classList.add('is-stuck');

View File

@ -253,6 +253,7 @@ import bp from './breakpoints';
loadDiff(source) { loadDiff(source) {
if (this.diffsLoaded) { if (this.diffsLoaded) {
document.dispatchEvent(new CustomEvent('scroll'));
return; return;
} }

View File

@ -7,6 +7,7 @@
import eventHub from '../event_hub'; import eventHub from '../event_hub';
import measurements from '../utils/measurements'; import measurements from '../utils/measurements';
import { formatRelevantDigits } from '../../lib/utils/number_utils'; import { formatRelevantDigits } from '../../lib/utils/number_utils';
import { timeScaleFormat } from '../utils/date_time_formatters';
import bp from '../../breakpoints'; import bp from '../../breakpoints';
const bisectDate = d3.bisector(d => d.time).left; const bisectDate = d3.bisector(d => d.time).left;
@ -159,6 +160,7 @@
const xAxis = d3.svg.axis() const xAxis = d3.svg.axis()
.scale(axisXScale) .scale(axisXScale)
.ticks(measurements.xTicks) .ticks(measurements.xTicks)
.tickFormat(timeScaleFormat)
.orient('bottom'); .orient('bottom');
const yAxis = d3.svg.axis() const yAxis = d3.svg.axis()
@ -266,14 +268,6 @@
stroke-width="2" stroke-width="2"
transform="translate(-5, 20)"> transform="translate(-5, 20)">
</path> </path>
<rect
class="prometheus-graph-overlay"
:width="(graphWidth - 70)"
:height="(graphHeight - 100)"
transform="translate(-5, 20)"
ref="graphOverlay"
@mousemove="handleMouseOverGraph($event)">
</rect>
<monitoring-deployment <monitoring-deployment
:show-deploy-info="showDeployInfo" :show-deploy-info="showDeployInfo"
:deployment-data="reducedDeploymentData" :deployment-data="reducedDeploymentData"
@ -289,6 +283,14 @@
:graph-height="graphHeight" :graph-height="graphHeight"
:graph-height-offset="graphHeightOffset" :graph-height-offset="graphHeightOffset"
/> />
<rect
class="prometheus-graph-overlay"
:width="(graphWidth - 70)"
:height="(graphHeight - 100)"
transform="translate(-5, 20)"
ref="graphOverlay"
@mousemove="handleMouseOverGraph($event)">
</rect>
</svg> </svg>
</svg> </svg>
</div> </div>

View File

@ -1,8 +1,5 @@
<script> <script>
import { import { dateFormat, timeFormat } from '../utils/date_time_formatters';
dateFormat,
timeFormat,
} from '../constants';
export default { export default {
props: { props: {
@ -58,7 +55,7 @@
class="deploy-info" class="deploy-info"
v-if="showDeployInfo"> v-if="showDeployInfo">
<g <g
v-for="(deployment, index) in deploymentData" v-for="(deployment, index) in deploymentData"
:key="index" :key="index"
:class="nameDeploymentClass(deployment)" :class="nameDeploymentClass(deployment)"
:transform="transformDeploymentGroup(deployment)"> :transform="transformDeploymentGroup(deployment)">
@ -92,7 +89,7 @@
width="90" width="90"
height="58"> height="58">
</rect> </rect>
<g <g
transform="translate(5, 2)"> transform="translate(5, 2)">
<text <text
class="deploy-info-text text-metric-bold"> class="deploy-info-text text-metric-bold">

View File

@ -1,8 +1,5 @@
<script> <script>
import { import { dateFormat, timeFormat } from '../utils/date_time_formatters';
dateFormat,
timeFormat,
} from '../constants';
export default { export default {
props: { props: {
@ -72,7 +69,7 @@
r="5" r="5"
transform="translate(-5, 20)"> transform="translate(-5, 20)">
</circle> </circle>
<svg <svg
class="rect-text-metric" class="rect-text-metric"
:x="currentFlagPosition" :x="currentFlagPosition"
y="0"> y="0">

View File

@ -1,4 +0,0 @@
import d3 from 'd3';
export const dateFormat = d3.time.format('%b %d, %Y');
export const timeFormat = d3.time.format('%H:%M%p');

View File

@ -0,0 +1,15 @@
import d3 from 'd3';
export const dateFormat = d3.time.format('%b %-d, %Y');
export const timeFormat = d3.time.format('%-I:%M%p');
export const timeScaleFormat = d3.time.format.multi([
['.%L', d => d.getMilliseconds()],
[':%S', d => d.getSeconds()],
['%-I:%M', d => d.getMinutes()],
['%-I %p', d => d.getHours()],
['%a %-d', d => d.getDay() && d.getDate() !== 1],
['%b %-d', d => d.getDate() !== 1],
['%B', d => d.getMonth()],
['%Y', () => true],
]);

View File

@ -47,7 +47,6 @@ export default class NewNavSidebar {
if (this.$sidebar.length) { if (this.$sidebar.length) {
this.$sidebar.toggleClass('sidebar-icons-only', collapsed); this.$sidebar.toggleClass('sidebar-icons-only', collapsed);
this.$page.toggleClass('page-with-new-sidebar', !collapsed);
this.$page.toggleClass('page-with-icon-sidebar', breakpoint === 'sm' ? true : collapsed); this.$page.toggleClass('page-with-icon-sidebar', breakpoint === 'sm' ? true : collapsed);
} }
NewNavSidebar.setCollapsedCookie(collapsed); NewNavSidebar.setCollapsedCookie(collapsed);

View File

@ -1,23 +1,29 @@
<script> <script>
export default { export default {
name: 'PipelineNavigationTabs', name: 'PipelineNavigationTabs',
props: { props: {
scope: { scope: {
type: String, type: String,
required: true, required: true,
},
count: {
type: Object,
required: true,
},
paths: {
type: Object,
required: true,
},
}, },
count: { mounted() {
type: Object, $(document).trigger('init.scrolling-tabs');
required: true,
}, },
paths: { methods: {
type: Object, shouldRenderBadge(count) {
required: true, // 0 is valid in a badge, but evaluates to false, we need to check for undefined
return count !== undefined;
},
}, },
},
mounted() {
$(document).trigger('init.scrolling-tabs');
},
}; };
</script> </script>
<template> <template>
@ -27,7 +33,9 @@ export default {
:class="{ active: scope === 'all'}"> :class="{ active: scope === 'all'}">
<a :href="paths.allPath"> <a :href="paths.allPath">
All All
<span class="badge js-totalbuilds-count"> <span
v-if="shouldRenderBadge(count.all)"
class="badge js-totalbuilds-count">
{{count.all}} {{count.all}}
</span> </span>
</a> </a>
@ -37,7 +45,9 @@ export default {
:class="{ active: scope === 'pending'}"> :class="{ active: scope === 'pending'}">
<a :href="paths.pendingPath"> <a :href="paths.pendingPath">
Pending Pending
<span class="badge"> <span
v-if="shouldRenderBadge(count.pending)"
class="badge">
{{count.pending}} {{count.pending}}
</span> </span>
</a> </a>
@ -47,7 +57,9 @@ export default {
:class="{ active: scope === 'running'}"> :class="{ active: scope === 'running'}">
<a :href="paths.runningPath"> <a :href="paths.runningPath">
Running Running
<span class="badge"> <span
v-if="shouldRenderBadge(count.running)"
class="badge">
{{count.running}} {{count.running}}
</span> </span>
</a> </a>
@ -57,7 +69,9 @@ export default {
:class="{ active: scope === 'finished'}"> :class="{ active: scope === 'finished'}">
<a :href="paths.finishedPath"> <a :href="paths.finishedPath">
Finished Finished
<span class="badge"> <span
v-if="shouldRenderBadge(count.finished)"
class="badge">
{{count.finished}} {{count.finished}}
</span> </span>
</a> </a>

View File

@ -42,7 +42,9 @@ export default {
actions, actions,
}; };
Store.submitCommitsLoading = true; Store.submitCommitsLoading = true;
Service.commitFiles(payload, this.resetCommitState); Service.commitFiles(payload)
.then(this.resetCommitState)
.catch(() => Flash('An error occured while committing your changes'));
}, },
resetCommitState() { resetCommitState() {

View File

@ -65,15 +65,17 @@ const RepoService = {
return urlArray.join('/'); return urlArray.join('/');
}, },
commitFiles(payload, cb) { commitFiles(payload) {
Api.commitMultiple(Store.projectId, payload, (data) => { return Api.commitMultiple(Store.projectId, payload)
if (data.short_id && data.stats) { .then(this.commitFlash);
Flash(`Your changes have been committed. Commit ${data.short_id} with ${data.stats.additions} additions, ${data.stats.deletions} deletions.`, 'notice'); },
} else {
Flash(data.message); commitFlash(data) {
} if (data.short_id && data.stats) {
cb(); window.Flash(`Your changes have been committed. Commit ${data.short_id} with ${data.stats.additions} additions, ${data.stats.deletions} deletions.`, 'notice');
}); } else {
window.Flash(data.message);
}
}, },
}; };

View File

@ -588,9 +588,10 @@ function UsersSelect(currentUser, els) {
if (showEmailUser && data.results.length === 0 && query.term.match(/^[^@]+@[^@]+$/)) { if (showEmailUser && data.results.length === 0 && query.term.match(/^[^@]+@[^@]+$/)) {
var trimmed = query.term.trim(); var trimmed = query.term.trim();
emailUser = { emailUser = {
name: "Invite \"" + query.term + "\"", name: "Invite \"" + query.term + "\" by email",
username: trimmed, username: trimmed,
id: trimmed id: trimmed,
invite: true
}; };
data.results.unshift(emailUser); data.results.unshift(emailUser);
} }
@ -642,7 +643,7 @@ UsersSelect.prototype.formatResult = function(user) {
} else { } else {
avatar = gon.default_avatar_url; avatar = gon.default_avatar_url;
} }
return "<div class='user-result " + (!user.username ? 'no-username' : void 0) + "'> <div class='user-image'><img class='avatar avatar-inline s32' src='" + avatar + "'></div> <div class='user-name dropdown-menu-user-full-name'>" + user.name + "</div> <div class='user-username dropdown-menu-user-username'>" + ("@" + user.username || "") + "</div> </div>"; return "<div class='user-result " + (!user.username ? 'no-username' : void 0) + "'> <div class='user-image'><img class='avatar avatar-inline s32' src='" + avatar + "'></div> <div class='user-name dropdown-menu-user-full-name'>" + user.name + "</div> <div class='user-username dropdown-menu-user-username'>" + (!user.invite ? "@" + _.escape(user.username) : "") + "</div> </div>";
}; };
UsersSelect.prototype.formatSelection = function(user) { UsersSelect.prototype.formatSelection = function(user) {

View File

@ -78,7 +78,7 @@
&.s60 { font-size: 32px; line-height: 58px; } &.s60 { font-size: 32px; line-height: 58px; }
&.s70 { font-size: 34px; line-height: 70px; } &.s70 { font-size: 34px; line-height: 70px; }
&.s90 { font-size: 36px; line-height: 88px; } &.s90 { font-size: 36px; line-height: 88px; }
&.s110 { font-size: 40px; line-height: 108px; font-weight: 300; } &.s110 { font-size: 40px; line-height: 108px; font-weight: $gl-font-weight-normal; }
&.s140 { font-size: 72px; line-height: 138px; } &.s140 { font-size: 72px; line-height: 138px; }
&.s160 { font-size: 96px; line-height: 158px; } &.s160 { font-size: 96px; line-height: 158px; }
} }

View File

@ -1,5 +1,5 @@
.badge { .badge {
font-weight: normal; font-weight: $gl-font-weight-normal;
background-color: $badge-bg; background-color: $badge-bg;
color: $badge-color; color: $badge-color;
vertical-align: baseline; vertical-align: baseline;

View File

@ -8,7 +8,7 @@
text-align: center; text-align: center;
padding: 20px; padding: 20px;
color: $gl-text-color; color: $gl-text-color;
font-weight: normal; font-weight: $gl-font-weight-normal;
font-size: 14px; font-size: 14px;
line-height: 36px; line-height: 36px;
@ -213,7 +213,7 @@
h1 { h1 {
display: inline; display: inline;
font-weight: normal; font-weight: $gl-font-weight-normal;
font-size: 24px; font-size: 24px;
color: $gl-text-color; color: $gl-text-color;
} }

View File

@ -1,7 +1,7 @@
@mixin btn-default { @mixin btn-default {
border-radius: 3px; border-radius: 3px;
font-size: $gl-font-size; font-size: $gl-font-size;
font-weight: 400; font-weight: $gl-font-weight-normal;
padding: $gl-vert-padding $gl-btn-padding; padding: $gl-vert-padding $gl-btn-padding;
&:focus, &:focus,

View File

@ -52,13 +52,13 @@
.pika-label { .pika-label {
color: $gl-text-color-secondary; color: $gl-text-color-secondary;
font-size: 14px; font-size: 14px;
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
th { th {
padding: 2px 0; padding: 2px 0;
color: $note-disabled-comment-color; color: $note-disabled-comment-color;
font-weight: normal; font-weight: $gl-font-weight-normal;
text-transform: lowercase; text-transform: lowercase;
border-top: 1px solid $calendar-border-color; border-top: 1px solid $calendar-border-color;
} }
@ -88,7 +88,7 @@
.is-today { .is-today {
.pika-day { .pika-day {
color: inherit; color: inherit;
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
} }

View File

@ -36,12 +36,12 @@
color: $common-gray; color: $common-gray;
font-size: 14px; font-size: 14px;
margin-bottom: 12px; margin-bottom: 12px;
font-weight: normal; font-weight: $gl-font-weight-normal;
line-height: 24px; line-height: 24px;
} }
.bold { .bold {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
.tab-content { .tab-content {
@ -89,7 +89,7 @@ hr {
} }
} }
.item-title { font-weight: 600; } .item-title { font-weight: $gl-font-weight-bold; }
/** FLASH message **/ /** FLASH message **/
.author_link, .author_link,
@ -118,18 +118,18 @@ table a code {
span.update-author { span.update-author {
display: block; display: block;
color: $update-author-color; color: $update-author-color;
font-weight: normal; font-weight: $gl-font-weight-normal;
font-style: italic; font-style: italic;
strong { strong {
font-weight: bold; font-weight: $gl-font-weight-bold;
font-style: normal; font-style: normal;
} }
} }
.user-mention { .user-mention {
color: $user-mention-color; color: $user-mention-color;
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
.field_with_errors { .field_with_errors {
@ -222,7 +222,7 @@ li.note {
text-align: center; text-align: center;
background: $error-bg; background: $error-bg;
color: $white-light; color: $white-light;
font-weight: bold; font-weight: $gl-font-weight-bold;
a { a {
color: $white-light; color: $white-light;
@ -339,7 +339,7 @@ table {
.header-with-avatar { .header-with-avatar {
h3 { h3 {
margin: 0; margin: 0;
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
.username { .username {

View File

@ -195,7 +195,7 @@
margin-top: 2px; margin-top: 2px;
margin-bottom: 0; margin-bottom: 0;
font-size: 14px; font-size: 14px;
font-weight: normal; font-weight: $gl-font-weight-normal;
padding: 8px 0; padding: 8px 0;
background-color: $white-light; background-color: $white-light;
border: 1px solid $dropdown-border-color; border: 1px solid $dropdown-border-color;
@ -268,7 +268,7 @@
} }
.dropdown-bold-header { .dropdown-bold-header {
font-weight: 600; font-weight: $gl-font-weight-bold;
line-height: 22px; line-height: 22px;
padding: 0 16px; padding: 0 16px;
} }
@ -436,7 +436,7 @@
.dropdown-menu-user-full-name { .dropdown-menu-user-full-name {
display: block; display: block;
font-weight: 500; font-weight: $gl-font-weight-normal;
line-height: 16px; line-height: 16px;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
@ -472,7 +472,7 @@
&.is-indeterminate, &.is-indeterminate,
&.is-active { &.is-active {
font-weight: 600; font-weight: $gl-font-weight-bold;
color: $gl-text-color; color: $gl-text-color;
&::before { &::before {
@ -506,7 +506,7 @@
position: relative; position: relative;
padding: 2px 25px 10px; padding: 2px 25px 10px;
margin: 0 10px 10px; margin: 0 10px 10px;
font-weight: 600; font-weight: $gl-font-weight-bold;
line-height: 1; line-height: 1;
text-align: center; text-align: center;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -689,7 +689,7 @@
.dropdown-menu-inner-title { .dropdown-menu-inner-title {
display: block; display: block;
color: $gl-text-color; color: $gl-text-color;
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
.dropdown-menu-inner-content { .dropdown-menu-inner-content {

View File

@ -225,6 +225,18 @@
color: $common-gray-dark; color: $common-gray-dark;
} }
gl-emoji {
display: inline-block;
font-family: inherit;
font-size: inherit;
vertical-align: inherit;
img {
height: 18px;
width: 18px;
}
}
.form-control { .form-control {
position: relative; position: relative;
min-width: 200px; min-width: 200px;
@ -277,7 +289,7 @@
} }
.filtered-search-input-dropdown-menu { .filtered-search-input-dropdown-menu {
max-height: 225px; max-height: 260px;
max-width: 280px; max-width: 280px;
overflow: auto; overflow: auto;
@ -371,7 +383,7 @@
} }
> .value { > .value {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
@ -452,7 +464,7 @@
.dropdown-light-content { .dropdown-light-content {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: $gl-font-weight-normal;
} }
.dropdown-user { .dropdown-user {

View File

@ -25,7 +25,7 @@
a.flash-action { a.flash-action {
margin-left: 5px; margin-left: 5px;
text-decoration: none; text-decoration: none;
font-weight: normal; font-weight: $gl-font-weight-normal;
border-bottom: 1px solid; border-bottom: 1px solid;
&:hover { &:hover {

View File

@ -32,7 +32,7 @@ label {
} }
&.label-light { &.label-light {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
@ -73,7 +73,7 @@ label {
margin-right: 0; margin-right: 0;
.control-label { .control-label {
font-weight: bold; font-weight: $gl-font-weight-bold;
padding-top: 4px; padding-top: 4px;
} }
@ -157,7 +157,7 @@ label {
.form-group .control-label, .form-group .control-label,
.form-group .control-label-full-width { .form-group .control-label-full-width {
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
.form-control::-webkit-input-placeholder { .form-control::-webkit-input-placeholder {

View File

@ -160,7 +160,7 @@ header {
li { li {
&.active a { &.active a {
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
} }
} }
@ -250,7 +250,7 @@ header {
font-size: 18px; font-size: 18px;
line-height: 22px; line-height: 22px;
display: inline-block; display: inline-block;
font-weight: normal; font-weight: $gl-font-weight-normal;
color: $gl-text-color; color: $gl-text-color;
vertical-align: top; vertical-align: top;
white-space: nowrap; white-space: nowrap;
@ -326,7 +326,7 @@ header {
.badge { .badge {
position: inherit; position: inherit;
top: -8px; top: -8px;
font-weight: normal; font-weight: $gl-font-weight-normal;
margin-left: -11px; margin-left: -11px;
font-size: 11px; font-size: 11px;
color: $white-light; color: $white-light;

View File

@ -113,7 +113,7 @@ ul.content-list {
} }
.title { .title {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
a { a {
@ -212,7 +212,7 @@ ul.content-list {
} }
.row-title { .row-title {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
.row-second-line { .row-second-line {

View File

@ -43,7 +43,7 @@
background: $gray-light; background: $gray-light;
a { a {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }

View File

@ -8,7 +8,7 @@
} }
.text-danger { .text-danger {
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
} }
@ -16,6 +16,14 @@ body.modal-open {
overflow: hidden; overflow: hidden;
} }
.modal-no-backdrop {
@extend .modal-dialog;
.modal-content {
box-shadow: none;
}
}
@media (min-width: $screen-md-min) { @media (min-width: $screen-md-min) {
.modal-dialog { .modal-dialog {
width: 860px; width: 860px;

View File

@ -70,7 +70,7 @@
&.active a { &.active a {
border-bottom: 2px solid $link-underline-blue; border-bottom: 2px solid $link-underline-blue;
color: $black; color: $black;
font-weight: 600; font-weight: $gl-font-weight-bold;
.badge { .badge {
color: $black; color: $black;
@ -352,7 +352,7 @@
z-index: 300; z-index: 300;
li.active { li.active {
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
} }
} }

View File

@ -43,7 +43,7 @@
.commit-committer-link, .commit-committer-link,
.commit-author-link { .commit-author-link {
color: $gl-text-color; color: $gl-text-color;
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
.commit-info { .commit-info {

View File

@ -76,7 +76,7 @@
} }
.select2-results li.select2-result-with-children > .select2-result-label { .select2-results li.select2-result-with-children > .select2-result-label {
font-weight: 600; font-weight: $gl-font-weight-bold;
color: $gl-text-color; color: $gl-text-color;
} }
@ -227,7 +227,7 @@
} }
.group-name { .group-name {
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
.group-path { .group-path {
@ -252,12 +252,12 @@
.namespace-result { .namespace-result {
.namespace-kind { .namespace-kind {
color: $namespace-kind-color; color: $namespace-kind-color;
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
.namespace-path { .namespace-path {
margin-left: 10px; margin-left: 10px;
font-weight: bolder; font-weight: $gl-font-weight-bold;
} }
} }
@ -266,7 +266,9 @@
} }
// TODO: change global style // TODO: change global style
.ajax-project-dropdown { .ajax-project-dropdown,
body[data-page="projects:blob:new"] #select2-drop,
body[data-page="projects:blob:edit"] #select2-drop {
&.select2-drop { &.select2-drop {
color: $gl-text-color; color: $gl-text-color;
} }
@ -283,7 +285,7 @@
padding: 0 1px; padding: 0 1px;
.select2-match { .select2-match {
font-weight: bold; font-weight: $gl-font-weight-bold;
text-decoration: none; text-decoration: none;
} }

View File

@ -30,7 +30,7 @@
.snippet-title { .snippet-title {
font-size: 24px; font-size: 24px;
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
.snippet-edited-ago { .snippet-edited-ago {

View File

@ -32,7 +32,7 @@ table {
th { th {
background-color: $gray-light; background-color: $gray-light;
font-weight: normal; font-weight: $gl-font-weight-normal;
border-bottom: none; border-bottom: none;
&.wide { &.wide {

View File

@ -103,7 +103,7 @@ summary {
padding: 4px 5px; padding: 4px 5px;
font-size: 12px; font-size: 12px;
font-style: normal; font-style: normal;
font-weight: normal; font-weight: $gl-font-weight-normal;
display: inline-block; display: inline-block;
&.label-gray { &.label-gray {
@ -165,7 +165,7 @@ summary {
.panel-heading { .panel-heading {
padding: 6px 15px; padding: 6px 15px;
font-size: 13px; font-size: 13px;
font-weight: normal; font-weight: $gl-font-weight-normal;
a { a {
color: $panel-heading-link-color; color: $panel-heading-link-color;

View File

@ -74,7 +74,7 @@
h1 { h1 {
font-size: 1.75em; font-size: 1.75em;
font-weight: 600; font-weight: $gl-font-weight-bold;
margin: 24px 0 16px; margin: 24px 0 16px;
padding-bottom: 0.3em; padding-bottom: 0.3em;
border-bottom: 1px solid $white-dark; border-bottom: 1px solid $white-dark;
@ -87,7 +87,7 @@
h2 { h2 {
font-size: 1.5em; font-size: 1.5em;
font-weight: 600; font-weight: $gl-font-weight-bold;
margin: 24px 0 16px; margin: 24px 0 16px;
padding-bottom: 0.3em; padding-bottom: 0.3em;
border-bottom: 1px solid $white-dark; border-bottom: 1px solid $white-dark;
@ -280,7 +280,7 @@ body {
margin-top: $gl-padding; margin-top: $gl-padding;
line-height: 1.3; line-height: 1.3;
font-size: 1.25em; font-size: 1.25em;
font-weight: 600; font-weight: $gl-font-weight-bold;
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
@ -291,7 +291,7 @@ body {
margin-top: 0; margin-top: 0;
line-height: 1.3; line-height: 1.3;
font-size: 1.25em; font-size: 1.25em;
font-weight: 600; font-weight: $gl-font-weight-bold;
margin: 12px 7px; margin: 12px 7px;
} }
@ -302,11 +302,11 @@ h4,
h5, h5,
h6 { h6 {
color: $gl-text-color; color: $gl-text-color;
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
.light-header { .light-header {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
/** CODE **/ /** CODE **/

View File

@ -111,6 +111,8 @@ $well-light-text-color: #5b6169;
* Text * Text
*/ */
$gl-font-size: 14px; $gl-font-size: 14px;
$gl-font-weight-normal: 400;
$gl-font-weight-bold: 600;
$gl-text-color: #2e2e2e; $gl-text-color: #2e2e2e;
$gl-text-color-secondary: #707070; $gl-text-color-secondary: #707070;
$gl-text-color-tertiary: #949494; $gl-text-color-tertiary: #949494;
@ -118,6 +120,7 @@ $gl-text-color-quaternary: #d6d6d6;
$gl-text-color-inverted: rgba(255, 255, 255, 1.0); $gl-text-color-inverted: rgba(255, 255, 255, 1.0);
$gl-text-color-secondary-inverted: rgba(255, 255, 255, .85); $gl-text-color-secondary-inverted: rgba(255, 255, 255, .85);
$gl-text-green: $green-600; $gl-text-green: $green-600;
$gl-text-green-hover: $green-700;
$gl-text-red: $red-500; $gl-text-red: $red-500;
$gl-text-orange: $orange-600; $gl-text-orange: $orange-600;
$gl-link-color: $blue-600; $gl-link-color: $blue-600;

View File

@ -69,7 +69,7 @@
.well-centered { .well-centered {
h1 { h1 {
font-weight: normal; font-weight: $gl-font-weight-normal;
text-align: center; text-align: center;
font-size: 48px; font-size: 48px;
} }

View File

@ -204,11 +204,11 @@ $dark-il: #de935f;
.cs { color: $dark-cs; } /* Comment.Special */ .cs { color: $dark-cs; } /* Comment.Special */
.gd { color: $dark-gd; } /* Generic.Deleted */ .gd { color: $dark-gd; } /* Generic.Deleted */
.ge { font-style: italic; } /* Generic.Emph */ .ge { font-style: italic; } /* Generic.Emph */
.gh { color: $dark-gh; font-weight: bold; } /* Generic.Heading */ .gh { color: $dark-gh; font-weight: $gl-font-weight-bold; } /* Generic.Heading */
.gi { color: $dark-gi; } /* Generic.Inserted */ .gi { color: $dark-gi; } /* Generic.Inserted */
.gp { color: $dark-gp; font-weight: bold; } /* Generic.Prompt */ .gp { color: $dark-gp; font-weight: $gl-font-weight-bold; } /* Generic.Prompt */
.gs { font-weight: bold; } /* Generic.Strong */ .gs { font-weight: $gl-font-weight-bold; } /* Generic.Strong */
.gu { color: $dark-gu; font-weight: bold; } /* Generic.Subheading */ .gu { color: $dark-gu; font-weight: $gl-font-weight-bold; } /* Generic.Subheading */
.kc { color: $dark-kc; } /* Keyword.Constant */ .kc { color: $dark-kc; } /* Keyword.Constant */
.kd { color: $dark-kd; } /* Keyword.Declaration */ .kd { color: $dark-kd; } /* Keyword.Declaration */
.kn { color: $dark-kn; } /* Keyword.Namespace */ .kn { color: $dark-kn; } /* Keyword.Namespace */

View File

@ -203,7 +203,7 @@ $monokai-gi: #a6e22e;
.c1 { color: $monokai-c1; } /* Comment.Single */ .c1 { color: $monokai-c1; } /* Comment.Single */
.cs { color: $monokai-cs; } /* Comment.Special */ .cs { color: $monokai-cs; } /* Comment.Special */
.ge { font-style: italic; } /* Generic.Emph */ .ge { font-style: italic; } /* Generic.Emph */
.gs { font-weight: bold; } /* Generic.Strong */ .gs { font-weight: $gl-font-weight-bold; } /* Generic.Strong */
.kc { color: $monokai-kc; } /* Keyword.Constant */ .kc { color: $monokai-kc; } /* Keyword.Constant */
.kd { color: $monokai-kd; } /* Keyword.Declaration */ .kd { color: $monokai-kd; } /* Keyword.Declaration */
.kn { color: $monokai-kn; } /* Keyword.Namespace */ .kn { color: $monokai-kn; } /* Keyword.Namespace */

View File

@ -231,7 +231,7 @@ $solarized-dark-il: #2aa198;
.gi { color: $solarized-dark-gi; } /* Generic.Inserted */ .gi { color: $solarized-dark-gi; } /* Generic.Inserted */
.go { color: $solarized-dark-go; } /* Generic.Output */ .go { color: $solarized-dark-go; } /* Generic.Output */
.gp { color: $solarized-dark-gp; } /* Generic.Prompt */ .gp { color: $solarized-dark-gp; } /* Generic.Prompt */
.gs { color: $solarized-dark-gs; font-weight: bold; } /* Generic.Strong */ .gs { color: $solarized-dark-gs; font-weight: $gl-font-weight-bold; } /* Generic.Strong */
.gu { color: $solarized-dark-gu; } /* Generic.Subheading */ .gu { color: $solarized-dark-gu; } /* Generic.Subheading */
.gt { color: $solarized-dark-gt; } /* Generic.Traceback */ .gt { color: $solarized-dark-gt; } /* Generic.Traceback */
.kc { color: $solarized-dark-kc; } /* Keyword.Constant */ .kc { color: $solarized-dark-kc; } /* Keyword.Constant */

View File

@ -239,7 +239,7 @@ $solarized-light-il: #2aa198;
.gi { color: $solarized-light-gi; } /* Generic.Inserted */ .gi { color: $solarized-light-gi; } /* Generic.Inserted */
.go { color: $solarized-light-go; } /* Generic.Output */ .go { color: $solarized-light-go; } /* Generic.Output */
.gp { color: $solarized-light-gp; } /* Generic.Prompt */ .gp { color: $solarized-light-gp; } /* Generic.Prompt */
.gs { color: $solarized-light-gs; font-weight: bold; } /* Generic.Strong */ .gs { color: $solarized-light-gs; font-weight: $gl-font-weight-bold; } /* Generic.Strong */
.gu { color: $solarized-light-gu; } /* Generic.Subheading */ .gu { color: $solarized-light-gu; } /* Generic.Subheading */
.gt { color: $solarized-light-gt; } /* Generic.Traceback */ .gt { color: $solarized-light-gt; } /* Generic.Traceback */
.kc { color: $solarized-light-kc; } /* Keyword.Constant */ .kc { color: $solarized-light-kc; } /* Keyword.Constant */

View File

@ -211,12 +211,12 @@ $white-gc-bg: #eaf2f5;
.hll { background-color: $white-hll-bg; } .hll { background-color: $white-hll-bg; }
.c { color: $white-c; font-style: italic; } .c { color: $white-c; font-style: italic; }
.err { color: $white-err; background-color: $white-err-bg; } .err { color: $white-err; background-color: $white-err-bg; }
.k { font-weight: bold; } .k { font-weight: $gl-font-weight-bold; }
.o { font-weight: bold; } .o { font-weight: $gl-font-weight-bold; }
.cm { color: $white-cm; font-style: italic; } .cm { color: $white-cm; font-style: italic; }
.cp { color: $white-cp; font-weight: bold; } .cp { color: $white-cp; font-weight: $gl-font-weight-bold; }
.c1 { color: $white-c1; font-style: italic; } .c1 { color: $white-c1; font-style: italic; }
.cs { color: $white-cs; font-weight: bold; font-style: italic; } .cs { color: $white-cs; font-weight: $gl-font-weight-bold; font-style: italic; }
.gd { color: $white-gd; background-color: $white-gd-bg; } .gd { color: $white-gd; background-color: $white-gd-bg; }
.gd .x { color: $white-gd-x; background-color: $white-gd-x-bg; } .gd .x { color: $white-gd-x; background-color: $white-gd-x-bg; }
.ge { font-style: italic; } .ge { font-style: italic; }
@ -226,29 +226,29 @@ $white-gc-bg: #eaf2f5;
.gi .x { color: $white-gi-x; background-color: $white-gi-x-bg; } .gi .x { color: $white-gi-x; background-color: $white-gi-x-bg; }
.go { color: $white-go; } .go { color: $white-go; }
.gp { color: $white-gp; } .gp { color: $white-gp; }
.gs { font-weight: bold; } .gs { font-weight: $gl-font-weight-bold; }
.gu { color: $white-gu; font-weight: bold; } .gu { color: $white-gu; font-weight: $gl-font-weight-bold; }
.gt { color: $white-gt; } .gt { color: $white-gt; }
.kc { font-weight: bold; } .kc { font-weight: $gl-font-weight-bold; }
.kd { font-weight: bold; } .kd { font-weight: $gl-font-weight-bold; }
.kn { font-weight: bold; } .kn { font-weight: $gl-font-weight-bold; }
.kp { font-weight: bold; } .kp { font-weight: $gl-font-weight-bold; }
.kr { font-weight: bold; } .kr { font-weight: $gl-font-weight-bold; }
.kt { color: $white-kt; font-weight: bold; } .kt { color: $white-kt; font-weight: $gl-font-weight-bold; }
.m { color: $white-m; } .m { color: $white-m; }
.s { color: $white-s; } .s { color: $white-s; }
.n { color: $white-n; } .n { color: $white-n; }
.na { color: $white-na; } .na { color: $white-na; }
.nb { color: $white-nb; } .nb { color: $white-nb; }
.nc { color: $white-nc; font-weight: bold; } .nc { color: $white-nc; font-weight: $gl-font-weight-bold; }
.no { color: $white-no; } .no { color: $white-no; }
.ni { color: $white-ni; } .ni { color: $white-ni; }
.ne { color: $white-ne; font-weight: bold; } .ne { color: $white-ne; font-weight: $gl-font-weight-bold; }
.nf { color: $white-nf; font-weight: bold; } .nf { color: $white-nf; font-weight: $gl-font-weight-bold; }
.nn { color: $white-nn; } .nn { color: $white-nn; }
.nt { color: $white-nt; } .nt { color: $white-nt; }
.nv { color: $white-nv; } .nv { color: $white-nv; }
.ow { font-weight: bold; } .ow { font-weight: $gl-font-weight-bold; }
.w { color: $white-w; } .w { color: $white-w; }
.mf { color: $white-mf; } .mf { color: $white-mf; }
.mh { color: $white-mh; } .mh { color: $white-mh; }

View File

@ -152,12 +152,12 @@ span.highlight_word {
.hll { background-color: $highlighted-hll-bg; } .hll { background-color: $highlighted-hll-bg; }
.c { color: $highlighted-c; font-style: italic; } .c { color: $highlighted-c; font-style: italic; }
.err { color: $highlighted-err; background-color: $highlighted-err-bg; } .err { color: $highlighted-err; background-color: $highlighted-err-bg; }
.k { font-weight: bold; } .k { font-weight: $gl-font-weight-bold; }
.o { font-weight: bold; } .o { font-weight: $gl-font-weight-bold; }
.cm { color: $highlighted-cm; font-style: italic; } .cm { color: $highlighted-cm; font-style: italic; }
.cp { color: $highlighted-cp; font-weight: bold; } .cp { color: $highlighted-cp; font-weight: $gl-font-weight-bold; }
.c1 { color: $highlighted-c1; font-style: italic; } .c1 { color: $highlighted-c1; font-style: italic; }
.cs { color: $highlighted-cs; font-weight: bold; font-style: italic; } .cs { color: $highlighted-cs; font-weight: $gl-font-weight-bold; font-style: italic; }
.gd { color: $highlighted-gd; background-color: $highlighted-gd-bg; } .gd { color: $highlighted-gd; background-color: $highlighted-gd-bg; }
.gd .x { color: $highlighted-gd; background-color: $highlighted-gd-x-bg; } .gd .x { color: $highlighted-gd; background-color: $highlighted-gd-x-bg; }
.ge { font-style: italic; } .ge { font-style: italic; }
@ -167,29 +167,29 @@ span.highlight_word {
.gi .x { color: $highlighted-gi; background-color: $highlighted-gi-x-bg; } .gi .x { color: $highlighted-gi; background-color: $highlighted-gi-x-bg; }
.go { color: $highlighted-go; } .go { color: $highlighted-go; }
.gp { color: $highlighted-gp; } .gp { color: $highlighted-gp; }
.gs { font-weight: bold; } .gs { font-weight: $gl-font-weight-bold; }
.gu { color: $highlighted-gu; font-weight: bold; } .gu { color: $highlighted-gu; font-weight: $gl-font-weight-bold; }
.gt { color: $highlighted-gt; } .gt { color: $highlighted-gt; }
.kc { font-weight: bold; } .kc { font-weight: $gl-font-weight-bold; }
.kd { font-weight: bold; } .kd { font-weight: $gl-font-weight-bold; }
.kn { font-weight: bold; } .kn { font-weight: $gl-font-weight-bold; }
.kp { font-weight: bold; } .kp { font-weight: $gl-font-weight-bold; }
.kr { font-weight: bold; } .kr { font-weight: $gl-font-weight-bold; }
.kt { color: $highlighted-kt; font-weight: bold; } .kt { color: $highlighted-kt; font-weight: $gl-font-weight-bold; }
.m { color: $highlighted-m; } .m { color: $highlighted-m; }
.s { color: $highlighted-s; } .s { color: $highlighted-s; }
.n { color: $highlighted-n; } .n { color: $highlighted-n; }
.na { color: $highlighted-na; } .na { color: $highlighted-na; }
.nb { color: $highlighted-nb; } .nb { color: $highlighted-nb; }
.nc { color: $highlighted-nc; font-weight: bold; } .nc { color: $highlighted-nc; font-weight: $gl-font-weight-bold; }
.no { color: $highlighted-no; } .no { color: $highlighted-no; }
.ni { color: $highlighted-ni; } .ni { color: $highlighted-ni; }
.ne { color: $highlighted-ne; font-weight: bold; } .ne { color: $highlighted-ne; font-weight: $gl-font-weight-bold; }
.nf { color: $highlighted-nf; font-weight: bold; } .nf { color: $highlighted-nf; font-weight: $gl-font-weight-bold; }
.nn { color: $highlighted-nn; } .nn { color: $highlighted-nn; }
.nt { color: $highlighted-nt; } .nt { color: $highlighted-nt; }
.nv { color: $highlighted-nv; } .nv { color: $highlighted-nv; }
.ow { font-weight: bold; } .ow { font-weight: $gl-font-weight-bold; }
.w { color: $highlighted-w; } .w { color: $highlighted-w; }
.mf { color: $highlighted-mf; } .mf { color: $highlighted-mf; }
.mh { color: $highlighted-mh; } .mh { color: $highlighted-mh; }

View File

@ -134,7 +134,7 @@ header.navbar-gitlab-new {
li { li {
.badge { .badge {
box-shadow: none; box-shadow: none;
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
} }
@ -193,7 +193,7 @@ header.navbar-gitlab-new {
&.active > a { &.active > a {
box-shadow: inset 0 -3px 0 $indigo-500; box-shadow: inset 0 -3px 0 $indigo-500;
color: $white-light; color: $white-light;
font-weight: 700; font-weight: $gl-font-weight-bold;
} }
> a { > a {
@ -371,7 +371,7 @@ header.navbar-gitlab-new {
> a { > a {
&:last-of-type:not(:first-child) { &:last-of-type:not(:first-child) {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
} }
@ -411,7 +411,7 @@ header.navbar-gitlab-new {
.breadcrumbs-sub-title { .breadcrumbs-sub-title {
margin: 2px 0; margin: 2px 0;
font-size: 16px; font-size: 16px;
font-weight: normal; font-weight: $gl-font-weight-normal;
line-height: 1; line-height: 1;
ul { ul {
@ -430,7 +430,7 @@ header.navbar-gitlab-new {
} }
&:last-child a { &:last-child a {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }

View File

@ -46,7 +46,7 @@ $new-sidebar-collapsed-width: 50px;
a { a {
border-bottom: 1px solid $border-color; border-bottom: 1px solid $border-color;
font-weight: 600; font-weight: $gl-font-weight-bold;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 10px 16px 10px 10px; padding: 10px 16px 10px 10px;
@ -70,8 +70,7 @@ $new-sidebar-collapsed-width: 50px;
background-color: $white-light; background-color: $white-light;
} }
.project-title, .sidebar-context-title {
.group-title {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
@ -109,7 +108,7 @@ $new-sidebar-collapsed-width: 50px;
} }
.badge, .badge,
.project-title { .sidebar-context-title {
display: none; display: none;
} }
@ -160,7 +159,7 @@ $new-sidebar-collapsed-width: 50px;
> a { > a {
color: $active-color; color: $active-color;
font-weight: 700; font-weight: $gl-font-weight-bold;
} }
svg { svg {
@ -308,7 +307,7 @@ $new-sidebar-collapsed-width: 50px;
.badge { .badge {
color: $active-color; color: $active-color;
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
.sidebar-sub-level-items { .sidebar-sub-level-items {
@ -474,6 +473,6 @@ $new-sidebar-collapsed-width: 50px;
border-bottom-color: $active-border; border-bottom-color: $active-border;
.badge { .badge {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }

View File

@ -471,7 +471,7 @@
padding-right: 35px; padding-right: 35px;
> strong { > strong {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
} }

View File

@ -277,7 +277,7 @@
} }
.trigger-build-variable { .trigger-build-variable {
font-weight: normal; font-weight: $gl-font-weight-normal;
color: $code-color; color: $code-color;
} }
@ -378,7 +378,7 @@
} }
&.active { &.active {
font-weight: bold; font-weight: $gl-font-weight-bold;
.fa-arrow-right { .fa-arrow-right {
display: block; display: block;

View File

@ -22,7 +22,7 @@
vertical-align: middle !important; vertical-align: middle !important;
a { a {
font-weight: normal; font-weight: $gl-font-weight-normal;
text-decoration: none; text-decoration: none;
} }
} }

View File

@ -213,7 +213,7 @@
.commit-sha { .commit-sha {
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
@ -286,6 +286,9 @@
.gpg-status-box { .gpg-status-box {
padding: 2px 10px;
margin-right: $gl-padding;
&:empty { &:empty {
display: none; display: none;
} }
@ -303,7 +306,7 @@
.gpg-popover-status { .gpg-popover-status {
display: flex; display: flex;
align-items: center; align-items: center;
font-weight: normal; font-weight: $gl-font-weight-normal;
line-height: 1.5; line-height: 1.5;
} }
@ -314,7 +317,6 @@
&.valid { &.valid {
svg { svg {
border: 1px solid $brand-success; border: 1px solid $brand-success;
fill: $brand-success; fill: $brand-success;
} }
} }
@ -322,7 +324,6 @@
&.invalid { &.invalid {
svg { svg {
border: 1px solid $common-gray-light; border: 1px solid $common-gray-light;
fill: $common-gray-light; fill: $common-gray-light;
} }
} }

View File

@ -23,7 +23,7 @@ $space-between-cards: 8px;
line-height: 1; line-height: 1;
color: $gl-text-color-secondary; color: $gl-text-color-secondary;
margin-left: 8px; margin-left: 8px;
font-weight: 500; font-weight: $gl-font-weight-normal;
a { a {
font-size: 18px; font-size: 18px;
@ -139,7 +139,7 @@ $space-between-cards: 8px;
.card-score-value { .card-score-value {
font-size: 16px; font-size: 16px;
color: $gl-text-color; color: $gl-text-color;
font-weight: 500; font-weight: $gl-font-weight-normal;
} }
.card-score-big { .card-score-big {
@ -147,7 +147,7 @@ $space-between-cards: 8px;
border-bottom: 1px solid $border-color; border-bottom: 1px solid $border-color;
font-size: 22px; font-size: 22px;
padding: 10px 0; padding: 10px 0;
font-weight: 500; font-weight: $gl-font-weight-normal;
} }
.card-buttons { .card-buttons {

View File

@ -68,7 +68,7 @@
} }
.stage-name { .stage-name {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
@ -93,7 +93,7 @@
.header { .header {
font-size: 30px; font-size: 30px;
line-height: 38px; line-height: 38px;
font-weight: normal; font-weight: $gl-font-weight-normal;
margin: 0; margin: 0;
} }
@ -130,7 +130,7 @@
&.title { &.title {
line-height: 19px; line-height: 19px;
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: $gl-font-weight-bold;
color: $gl-text-color; color: $gl-text-color;
} }
@ -211,7 +211,7 @@
box-shadow: inset 2px 0 0 0 $active-item-blue; box-shadow: inset 2px 0 0 0 $active-item-blue;
.stage-name { .stage-name {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
@ -404,7 +404,7 @@
color: $gl-link-color; color: $gl-link-color;
line-height: 1.3; line-height: 1.3;
vertical-align: top; vertical-align: top;
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
.fa { .fa {

View File

@ -40,7 +40,7 @@
// "Changes suppressed. Click to show." link // "Changes suppressed. Click to show." link
.show-suppressed-diff { .show-suppressed-diff {
font-size: 110%; font-size: 110%;
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
} }
@ -104,7 +104,7 @@
a { a {
float: left; float: left;
width: 35px; width: 35px;
font-weight: normal; font-weight: $gl-font-weight-normal;
&[disabled] { &[disabled] {
cursor: default; cursor: default;
@ -395,7 +395,7 @@
background-color: transparent; background-color: transparent;
border: 0; border: 0;
color: $gl-link-color; color: $gl-link-color;
font-weight: 600; font-weight: $gl-font-weight-bold;
&:hover, &:hover,
&:focus { &:focus {

View File

@ -6,7 +6,7 @@
} }
.environments-folder-name { .environments-folder-name {
font-weight: normal; font-weight: $gl-font-weight-normal;
padding-top: 20px; padding-top: 20px;
} }
@ -246,13 +246,13 @@
} }
.text-metric-bold { .text-metric-bold {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
.label-axis-text, .label-axis-text,
.text-metric-usage { .text-metric-usage {
fill: $black; fill: $black;
font-weight: 500; font-weight: $gl-font-weight-normal;
font-size: 12px; font-size: 12px;
} }

View File

@ -57,7 +57,7 @@
.event-title { .event-title {
@include str-truncated(calc(100% - 174px)); @include str-truncated(calc(100% - 174px));
font-weight: 600; font-weight: $gl-font-weight-bold;
color: $list-text-color; color: $list-text-color;
} }

View File

@ -271,7 +271,7 @@
} }
.light { .light {
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
.no-value { .no-value {
@ -306,7 +306,7 @@
display: block; display: block;
margin-top: 4px; margin-top: 4px;
font-size: 13px; font-size: 13px;
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
.hide-expanded { .hide-expanded {
@ -690,7 +690,7 @@
.issuable-info, .issuable-info,
.task-status, .task-status,
.issuable-updated-at { .issuable-updated-at {
font-weight: normal; font-weight: $gl-font-weight-normal;
color: $gl-text-color-secondary; color: $gl-text-color-secondary;
a { a {

View File

@ -75,7 +75,7 @@ ul.related-merge-requests > li {
.merge-requests-title, .merge-requests-title,
.related-branches-title { .related-branches-title {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
.merge-request-id { .merge-request-id {
@ -244,7 +244,7 @@ ul.related-merge-requests > li {
strong { strong {
display: block; display: block;
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
} }

View File

@ -22,7 +22,7 @@
} }
h1:first-child { h1:first-child {
font-weight: normal; font-weight: $gl-font-weight-normal;
margin-bottom: 0.68em; margin-bottom: 0.68em;
margin-top: 0; margin-top: 0;
font-size: 34px; font-size: 34px;
@ -38,7 +38,7 @@
} }
a { a {
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
} }
@ -54,7 +54,7 @@
padding: 15px; padding: 15px;
.login-heading h3 { .login-heading h3 {
font-weight: 300; font-weight: $gl-font-weight-normal;
line-height: 1.5; line-height: 1.5;
margin: 0 0 10px; margin: 0 0 10px;
} }
@ -186,7 +186,7 @@
} }
label { label {
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
.submit-container { .submit-container {

View File

@ -46,7 +46,7 @@
} }
strong { strong {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
@ -96,6 +96,8 @@
} }
.member-search-form { .member-search-form {
@include new-style-dropdown;
position: relative; position: relative;
@media (min-width: $screen-sm-min) { @media (min-width: $screen-sm-min) {
@ -221,7 +223,7 @@
} }
.member { .member {
font-weight: bold; font-weight: $gl-font-weight-bold;
overflow-wrap: break-word; overflow-wrap: break-word;
word-break: break-all; word-break: break-all;
} }

View File

@ -197,7 +197,7 @@
@extend .ref-name; @extend .ref-name;
color: $gl-text-color; color: $gl-text-color;
font-weight: 600; font-weight: $gl-font-weight-bold;
overflow: hidden; overflow: hidden;
word-break: break-all; word-break: break-all;
@ -228,7 +228,7 @@
.mr-widget-body { .mr-widget-body {
h4 { h4 {
float: left; float: left;
font-weight: 600; font-weight: $gl-font-weight-bold;
font-size: 14px; font-size: 14px;
line-height: inherit; line-height: inherit;
margin-top: 0; margin-top: 0;
@ -239,7 +239,7 @@
} }
time { time {
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
} }
@ -249,7 +249,7 @@
} }
label { label {
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
.spacing { .spacing {
@ -257,12 +257,12 @@
} }
.bold { .bold {
font-weight: 600; font-weight: $gl-font-weight-bold;
color: $gl-gray-light; color: $gl-gray-light;
} }
.state-label { .state-label {
font-weight: 600; font-weight: $gl-font-weight-bold;
padding-right: 10px; padding-right: 10px;
} }
@ -336,7 +336,7 @@
.text { .text {
span { span {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
p { p {
@ -489,6 +489,8 @@
} }
.mr-source-target { .mr-source-target {
@include new-style-dropdown;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
@ -505,7 +507,7 @@
.panel-new-merge-request { .panel-new-merge-request {
.panel-heading { .panel-heading {
padding: 5px 10px; padding: 5px 10px;
font-weight: 600; font-weight: $gl-font-weight-bold;
line-height: 25px; line-height: 25px;
} }

View File

@ -7,7 +7,7 @@
padding: 10px 16px; padding: 10px 16px;
h4 { h4 {
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
.progress { .progress {
@ -81,7 +81,7 @@
} }
.remaining-days strong { .remaining-days strong {
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
.milestone-stat { .milestone-stat {

View File

@ -184,7 +184,7 @@
.close { .close {
color: $white-light; color: $white-light;
opacity: 0.85; opacity: 0.85;
font-weight: normal; font-weight: $gl-font-weight-normal;
&:hover { &:hover {
opacity: 1; opacity: 1;

View File

@ -784,17 +784,25 @@ ul.notes {
background-color: transparent; background-color: transparent;
border: none; border: none;
outline: 0; outline: 0;
transition: color $general-hover-transition-duration $general-hover-transition-curve;
&.is-disabled { &.is-disabled {
cursor: default; cursor: default;
} }
&:not(.is-disabled):hover, &:not(.is-disabled) {
&:hover,
&:focus {
color: $gl-text-green;
}
}
&.is-active { &.is-active {
color: $gl-text-green; color: $gl-text-green;
svg { &:hover,
fill: $gl-text-green; &:focus {
color: $gl-text-green-hover;
} }
} }

View File

@ -12,7 +12,7 @@
.interval-pattern-form-group { .interval-pattern-form-group {
label { label {
margin-right: 10px; margin-right: 10px;
font-weight: normal; font-weight: $gl-font-weight-normal;
&[for='custom'] { &[for='custom'] {
margin-right: 0; margin-right: 0;

View File

@ -128,7 +128,7 @@
.branch-commit { .branch-commit {
.ref-name { .ref-name {
font-weight: bold; font-weight: $gl-font-weight-bold;
max-width: 120px; max-width: 120px;
overflow: hidden; overflow: hidden;
display: inline-block; display: inline-block;
@ -272,7 +272,7 @@
.build-name { .build-name {
float: right; float: right;
font-weight: 500; font-weight: $gl-font-weight-normal;
} }
.ci-status-icon-failed svg { .ci-status-icon-failed svg {
@ -281,7 +281,7 @@
.stage { .stage {
color: $gl-text-color-secondary; color: $gl-text-color-secondary;
font-weight: 500; font-weight: $gl-font-weight-normal;
vertical-align: middle; vertical-align: middle;
} }
} }
@ -420,7 +420,7 @@
.stage-name { .stage-name {
margin: 0 0 15px 10px; margin: 0 0 15px 10px;
font-weight: bold; font-weight: $gl-font-weight-bold;
width: 176px; width: 176px;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
@ -580,7 +580,7 @@
vertical-align: bottom; vertical-align: bottom;
display: inline-block; display: inline-block;
position: relative; position: relative;
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
@mixin mini-pipeline-graph-color($color-light, $color-main, $color-dark) { @mixin mini-pipeline-graph-color($color-light, $color-main, $color-dark) {
@ -724,7 +724,7 @@ button.mini-pipeline-graph-dropdown-toggle {
.mini-pipeline-graph-dropdown-item { .mini-pipeline-graph-dropdown-item {
padding: 3px 7px 4px; padding: 3px 7px 4px;
clear: both; clear: both;
font-weight: normal; font-weight: $gl-font-weight-normal;
line-height: 1.428571429; line-height: 1.428571429;
white-space: nowrap; white-space: nowrap;
margin: 0 5px; margin: 0 5px;

View File

@ -83,7 +83,7 @@
&::after { &::after {
content: "\00B7"; // Middle Dot content: "\00B7"; // Middle Dot
padding: 0 6px; padding: 0 6px;
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
&:last-child { &:last-child {
@ -277,7 +277,7 @@ table.u2f-registrations {
.oauth-application-show { .oauth-application-show {
.scope-name { .scope-name {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
.scopes-list { .scopes-list {

View File

@ -2,7 +2,7 @@
margin: -16px; margin: -16px;
.alert-link { .alert-link {
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
} }
@ -114,7 +114,7 @@
margin-top: 10px; margin-top: 10px;
margin-bottom: 10px; margin-bottom: 10px;
font-size: 24px; font-size: 24px;
font-weight: 400; font-weight: $gl-font-weight-normal;
line-height: 1; line-height: 1;
word-wrap: break-word; word-wrap: break-word;
@ -259,7 +259,7 @@
border-width: 1px; border-width: 1px;
border-style: solid; border-style: solid;
font-size: 13px; font-size: 13px;
font-weight: 600; font-weight: $gl-font-weight-bold;
line-height: 13px; line-height: 13px;
letter-spacing: .4px; letter-spacing: .4px;
padding: 6px 14px; padding: 6px 14px;
@ -309,7 +309,7 @@
} }
.option-title { .option-title {
font-weight: normal; font-weight: $gl-font-weight-normal;
display: inline-block; display: inline-block;
color: $gl-text-color; color: $gl-text-color;
} }
@ -575,7 +575,7 @@ a.deploy-project-label {
color: $gl-text-color-tertiary; color: $gl-text-color-tertiary;
transform: translateY(-50%); transform: translateY(-50%);
font-size: 12px; font-size: 12px;
font-weight: bold; font-weight: $gl-font-weight-bold;
line-height: 20px; line-height: 20px;
// Mobile // Mobile
@ -826,7 +826,7 @@ pre.light-well {
.new-protected-tag { .new-protected-tag {
label { label {
margin-top: 6px; margin-top: 6px;
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
} }
@ -853,7 +853,7 @@ pre.light-well {
} }
&.is-active { &.is-active {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
@ -952,7 +952,7 @@ pre.light-well {
&::before { &::before {
font-family: FontAwesome; font-family: FontAwesome;
font-weight: normal; font-weight: $gl-font-weight-normal;
font-style: normal; font-style: normal;
} }
} }

View File

@ -99,6 +99,30 @@
.blob-viewer-container { .blob-viewer-container {
flex: 1; flex: 1;
overflow: auto; overflow: auto;
> div,
.file-content {
display: flex;
}
> div,
.file-content,
.blob-viewer,
.line-number,
.blob-content,
.code {
min-height: 100%;
width: 100%;
}
.line-numbers {
min-width: 44px;
}
.blob-content {
flex: 1;
overflow-x: auto;
}
} }
#tabs { #tabs {
@ -182,7 +206,6 @@
padding: 5px 10px; padding: 5px 10px;
position: relative; position: relative;
border-top: 1px solid $white-normal; border-top: 1px solid $white-normal;
margin-top: -5px;
} }
#binary-viewer { #binary-viewer {
@ -267,7 +290,7 @@
display: inline-block; display: inline-block;
font-size: 10px; font-size: 10px;
text-transform: uppercase; text-transform: uppercase;
font-weight: bold; font-weight: $gl-font-weight-bold;
color: $gray-darkest; color: $gray-darkest;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;

View File

@ -30,7 +30,7 @@
} }
h4 { h4 {
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
} }

View File

@ -94,7 +94,7 @@ input[type="checkbox"]:hover {
&::before { &::before {
font-family: FontAwesome; font-family: FontAwesome;
font-weight: normal; font-weight: $gl-font-weight-normal;
font-style: normal; font-style: normal;
} }
} }

View File

@ -29,5 +29,5 @@ table .sherlock-code {
.sherlock-line-samples-table .slow { .sherlock-line-samples-table .slow {
color: $red-500; color: $red-500;
font-weight: bold; font-weight: $gl-font-weight-bold;
} }

View File

@ -108,14 +108,14 @@
margin: 0; margin: 0;
float: none; float: none;
display: inline-block; display: inline-block;
font-weight: normal; font-weight: $gl-font-weight-normal;
padding: 0 5px; padding: 0 5px;
line-height: inherit; line-height: inherit;
font-size: 14px; font-size: 14px;
} }
.action-name { .action-name {
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
.todo-body { .todo-body {
@ -262,6 +262,10 @@
} }
a { a {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
.todos-filters {
@include new-style-dropdown;
}

View File

@ -231,7 +231,7 @@
} }
.upload-link { .upload-link {
font-weight: normal; font-weight: $gl-font-weight-normal;
color: $md-link-color; color: $md-link-color;
} }

View File

@ -1,7 +1,7 @@
.gitlab-ui-dev-kit { .gitlab-ui-dev-kit {
> h2 { > h2 {
margin: 35px 0 20px; margin: 35px 0 20px;
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
.example { .example {

View File

@ -37,7 +37,7 @@
} }
.light { .light {
font-weight: normal; font-weight: $gl-font-weight-normal;
color: $gl-text-color-secondary; color: $gl-text-color-secondary;
} }
@ -89,7 +89,7 @@
h3 { h3 {
font-size: 19px; font-size: 19px;
font-weight: normal; font-weight: $gl-font-weight-normal;
margin: $gl-padding 0; margin: $gl-padding 0;
} }
} }

View File

@ -281,7 +281,7 @@
$xterm-fg-255: #eee; $xterm-fg-255: #eee;
.term-bold { .term-bold {
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
.term-italic { .term-italic {

View File

@ -17,7 +17,7 @@
.wiki h3 { .wiki h3 {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: 600;
} }
header, header,

View File

@ -3,9 +3,9 @@ class Admin::ProjectsController < Admin::ApplicationController
before_action :group, only: [:show, :transfer] before_action :group, only: [:show, :transfer]
def index def index
finder = Admin::ProjectsFinder.new(params: params, current_user: current_user) params[:sort] ||= 'latest_activity_desc'
@projects = finder.execute @sort = params[:sort]
@sort = finder.sort @projects = Admin::ProjectsFinder.new(params: params, current_user: current_user).execute
respond_to do |format| respond_to do |format|
format.html format.html

View File

@ -1,5 +1,7 @@
class AutocompleteController < ApplicationController class AutocompleteController < ApplicationController
skip_before_action :authenticate_user!, only: [:users] AWARD_EMOJI_MAX = 100
skip_before_action :authenticate_user!, only: [:users, :award_emojis]
before_action :load_project, only: [:users] before_action :load_project, only: [:users]
before_action :find_users, only: [:users] before_action :find_users, only: [:users]
@ -48,6 +50,20 @@ class AutocompleteController < ApplicationController
render json: projects.to_json(only: [:id, :name_with_namespace], methods: :name_with_namespace) render json: projects.to_json(only: [:id, :name_with_namespace], methods: :name_with_namespace)
end end
def award_emojis
emoji_with_count = AwardEmoji
.limit(AWARD_EMOJI_MAX)
.where(user: current_user)
.group(:name)
.order(count: :desc, name: :asc)
.count
# Transform from hash to array to guarantee json order
# e.g. { 'thumbsup' => 2, 'thumbsdown' = 1 }
# => [{ name: 'thumbsup' }, { name: 'thumbsdown' }]
render json: emoji_with_count.map { |k, v| { name: k } }
end
private private
def find_users def find_users

View File

@ -15,7 +15,17 @@ module IssuableCollections
end end
def merge_requests_collection def merge_requests_collection
merge_requests_finder.execute.preload(:source_project, :target_project, :author, :assignee, :labels, :milestone, :head_pipeline, target_project: :namespace, merge_request_diff: :merge_request_diff_commits) merge_requests_finder.execute.preload(
:source_project,
:target_project,
:author,
:assignee,
:labels,
:milestone,
head_pipeline: :project,
target_project: :namespace,
merge_request_diff: :merge_request_diff_commits
)
end end
def issues_finder def issues_finder

View File

@ -35,13 +35,13 @@ class Groups::MilestonesController < Groups::ApplicationController
end end
def edit def edit
render_404 if @milestone.is_legacy_group_milestone? render_404 if @milestone.legacy_group_milestone?
end end
def update def update
# Keep this compatible with legacy group milestones where we have to update # Keep this compatible with legacy group milestones where we have to update
# all projects milestones states at once. # all projects milestones states at once.
if @milestone.is_legacy_group_milestone? if @milestone.legacy_group_milestone?
update_params = milestone_params.select { |key| key == "state_event" } update_params = milestone_params.select { |key| key == "state_event" }
milestones = @milestone.milestones milestones = @milestone.milestones
else else
@ -67,7 +67,7 @@ class Groups::MilestonesController < Groups::ApplicationController
end end
def milestone_path def milestone_path
if @milestone.is_legacy_group_milestone? if @milestone.legacy_group_milestone?
group_milestone_path(group, @milestone.safe_title, title: @milestone.title) group_milestone_path(group, @milestone.safe_title, title: @milestone.title)
else else
group_milestone_path(group, @milestone.iid) group_milestone_path(group, @milestone.iid)

View File

@ -10,6 +10,14 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
end end
end end
if Gitlab::LDAP::Config.enabled?
Gitlab::LDAP::Config.available_servers.each do |server|
define_method server['provider_name'] do
ldap
end
end
end
# Extend the standard message generation to accept our custom exception # Extend the standard message generation to accept our custom exception
def failure_message def failure_message
exception = env["omniauth.error"] exception = env["omniauth.error"]

View File

@ -216,7 +216,7 @@ class Projects::IssuesController < Projects::ApplicationController
task_status: @issue.task_status task_status: @issue.task_status
} }
if @issue.is_edited? if @issue.edited?
response[:updated_at] = @issue.updated_at response[:updated_at] = @issue.updated_at
response[:updated_by_name] = @issue.last_edited_by.name response[:updated_by_name] = @issue.last_edited_by.name
response[:updated_by_path] = user_path(@issue.last_edited_by) response[:updated_by_path] = user_path(@issue.last_edited_by)

View File

@ -318,14 +318,14 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
elsif @merge_request.head_pipeline.success? elsif @merge_request.head_pipeline.success?
# This can be triggered when a user clicks the auto merge button while # This can be triggered when a user clicks the auto merge button while
# the tests finish at about the same time # the tests finish at about the same time
MergeWorker.perform_async(@merge_request.id, current_user.id, params) @merge_request.merge_async(current_user.id, params)
:success :success
else else
:failed :failed
end end
else else
MergeWorker.perform_async(@merge_request.id, current_user.id, params) @merge_request.merge_async(current_user.id, params)
:success :success
end end

View File

@ -5,14 +5,6 @@ class SessionsController < Devise::SessionsController
skip_before_action :check_two_factor_requirement, only: [:destroy] skip_before_action :check_two_factor_requirement, only: [:destroy]
# Explicitly call protect from forgery before anything else. Otherwise the
# CSFR-token might be cleared before authentication is done. This was the case
# when LDAP was enabled and the `OmniauthCallbacksController` is loaded
#
# *Note:* `prepend: true` is the default for rails4, but this will be changed
# to `prepend: false` in rails5.
protect_from_forgery prepend: true, with: :exception
prepend_before_action :check_initial_setup, only: [:new] prepend_before_action :check_initial_setup, only: [:new]
prepend_before_action :authenticate_with_two_factor, prepend_before_action :authenticate_with_two_factor,
if: :two_factor_enabled?, only: [:create] if: :two_factor_enabled?, only: [:create]

Some files were not shown because too many files have changed in this diff Show More