diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-10 00:10:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-10 00:10:17 +0300 |
commit | 413c91fda942270905873684a58041f8c65f878c (patch) | |
tree | 8053b007997cc1266b5d9c86794fd8f6beff0eae /app/assets/javascripts/vue_shared/components | |
parent | 7d112a9002182130f6a06f890bb17450b03406f9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_shared/components')
3 files changed, 21 insertions, 4 deletions
diff --git a/app/assets/javascripts/vue_shared/components/badges/beta_badge.stories.js b/app/assets/javascripts/vue_shared/components/badges/beta_badge.stories.js index 3cef1bf4ba5..805a32273f4 100644 --- a/app/assets/javascripts/vue_shared/components/badges/beta_badge.stories.js +++ b/app/assets/javascripts/vue_shared/components/badges/beta_badge.stories.js @@ -7,13 +7,18 @@ export default { const template = ` <div style="height:600px;" class="gl-display-flex gl-justify-content-center gl-align-items-center"> - <beta-badge /> + <beta-badge :size="size" /> </div> `; -const Template = () => ({ +const Template = (args, { argTypes }) => ({ components: { BetaBadge }, + data() { + return { value: args.value }; + }, + props: Object.keys(argTypes), template, }); export const Default = Template.bind({}); +Default.args = {}; diff --git a/app/assets/javascripts/vue_shared/components/badges/beta_badge.vue b/app/assets/javascripts/vue_shared/components/badges/beta_badge.vue index 198b6580277..e8d33b5538e 100644 --- a/app/assets/javascripts/vue_shared/components/badges/beta_badge.vue +++ b/app/assets/javascripts/vue_shared/components/badges/beta_badge.vue @@ -12,11 +12,18 @@ export default { "BetaBadge|A Beta feature is not production-ready, but is unlikely to change drastically before it's released. We encourage users to try Beta features and provide feedback.", ), listIntroduction: s__('BetaBadge|A Beta feature:'), - listItemStability: s__('BetaBadge|May have performance or stability issues.'), + listItemStability: s__('BetaBadge|May be unstable.'), listItemDataLoss: s__('BetaBadge|Should not cause data loss.'), listItemReasonableEffort: s__('BetaBadge|Is supported by a commercially reasonable effort.'), listItemNearCompletion: s__('BetaBadge|Is complete or near completion.'), }, + props: { + size: { + type: String, + required: false, + default: 'md', + }, + }, methods: { target() { /** @@ -35,7 +42,9 @@ export default { <template> <div> - <gl-badge ref="badge" class="gl-cursor-pointer">{{ $options.i18n.badgeLabel }}</gl-badge> + <gl-badge ref="badge" href="#" :size="size" variant="neutral" class="gl-cursor-pointer">{{ + $options.i18n.badgeLabel + }}</gl-badge> <gl-popover triggers="hover focus click" :show-close-button="true" diff --git a/app/assets/javascripts/vue_shared/components/markdown/comment_templates_dropdown.vue b/app/assets/javascripts/vue_shared/components/markdown/comment_templates_dropdown.vue index 966a5556d24..abfb92f772d 100644 --- a/app/assets/javascripts/vue_shared/components/markdown/comment_templates_dropdown.vue +++ b/app/assets/javascripts/vue_shared/components/markdown/comment_templates_dropdown.vue @@ -1,6 +1,7 @@ <script> import { GlCollapsibleListbox, GlTooltip, GlButton } from '@gitlab/ui'; import fuzzaldrinPlus from 'fuzzaldrin-plus'; +import { InternalEvents } from '~/tracking'; import savedRepliesQuery from './saved_replies.query.graphql'; export default { @@ -18,6 +19,7 @@ export default { GlButton, GlTooltip, }, + mixins: [InternalEvents.mixin()], props: { newCommentTemplatePath: { type: String, @@ -55,6 +57,7 @@ export default { const savedReply = this.savedReplies.find((r) => r.id === id); if (savedReply) { this.$emit('select', savedReply.content); + this.track_event('i_code_review_saved_replies_use'); } }, }, |