diff options
Diffstat (limited to 'app/assets/javascripts/design_management/components')
10 files changed, 42 insertions, 33 deletions
diff --git a/app/assets/javascripts/design_management/components/design_notes/design_discussion.vue b/app/assets/javascripts/design_management/components/design_notes/design_discussion.vue index ea4d5d7b570..33f0aa00cad 100644 --- a/app/assets/javascripts/design_management/components/design_notes/design_discussion.vue +++ b/app/assets/javascripts/design_management/components/design_notes/design_discussion.vue @@ -1,20 +1,20 @@ <script> -import { ApolloMutation } from 'vue-apollo'; import { GlTooltipDirective, GlIcon, GlLoadingIcon, GlLink, GlBadge } from '@gitlab/ui'; -import { s__ } from '~/locale'; +import { ApolloMutation } from 'vue-apollo'; import createFlash from '~/flash'; +import { s__ } from '~/locale'; import ReplyPlaceholder from '~/notes/components/discussion_reply_placeholder.vue'; import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue'; -import allVersionsMixin from '../../mixins/all_versions'; +import { ACTIVE_DISCUSSION_SOURCE_TYPES } from '../../constants'; import createNoteMutation from '../../graphql/mutations/create_note.mutation.graphql'; import toggleResolveDiscussionMutation from '../../graphql/mutations/toggle_resolve_discussion.mutation.graphql'; import activeDiscussionQuery from '../../graphql/queries/active_discussion.query.graphql'; +import allVersionsMixin from '../../mixins/all_versions'; +import { hasErrors } from '../../utils/cache_update'; +import { ADD_DISCUSSION_COMMENT_ERROR } from '../../utils/error_messages'; import DesignNote from './design_note.vue'; import DesignReplyForm from './design_reply_form.vue'; -import { ACTIVE_DISCUSSION_SOURCE_TYPES } from '../../constants'; import ToggleRepliesWidget from './toggle_replies_widget.vue'; -import { hasErrors } from '../../utils/cache_update'; -import { ADD_DISCUSSION_COMMENT_ERROR } from '../../utils/error_messages'; export default { components: { diff --git a/app/assets/javascripts/design_management/components/design_notes/design_note.vue b/app/assets/javascripts/design_management/components/design_notes/design_note.vue index 421a4dc274a..2b867217327 100644 --- a/app/assets/javascripts/design_management/components/design_notes/design_note.vue +++ b/app/assets/javascripts/design_management/components/design_notes/design_note.vue @@ -1,13 +1,13 @@ <script> -import { ApolloMutation } from 'vue-apollo'; import { GlTooltipDirective, GlIcon, GlLink, GlSafeHtmlDirective } from '@gitlab/ui'; -import updateNoteMutation from '../../graphql/mutations/update_note.mutation.graphql'; -import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue'; +import { ApolloMutation } from 'vue-apollo'; import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue'; import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue'; -import DesignReplyForm from './design_reply_form.vue'; -import { findNoteId, extractDesignNoteId } from '../../utils/design_management_utils'; +import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue'; +import updateNoteMutation from '../../graphql/mutations/update_note.mutation.graphql'; import { hasErrors } from '../../utils/cache_update'; +import { findNoteId, extractDesignNoteId } from '../../utils/design_management_utils'; +import DesignReplyForm from './design_reply_form.vue'; export default { components: { diff --git a/app/assets/javascripts/design_management/components/design_notes/design_reply_form.vue b/app/assets/javascripts/design_management/components/design_notes/design_reply_form.vue index 0cc89440754..fb25d3618ab 100644 --- a/app/assets/javascripts/design_management/components/design_notes/design_reply_form.vue +++ b/app/assets/javascripts/design_management/components/design_notes/design_reply_form.vue @@ -1,8 +1,8 @@ <script> import { GlButton, GlModal } from '@gitlab/ui'; -import MarkdownField from '~/vue_shared/components/markdown/field.vue'; -import { s__ } from '~/locale'; import { helpPagePath } from '~/helpers/help_page_helper'; +import { s__ } from '~/locale'; +import MarkdownField from '~/vue_shared/components/markdown/field.vue'; export default { name: 'DesignReplyForm', diff --git a/app/assets/javascripts/design_management/components/design_overlay.vue b/app/assets/javascripts/design_management/components/design_overlay.vue index 3c2ce693bc0..ecca8606f89 100644 --- a/app/assets/javascripts/design_management/components/design_overlay.vue +++ b/app/assets/javascripts/design_management/components/design_overlay.vue @@ -1,9 +1,9 @@ <script> import { __ } from '~/locale'; -import activeDiscussionQuery from '../graphql/queries/active_discussion.query.graphql'; +import { ACTIVE_DISCUSSION_SOURCE_TYPES } from '../constants'; import updateActiveDiscussionMutation from '../graphql/mutations/update_active_discussion.mutation.graphql'; +import activeDiscussionQuery from '../graphql/queries/active_discussion.query.graphql'; import DesignNotePin from './design_note_pin.vue'; -import { ACTIVE_DISCUSSION_SOURCE_TYPES } from '../constants'; export default { name: 'DesignOverlay', diff --git a/app/assets/javascripts/design_management/components/design_presentation.vue b/app/assets/javascripts/design_management/components/design_presentation.vue index a760adf8b14..11d2f3b2e37 100644 --- a/app/assets/javascripts/design_management/components/design_presentation.vue +++ b/app/assets/javascripts/design_management/components/design_presentation.vue @@ -1,7 +1,7 @@ <script> import { throttle } from 'lodash'; -import DesignImage from './image.vue'; import DesignOverlay from './design_overlay.vue'; +import DesignImage from './image.vue'; const CLICK_DRAG_BUFFER_PX = 2; diff --git a/app/assets/javascripts/design_management/components/design_sidebar.vue b/app/assets/javascripts/design_management/components/design_sidebar.vue index 50b12fd739b..efa1ef2107a 100644 --- a/app/assets/javascripts/design_management/components/design_sidebar.vue +++ b/app/assets/javascripts/design_management/components/design_sidebar.vue @@ -1,15 +1,15 @@ <script> -import Cookies from 'js-cookie'; import { GlCollapse, GlButton, GlPopover } from '@gitlab/ui'; -import { s__ } from '~/locale'; +import Cookies from 'js-cookie'; import { parseBoolean } from '~/lib/utils/common_utils'; +import { s__ } from '~/locale'; +import Participants from '~/sidebar/components/participants/participants.vue'; +import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; +import { ACTIVE_DISCUSSION_SOURCE_TYPES } from '../constants'; import updateActiveDiscussionMutation from '../graphql/mutations/update_active_discussion.mutation.graphql'; import { extractDiscussions, extractParticipants } from '../utils/design_management_utils'; -import { ACTIVE_DISCUSSION_SOURCE_TYPES } from '../constants'; import DesignDiscussion from './design_notes/design_discussion.vue'; -import Participants from '~/sidebar/components/participants/participants.vue'; import DesignTodoButton from './design_todo_button.vue'; -import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; export default { components: { diff --git a/app/assets/javascripts/design_management/components/design_todo_button.vue b/app/assets/javascripts/design_management/components/design_todo_button.vue index db14db79989..da492f03801 100644 --- a/app/assets/javascripts/design_management/components/design_todo_button.vue +++ b/app/assets/javascripts/design_management/components/design_todo_button.vue @@ -1,8 +1,8 @@ <script> import todoMarkDoneMutation from '~/graphql_shared/mutations/todo_mark_done.mutation.graphql'; -import getDesignQuery from '../graphql/queries/get_design.query.graphql'; -import createDesignTodoMutation from '../graphql/mutations/create_design_todo.mutation.graphql'; import TodoButton from '~/vue_shared/components/todo_button.vue'; +import createDesignTodoMutation from '../graphql/mutations/create_design_todo.mutation.graphql'; +import getDesignQuery from '../graphql/queries/get_design.query.graphql'; import allVersionsMixin from '../mixins/all_versions'; import { updateStoreAfterDeleteDesignTodo } from '../utils/cache_update'; import { findIssueId, findDesignId } from '../utils/design_management_utils'; diff --git a/app/assets/javascripts/design_management/components/image.vue b/app/assets/javascripts/design_management/components/image.vue index 53062e6ebb0..e64ee4a5a34 100644 --- a/app/assets/javascripts/design_management/components/image.vue +++ b/app/assets/javascripts/design_management/components/image.vue @@ -1,6 +1,6 @@ <script> -import { throttle } from 'lodash'; import { GlIcon } from '@gitlab/ui'; +import { throttle } from 'lodash'; export default { components: { diff --git a/app/assets/javascripts/design_management/components/list/item.vue b/app/assets/javascripts/design_management/components/list/item.vue index fa09c7c15cc..5eabe9ef1bc 100644 --- a/app/assets/javascripts/design_management/components/list/item.vue +++ b/app/assets/javascripts/design_management/components/list/item.vue @@ -1,7 +1,7 @@ <script> -import { GlLoadingIcon, GlIcon, GlIntersectionObserver } from '@gitlab/ui'; -import Timeago from '~/vue_shared/components/time_ago_tooltip.vue'; +import { GlLoadingIcon, GlIcon, GlIntersectionObserver, GlTooltipDirective } from '@gitlab/ui'; import { n__, __ } from '~/locale'; +import Timeago from '~/vue_shared/components/time_ago_tooltip.vue'; import { DESIGN_ROUTE_NAME } from '../../router/constants'; export default { @@ -11,6 +11,9 @@ export default { GlIcon, Timeago, }, + directives: { + GlTooltip: GlTooltipDirective, + }, props: { id: { type: [Number, String], @@ -130,7 +133,7 @@ export default { <div class="card-body gl-p-0 gl-display-flex gl-align-items-center gl-justify-content-center gl-overflow-hidden gl-relative" > - <div v-if="icon.name" data-testid="designEvent" class="design-event gl-absolute"> + <div v-if="icon.name" data-testid="design-event" class="gl-top-5 gl-right-5 gl-absolute"> <span :title="icon.tooltip" :aria-label="icon.tooltip"> <gl-icon :name="icon.name" @@ -153,9 +156,10 @@ export default { v-show="showImage" :src="imageLink" :alt="filename" - class="gl-display-block gl-mx-auto gl-max-w-full mh-100 design-img" + class="gl-display-block gl-mx-auto gl-max-w-full gl-max-h-full design-img" data-qa-selector="design_image" :data-qa-filename="filename" + :data-testid="`design-img-${id}`" @load="onImageLoad" @error="onImageError" /> @@ -163,9 +167,14 @@ export default { </div> <div class="card-footer gl-display-flex gl-w-full"> <div class="gl-display-flex gl-flex-direction-column str-truncated-100"> - <span class="gl-font-weight-bold str-truncated-100" data-qa-selector="design_file_name">{{ - filename - }}</span> + <span + v-gl-tooltip + class="gl-font-weight-bold str-truncated-100" + data-qa-selector="design_file_name" + :data-testid="`design-img-filename-${id}`" + :title="filename" + >{{ filename }}</span + > <span v-if="updatedAt" class="str-truncated-100"> {{ __('Updated') }} <timeago :time="updatedAt" tooltip-placement="bottom" /> </span> diff --git a/app/assets/javascripts/design_management/components/toolbar/index.vue b/app/assets/javascripts/design_management/components/toolbar/index.vue index 3509a701984..a3b0f06fb28 100644 --- a/app/assets/javascripts/design_management/components/toolbar/index.vue +++ b/app/assets/javascripts/design_management/components/toolbar/index.vue @@ -3,9 +3,9 @@ import { GlButton, GlIcon, GlTooltipDirective } from '@gitlab/ui'; import permissionsQuery from 'shared_queries/design_management/design_permissions.query.graphql'; import { __, sprintf } from '~/locale'; import timeagoMixin from '~/vue_shared/mixins/timeago'; -import DesignNavigation from './design_navigation.vue'; -import DeleteButton from '../delete_button.vue'; import { DESIGNS_ROUTE_NAME } from '../../router/constants'; +import DeleteButton from '../delete_button.vue'; +import DesignNavigation from './design_navigation.vue'; export default { components: { |