summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-11 00:13:54 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-11 00:13:54 +0000
commit2d9c62ffb595d2bf555046d09098a0d4af71e17f (patch)
treec837cf91cf3e50f443d1dcb852b82448637a5c8b /app/assets
parentd9710d79c52bc73438022e79c79cfe3ab35b084b (diff)
downloadgitlab-ce-2d9c62ffb595d2bf555046d09098a0d4af71e17f.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/content_editor/components/bubble_menus/code_block_bubble_menu.vue2
-rw-r--r--app/assets/javascripts/content_editor/components/toolbar_button.vue2
-rw-r--r--app/assets/javascripts/editor/schema/ci.json36
-rw-r--r--app/assets/javascripts/environments/environment_details/deployments_table.vue8
-rw-r--r--app/assets/javascripts/pages/projects/shared/web_ide_link/index.js9
-rw-r--r--app/assets/javascripts/super_sidebar/components/nav_item.vue7
-rw-r--r--app/assets/javascripts/vue_shared/components/web_ide_link.vue127
7 files changed, 85 insertions, 106 deletions
diff --git a/app/assets/javascripts/content_editor/components/bubble_menus/code_block_bubble_menu.vue b/app/assets/javascripts/content_editor/components/bubble_menus/code_block_bubble_menu.vue
index 98b7203778f..caac61fe9a6 100644
--- a/app/assets/javascripts/content_editor/components/bubble_menus/code_block_bubble_menu.vue
+++ b/app/assets/javascripts/content_editor/components/bubble_menus/code_block_bubble_menu.vue
@@ -250,7 +250,7 @@ export default {
variant="default"
category="tertiary"
size="medium"
- :class="{ active: showPreview }"
+ :class="{ 'gl-bg-gray-100!': showPreview }"
data-testid="preview-diagram"
:aria-label="__('Preview diagram')"
:title="__('Preview diagram')"
diff --git a/app/assets/javascripts/content_editor/components/toolbar_button.vue b/app/assets/javascripts/content_editor/components/toolbar_button.vue
index 1f3c7062b67..a62f66d8557 100644
--- a/app/assets/javascripts/content_editor/components/toolbar_button.vue
+++ b/app/assets/javascripts/content_editor/components/toolbar_button.vue
@@ -78,7 +78,7 @@ export default {
:variant="variant"
:category="category"
:size="size"
- :class="{ active: isActive }"
+ :class="{ 'gl-bg-gray-100!': isActive }"
:aria-label="label"
:title="label"
:icon="iconName"
diff --git a/app/assets/javascripts/editor/schema/ci.json b/app/assets/javascripts/editor/schema/ci.json
index 70f1dddcac9..1fb6f606b6b 100644
--- a/app/assets/javascripts/editor/schema/ci.json
+++ b/app/assets/javascripts/editor/schema/ci.json
@@ -774,6 +774,9 @@
},
"allow_failure": {
"$ref": "#/definitions/allow_failure"
+ },
+ "needs": {
+ "$ref": "#/definitions/rulesNeeds"
}
}
},
@@ -936,6 +939,39 @@
"markdownDescription": "Used in conjunction with 'when: delayed' to set how long to delay before starting a job. e.g. '5', 5 seconds, 30 minutes, 1 week, etc. [Learn More](https://docs.gitlab.com/ee/ci/jobs/job_control.html#run-a-job-after-a-delay).",
"minLength": 1
},
+ "rulesNeeds": {
+ "markdownDescription": "Use needs in rules to update job needs for specific conditions. When a condition matches a rule, the job's needs configuration is completely replaced with the needs in the rule. [Learn More](https://docs.gitlab.com/ee/ci/yaml/index.html#rulesneeds).",
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "job": {
+ "type": "string",
+ "minLength": 1,
+ "description": "Name of a job that is defined in the pipeline."
+ },
+ "artifacts": {
+ "type": "boolean",
+ "description": "Download artifacts of the job in needs."
+ },
+ "optional": {
+ "type": "boolean",
+ "description": "Whether the job needs to be present in the pipeline to run ahead of the current job."
+ }
+ },
+ "required": [
+ "job"
+ ]
+ }
+ ]
+ }
+ },
"allow_failure": {
"markdownDescription": "Allow job to fail. A failed job does not cause the pipeline to fail. [Learn More](https://docs.gitlab.com/ee/ci/yaml/#allow_failure).",
"oneOf": [
diff --git a/app/assets/javascripts/environments/environment_details/deployments_table.vue b/app/assets/javascripts/environments/environment_details/deployments_table.vue
index 128b1aae4d8..f37f93798ae 100644
--- a/app/assets/javascripts/environments/environment_details/deployments_table.vue
+++ b/app/assets/javascripts/environments/environment_details/deployments_table.vue
@@ -48,10 +48,14 @@ export default {
<deployment-job :job="item.job" />
</template>
<template #cell(created)="{ item }">
- <time-ago-tooltip :time="item.created" />
+ <time-ago-tooltip :time="item.created" data-testid="deployment-created-at" />
</template>
<template #cell(deployed)="{ item }">
- <time-ago-tooltip :time="item.deployed" />
+ <time-ago-tooltip
+ v-if="item.deployed"
+ :time="item.deployed"
+ data-testid="deployment-deployed-at"
+ />
</template>
<template #cell(actions)="{ item }">
<deployment-actions
diff --git a/app/assets/javascripts/pages/projects/shared/web_ide_link/index.js b/app/assets/javascripts/pages/projects/shared/web_ide_link/index.js
index 84ff802c268..43ff617dabe 100644
--- a/app/assets/javascripts/pages/projects/shared/web_ide_link/index.js
+++ b/app/assets/javascripts/pages/projects/shared/web_ide_link/index.js
@@ -1,15 +1,7 @@
import Vue from 'vue';
-import VueApollo from 'vue-apollo';
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
import { joinPaths, webIDEUrl } from '~/lib/utils/url_utility';
import WebIdeButton from '~/vue_shared/components/web_ide_link.vue';
-import createDefaultClient from '~/lib/graphql';
-
-Vue.use(VueApollo);
-
-const apolloProvider = new VueApollo({
- defaultClient: createDefaultClient(),
-});
export default ({ el, router }) => {
if (!el) return;
@@ -23,7 +15,6 @@ export default ({ el, router }) => {
new Vue({
el,
router,
- apolloProvider,
render(h) {
return h(WebIdeButton, {
props: {
diff --git a/app/assets/javascripts/super_sidebar/components/nav_item.vue b/app/assets/javascripts/super_sidebar/components/nav_item.vue
index 11499784103..ec1c4069b1a 100644
--- a/app/assets/javascripts/super_sidebar/components/nav_item.vue
+++ b/app/assets/javascripts/super_sidebar/components/nav_item.vue
@@ -1,5 +1,5 @@
<script>
-import { GlButton, GlIcon, GlBadge } from '@gitlab/ui';
+import { GlButton, GlIcon, GlBadge, GlTooltipDirective } from '@gitlab/ui';
import { s__ } from '~/locale';
import {
CLICK_MENU_ITEM_ACTION,
@@ -23,6 +23,9 @@ export default {
NavItemLink,
NavItemRouterLink,
},
+ directives: {
+ GlTooltip: GlTooltipDirective,
+ },
inject: {
pinnedItemIds: { default: { ids: [] } },
panelSupportsPins: { default: false },
@@ -153,6 +156,7 @@ export default {
</gl-badge>
<gl-button
v-if="isPinnable && !isPinned"
+ v-gl-tooltip.right.viewport="$options.i18n.pinItem"
size="small"
category="tertiary"
icon="thumbtack"
@@ -161,6 +165,7 @@ export default {
/>
<gl-button
v-else-if="isPinnable && isPinned"
+ v-gl-tooltip.right.viewport="$options.i18n.unpinItem"
size="small"
category="tertiary"
:aria-label="$options.i18n.unpinItem"
diff --git a/app/assets/javascripts/vue_shared/components/web_ide_link.vue b/app/assets/javascripts/vue_shared/components/web_ide_link.vue
index 28bec63b244..3c08142e2b9 100644
--- a/app/assets/javascripts/vue_shared/components/web_ide_link.vue
+++ b/app/assets/javascripts/vue_shared/components/web_ide_link.vue
@@ -1,8 +1,7 @@
<script>
-import { GlModal, GlSprintf, GlLink, GlPopover } from '@gitlab/ui';
+import { GlModal, GlSprintf, GlLink } from '@gitlab/ui';
import { s__, __ } from '~/locale';
import { visitUrl } from '~/lib/utils/url_utility';
-import UserCalloutDismisser from '~/vue_shared/components/user_callout_dismisser.vue';
import ActionsButton from '~/vue_shared/components/actions_button.vue';
import LocalStorageSync from '~/vue_shared/components/local_storage_sync.vue';
import ConfirmForkModal from '~/vue_shared/components/confirm_fork_modal.vue';
@@ -34,9 +33,7 @@ export default {
GlModal,
GlSprintf,
GlLink,
- GlPopover,
ConfirmForkModal,
- UserCalloutDismisser,
},
i18n,
mixins: [glFeatureFlagsMixin()],
@@ -312,9 +309,6 @@ export default {
},
};
},
- displayVscodeWebIdeCallout() {
- return this.glFeatures.vscodeWebIde && !this.showEditButton;
- },
},
mounted() {
this.resetPreferredEditor();
@@ -340,11 +334,6 @@ export default {
this.select(KEY_WEB_IDE);
},
- dismissCalloutOnActionClicked(dismiss) {
- if (this.displayVscodeWebIdeCallout) {
- dismiss();
- }
- },
},
webIdeButtonId: 'web-ide-link',
PREFERRED_EDITOR_KEY,
@@ -352,84 +341,38 @@ export default {
</script>
<template>
- <user-callout-dismisser
- :skip-query="!displayVscodeWebIdeCallout"
- feature-name="vscode_web_ide_callout"
- >
- <template #default="{ dismiss, shouldShowCallout }">
- <div class="gl-sm-ml-3">
- <actions-button
- :id="$options.webIdeButtonId"
- :actions="actions"
- :selected-key="selection"
- :variant="isBlob ? 'confirm' : 'default'"
- :category="isBlob ? 'primary' : 'secondary'"
- :show-action-tooltip="!displayVscodeWebIdeCallout || !shouldShowCallout"
- @select="select"
- @actionClicked="dismissCalloutOnActionClicked(dismiss)"
- />
- <local-storage-sync
- :storage-key="$options.PREFERRED_EDITOR_KEY"
- :value="selection"
- as-string
- @input="select"
- />
- <gl-modal
- v-if="computedShowGitpodButton && !gitpodEnabled"
- v-model="showEnableGitpodModal"
- v-bind="enableGitpodModalProps"
- >
- <gl-sprintf :message="$options.i18n.modal.content">
- <template #link="{ content }">
- <gl-link :href="userPreferencesGitpodPath">{{ content }}</gl-link>
- </template>
- </gl-sprintf>
- </gl-modal>
- <confirm-fork-modal
- v-if="showWebIdeButton || showEditButton"
- v-model="showForkModal"
- :modal-id="forkModalId"
- :fork-path="forkPath"
- />
- <gl-popover
- v-if="displayVscodeWebIdeCallout"
- :target="$options.webIdeButtonId"
- :show="shouldShowCallout"
- :css-classes="['web-ide-promo-popover']"
- :boundary-padding="80"
- show-close-button
- triggers="manual"
- @close-button-clicked="dismiss"
- >
- <img
- :src="webIdePromoPopoverImg"
- class="web-ide-promo-popover-illustration"
- width="280"
- height="140"
- />
- <div class="gl-mx-2">
- <h5 class="gl-mt-3 gl-mb-3">{{ __('The new Web IDE') }}</h5>
- <p>
- {{
- __(
- 'VS Code in your browser. View code and make changes from the same UI as in your local IDE.',
- )
- }}
- </p>
- <gl-link
- class="gl-button btn btn-confirm block gl-mb-4 gl-mt-5"
- variant="confirm"
- category="primary"
- target="_blank"
- :href="webIdeUrl"
- block
- @click="dismissCalloutOnActionClicked(dismiss)"
- >
- {{ __('Try it out now') }}
- </gl-link>
- </div>
- </gl-popover>
- </div>
- </template>
- </user-callout-dismisser>
+ <div class="gl-sm-ml-3">
+ <actions-button
+ :id="$options.webIdeButtonId"
+ :actions="actions"
+ :selected-key="selection"
+ :variant="isBlob ? 'confirm' : 'default'"
+ :category="isBlob ? 'primary' : 'secondary'"
+ show-action-tooltip
+ @select="select"
+ />
+ <local-storage-sync
+ :storage-key="$options.PREFERRED_EDITOR_KEY"
+ :value="selection"
+ as-string
+ @input="select"
+ />
+ <gl-modal
+ v-if="computedShowGitpodButton && !gitpodEnabled"
+ v-model="showEnableGitpodModal"
+ v-bind="enableGitpodModalProps"
+ >
+ <gl-sprintf :message="$options.i18n.modal.content">
+ <template #link="{ content }">
+ <gl-link :href="userPreferencesGitpodPath">{{ content }}</gl-link>
+ </template>
+ </gl-sprintf>
+ </gl-modal>
+ <confirm-fork-modal
+ v-if="showWebIdeButton || showEditButton"
+ v-model="showForkModal"
+ :modal-id="forkModalId"
+ :fork-path="forkPath"
+ />
+ </div>
</template>