Skip to content
Snippets Groups Projects
Commit dd4bee69 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent ce8a0b90
No related branches found
No related tags found
No related merge requests found
Showing
with 111 additions and 28 deletions
Loading
Loading
@@ -10,17 +10,24 @@
*.md @gl-docsteam
 
# Frontend maintainers should see everything in `app/assets/`
app/assets/ @gitlab-org/maintainers/frontend
*.scss @annabeldunstone @gitlab-org/maintainers/frontend
/scripts/frontend/ @gitlab-org/maintainers/frontend
*.js @gitlab-org/maintainers/frontend
/app/assets/ @gitlab-org/maintainers/frontend
/ee/app/assets/ @gitlab-org/maintainers/frontend
/spec/javascripts/ @gitlab-org/maintainers/frontend
/ee/spec/javascripts/ @gitlab-org/maintainers/frontend
/spec/frontend/ @gitlab-org/maintainers/frontend
/ee/spec/frontend/ @gitlab-org/maintainers/frontend
 
# Database maintainers should review changes in `db/`
db/ @gitlab-org/maintainers/database
lib/gitlab/background_migration/ @gitlab-org/maintainers/database
lib/gitlab/database/ @gitlab-org/maintainers/database
lib/gitlab/sql/ @gitlab-org/maintainers/database
lib/gitlab/github_import/ @gitlab-org/maintainers/database
/db/ @gitlab-org/maintainers/database
/ee/db/ @gitlab-org/maintainers/database
/lib/gitlab/background_migration/ @gitlab-org/maintainers/database
/ee/lib/ee/gitlab/background_migration/ @gitlab-org/maintainers/database
/lib/gitlab/database/ @gitlab-org/maintainers/database
/ee/lib/gitlab/database/ @gitlab-org/maintainers/database
/lib/gitlab/sql/ @gitlab-org/maintainers/database
/lib/gitlab/github_import/ @gitlab-org/maintainers/database
/app/finders/ @gitlab-org/maintainers/database
/ee/app/finders/ @gitlab-org/maintainers/database
 
Loading
Loading
@@ -40,14 +47,14 @@ lib/gitlab/github_import/ @gitlab-org/maintainers/database
# Engineering Productivity owned files
/.gitlab-ci.yml @gl-quality/eng-prod
/.gitlab/ci/ @gl-quality/eng-prod
/.gitlab/ci/docs.gitlab-ci.yml @gl-quality/eng-prod @gl-docsteam
/.gitlab/ci/releases.gitlab-ci.yml @gl-quality/eng-prod @gitlab-org/delivery
/.gitlab/CODEOWNERS @gl-quality/eng-prod
Dangerfile @gl-quality/eng-prod
/danger/ @gl-quality/eng-prod
/lib/gitlab/danger/ @gl-quality/eng-prod
/scripts/ @gl-quality/eng-prod
# Delivery owner files
/.gitlab/ci/releases.gitlab-ci.yml @gitlab-org/delivery
/scripts/frontend/ @gl-quality/eng-prod @gitlab-org/maintainers/frontend
 
# Telemetry owner files
/ee/lib/gitlab/usage_data_counters/ @gitlab-org/growth/telemetry
Loading
Loading
Loading
Loading
@@ -4,6 +4,9 @@ import Cookies from 'js-cookie';
import { parseBoolean, scrollToElement } from '~/lib/utils/common_utils';
import { s__ } from '~/locale';
import { glEmojiTag } from '~/emoji';
import Tracking from '~/tracking';
const trackingMixin = Tracking.mixin();
 
const popoverStates = {
suggest_gitlab_ci_yml: {
Loading
Loading
@@ -27,6 +30,7 @@ export default {
GlIcon,
GlButton,
},
mixins: [trackingMixin],
props: {
target: {
type: String,
Loading
Loading
@@ -40,10 +44,18 @@ export default {
type: String,
required: true,
},
humanAccess: {
type: String,
required: true,
},
},
data() {
return {
popoverDismissed: parseBoolean(Cookies.get(this.dismissKey)),
tracking: {
label: this.trackLabel,
property: this.humanAccess,
},
};
},
computed: {
Loading
Loading
@@ -60,12 +72,17 @@ export default {
mounted() {
if (this.trackLabel === 'suggest_commit_first_project_gitlab_ci_yml' && !this.popoverDismissed)
scrollToElement(document.querySelector(this.target));
this.trackOnShow();
},
methods: {
onDismiss() {
this.popoverDismissed = true;
Cookies.set(this.dismissKey, this.popoverDismissed, { expires: 365 });
},
trackOnShow() {
if (!this.popoverDismissed) this.track();
},
},
};
</script>
Loading
Loading
Loading
Loading
@@ -10,6 +10,7 @@ export default el =>
target: el.dataset.target,
trackLabel: el.dataset.trackLabel,
dismissKey: el.dataset.dismissKey,
humanAccess: el.dataset.humanAccess,
},
});
},
Loading
Loading
Loading
Loading
@@ -21,7 +21,7 @@ export default {
};
},
computed: {
...mapState(['entries', 'promotionSvgPath', 'links']),
...mapState(['entries', 'promotionSvgPath', 'links', 'codesandboxBundlerUrl']),
...mapGetters(['packageJson', 'currentProject']),
normalizedEntries() {
return Object.keys(this.entries).reduce((acc, path) => {
Loading
Loading
@@ -106,12 +106,7 @@ export default {
return this.loadFileContent(this.mainEntry)
.then(() => this.$nextTick())
.then(() => {
this.initManager('#ide-preview', this.sandboxOpts, {
fileResolver: {
isFile: p => Promise.resolve(Boolean(this.entries[createPathWithExt(p)])),
readFile: p => this.loadFileContent(createPathWithExt(p)).then(content => content),
},
});
this.initManager();
 
this.listener = listen(e => {
switch (e.type) {
Loading
Loading
@@ -139,8 +134,18 @@ export default {
this.manager.updatePreview(this.sandboxOpts);
}, 250);
},
initManager(el, opts, resolver) {
this.manager = new Manager(el, opts, resolver);
initManager() {
const { codesandboxBundlerUrl: bundlerURL } = this;
const settings = {
fileResolver: {
isFile: p => Promise.resolve(Boolean(this.entries[createPathWithExt(p)])),
readFile: p => this.loadFileContent(createPathWithExt(p)).then(content => content),
},
...(bundlerURL ? { bundlerURL } : {}),
};
this.manager = new Manager('#ide-preview', this.sandboxOpts, settings);
},
},
};
Loading
Loading
Loading
Loading
@@ -53,6 +53,7 @@ export function initIde(el, options = {}) {
clientsidePreviewEnabled: parseBoolean(el.dataset.clientsidePreviewEnabled),
renderWhitespaceInCode: parseBoolean(el.dataset.renderWhitespaceInCode),
editorTheme: window.gon?.user_color_scheme || DEFAULT_THEME,
codesandboxBundlerUrl: el.dataset.codesandboxBundlerUrl,
});
},
methods: {
Loading
Loading
Loading
Loading
@@ -34,4 +34,5 @@ export default () => ({
clientsidePreviewEnabled: false,
renderWhitespaceInCode: false,
editorTheme: DEFAULT_THEME,
codesandboxBundlerUrl: null,
});
<script>
import $ from 'jquery';
import _ from 'underscore';
import { intersection } from 'lodash';
 
import '~/smart_interval';
 
Loading
Loading
@@ -38,7 +38,7 @@ export default {
} else {
changedCommands = [];
}
if (changedCommands && _.intersection(subscribedCommands, changedCommands).length) {
if (changedCommands && intersection(subscribedCommands, changedCommands).length) {
this.mediator.fetch();
}
},
Loading
Loading
import $ from 'jquery';
import '~/gl_dropdown';
import _ from 'underscore';
import { escape as esc } from 'lodash';
import { __ } from '~/locale';
 
function isValidProjectId(id) {
Loading
Loading
@@ -49,7 +49,7 @@ class SidebarMoveIssue {
renderRow: project => `
<li>
<a href="#" class="js-move-issue-dropdown-item">
${_.escape(project.name_with_namespace)}
${esc(project.name_with_namespace)}
</a>
</li>
`,
Loading
Loading
# frozen_string_literal: true
module ClientsidePreviewCSP
extend ActiveSupport::Concern
included do
content_security_policy do |p|
next if p.directives.blank?
next unless Gitlab::CurrentSettings.web_ide_clientside_preview_enabled?
default_frame_src = p.directives['frame-src'] || p.directives['default-src']
frame_src_values = Array.wrap(default_frame_src) | [Gitlab::CurrentSettings.web_ide_clientside_preview_bundler_url].compact
p.frame_src(*frame_src_values)
end
end
end
Loading
Loading
@@ -3,6 +3,7 @@
class IdeController < ApplicationController
layout 'fullscreen'
 
include ClientsidePreviewCSP
include StaticObjectExternalStorageCSP
 
def index
Loading
Loading
Loading
Loading
@@ -353,4 +353,8 @@ module BlobHelper
def suggest_pipeline_commit_cookie_name
"suggest_gitlab_ci_yml_commit_#{@project.id}"
end
def human_access
@project.team.human_max_access(current_user&.id).try(:downcase)
end
end
Loading
Loading
@@ -10,8 +10,9 @@ module IdeHelper
"promotion-svg-path": image_path('illustrations/web-ide_promotion.svg'),
"ci-help-page-path" => help_page_path('ci/quick_start/README'),
"web-ide-help-page-path" => help_page_path('user/project/web_ide/index.html'),
"clientside-preview-enabled": Gitlab::CurrentSettings.current_application_settings.web_ide_clientside_preview_enabled.to_s,
"render-whitespace-in-code": current_user.render_whitespace_in_code.to_s
"clientside-preview-enabled": Gitlab::CurrentSettings.web_ide_clientside_preview_enabled?.to_s,
"render-whitespace-in-code": current_user.render_whitespace_in_code.to_s,
"codesandbox-bundler-url": Gitlab::CurrentSettings.web_ide_clientside_preview_bundler_url
}
end
end
Loading
Loading
@@ -351,6 +351,12 @@ module ApplicationSettingImplementation
static_objects_external_storage_url.present?
end
 
# This will eventually be configurable
# https://gitlab.com/gitlab-org/gitlab/issues/208161
def web_ide_clientside_preview_bundler_url
'https://sandbox-prod.gitlab-static.net'
end
private
 
def separate_whitelists(string_array)
Loading
Loading
Loading
Loading
@@ -257,7 +257,7 @@ class WikiPage
def title_changed?
if persisted?
old_title, old_dir = wiki.page_title_and_dir(self.class.unhyphenize(@page.url_path))
new_title, new_dir = wiki.page_title_and_dir(title)
new_title, new_dir = wiki.page_title_and_dir(self.class.unhyphenize(title))
 
new_title != old_title || (title.include?('/') && new_dir != old_dir)
else
Loading
Loading
Loading
Loading
@@ -23,7 +23,8 @@
.js-suggest-gitlab-ci-yml{ data: { toggle: 'popover',
target: '#gitlab-ci-yml-selector',
track_label: 'suggest_gitlab_ci_yml',
dismiss_key: "suggest_gitlab_ci_yml_#{@project.id}" } }
dismiss_key: "suggest_gitlab_ci_yml_#{@project.id}",
human_access: human_access } }
 
.file-buttons
- if is_markdown
Loading
Loading
Loading
Loading
@@ -17,4 +17,5 @@
.js-suggest-gitlab-ci-yml-commit-changes{ data: { toggle: 'popover',
target: '#commit-changes',
track_label: 'suggest_commit_first_project_gitlab_ci_yml',
dismiss_key: "suggest_commit_first_project_gitlab_ci_yml_#{@project.id}" } }
dismiss_key: "suggest_commit_first_project_gitlab_ci_yml_#{@project.id}",
human_access: human_access } }
---
title: Make hostname configurable for smartcard authentication
merge_request: 26411
author:
type: added
---
title: Fix code search pagination on a custom branch
merge_request: 25984
author:
type: fixed
---
title: Fix WikiPage#title_changed for paths with spaces
merge_request: 27087
author:
type: fixed
---
title: Update Web IDE clientside preview bundler to use GitLab managed server
merge_request: 21520
author:
type: changed
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