Commit 98564fc2 authored by GitLab Bot's avatar GitLab Bot Committed by Paul Gascou-Vaillancourt

GitLab UI integration branch for 1226-make-popover-focus-by-default

Updates any gl-popovers that use the triggers property and
removes them since hover and focus will become
the default.

MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56660
parent fe2022ba
...@@ -37,7 +37,7 @@ export default { ...@@ -37,7 +37,7 @@ export default {
<template> <template>
<div id="popover-container"> <div id="popover-container">
<gl-popover :target="target" triggers="hover" placement="top" container="popover-container"> <gl-popover :target="target" placement="top" container="popover-container">
<div <div
class="gl-display-flex gl-justify-content-space-between gl-align-items-center gl-word-break-all" class="gl-display-flex gl-justify-content-space-between gl-align-items-center gl-word-break-all"
> >
......
...@@ -34,7 +34,7 @@ export default { ...@@ -34,7 +34,7 @@ export default {
<gl-icon name="status_warning" :size="24" class="gl-p-2" /> <gl-icon name="status_warning" :size="24" class="gl-p-2" />
<gl-popover :container="popoverId" :target="popoverId" placement="top" triggers="hover focus"> <gl-popover :container="popoverId" :target="popoverId" placement="top">
<template #title> <template #title>
<span class="gl-display-block gl-text-left">{{ errorContent.title }}</span> <span class="gl-display-block gl-text-left">{{ errorContent.title }}</span>
</template> </template>
......
...@@ -71,7 +71,6 @@ export default { ...@@ -71,7 +71,6 @@ export default {
ref="popover" ref="popover"
:target="$options.targetId" :target="$options.targetId"
:css-classes="['feature-highlight-popover']" :css-classes="['feature-highlight-popover']"
triggers="hover"
container="body" container="body"
placement="right" placement="right"
boundary="viewport" boundary="viewport"
......
...@@ -60,11 +60,7 @@ export default { ...@@ -60,11 +60,7 @@ export default {
</select> </select>
<span v-if="requestsWithWarnings.length"> <span v-if="requestsWithWarnings.length">
<span id="performance-bar-request-selector-warning" v-html="glEmojiTag('warning')"></span> <span id="performance-bar-request-selector-warning" v-html="glEmojiTag('warning')"></span>
<gl-popover <gl-popover target="performance-bar-request-selector-warning" :content="warningMessage" />
target="performance-bar-request-selector-warning"
:content="warningMessage"
triggers="hover focus"
/>
</span> </span>
</div> </div>
</template> </template>
...@@ -37,6 +37,6 @@ export default { ...@@ -37,6 +37,6 @@ export default {
<template> <template>
<span v-if="hasWarnings"> <span v-if="hasWarnings">
<span :id="htmlId" v-html="glEmojiTag('warning')"></span> <span :id="htmlId" v-html="glEmojiTag('warning')"></span>
<gl-popover :target="htmlId" :content="warningMessage" triggers="hover focus" /> <gl-popover :target="htmlId" :content="warningMessage" />
</span> </span>
</template> </template>
...@@ -153,7 +153,6 @@ export default { ...@@ -153,7 +153,6 @@ export default {
v-if="showPopover" v-if="showPopover"
:target="() => $refs.popover" :target="() => $refs.popover"
placement="top" placement="top"
triggers="hover focus"
> >
<template #title> <template #title>
<div class="gl-font-weight-normal gl-font-base"> <div class="gl-font-weight-normal gl-font-base">
......
...@@ -26,7 +26,7 @@ export default { ...@@ -26,7 +26,7 @@ export default {
<template> <template>
<span> <span>
<gl-button ref="popoverTrigger" variant="link" icon="question" tabindex="0" /> <gl-button ref="popoverTrigger" variant="link" icon="question" tabindex="0" />
<gl-popover triggers="hover focus" :target="() => $refs.popoverTrigger.$el" v-bind="options"> <gl-popover :target="() => $refs.popoverTrigger.$el" v-bind="options">
<template v-if="options.title" #title> <template v-if="options.title" #title>
<span v-safe-html="options.title"></span> <span v-safe-html="options.title"></span>
</template> </template>
......
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
<template> <template>
<!-- 200ms delay so not every mouseover triggers Popover --> <!-- 200ms delay so not every mouseover triggers Popover -->
<gl-popover :target="target" :delay="200" boundary="viewport" triggers="hover" placement="top"> <gl-popover :target="target" :delay="200" boundary="viewport" placement="top">
<div class="gl-p-3 gl-line-height-normal gl-display-flex" data-testid="user-popover"> <div class="gl-p-3 gl-line-height-normal gl-display-flex" data-testid="user-popover">
<div class="gl-p-2 flex-shrink-1"> <div class="gl-p-2 flex-shrink-1">
<user-avatar-image :img-src="user.avatarUrl" :size="60" css-classes="gl-mr-3!" /> <user-avatar-image :img-src="user.avatarUrl" :size="60" css-classes="gl-mr-3!" />
......
...@@ -29,12 +29,7 @@ export default { ...@@ -29,12 +29,7 @@ export default {
:size="14" :size="14"
class="author-link suggestion-help-hover" class="author-link suggestion-help-hover"
/> />
<gl-popover <gl-popover target="pop-approver" container="popovercontainer" placement="top">
target="pop-approver"
container="popovercontainer"
placement="top"
triggers="hover focus"
>
<template #title>{{ __('Who can approve?') }}</template> <template #title>{{ __('Who can approve?') }}</template>
<ul class="pl-3"> <ul class="pl-3">
<li> <li>
......
...@@ -67,7 +67,7 @@ export default { ...@@ -67,7 +67,7 @@ export default {
:size="14" :size="14"
class="author-link suggestion-help-hover" class="author-link suggestion-help-hover"
/> />
<gl-popover :target="popoverTarget" placement="top" triggers="hover focus"> <gl-popover :target="popoverTarget" placement="top">
<template #title>{{ __('Who can approve?') }}</template> <template #title>{{ __('Who can approve?') }}</template>
<p>{{ description }}</p> <p>{{ description }}</p>
<gl-link v-if="linkPath" :href="linkPath" class="gl-font-sm" target="_blank">{{ <gl-link v-if="linkPath" :href="linkPath" class="gl-font-sm" target="_blank">{{
......
...@@ -142,7 +142,7 @@ export default { ...@@ -142,7 +142,7 @@ export default {
> >
{{ epic.title }} {{ epic.title }}
</h4> </h4>
<gl-popover :target="() => $refs.epicTitle" triggers="hover" placement="top"> <gl-popover :target="() => $refs.epicTitle" placement="top">
<template #title>{{ epic.title }} &middot; {{ epic.reference }}</template> <template #title>{{ epic.title }} &middot; {{ epic.reference }}</template>
<div>{{ epicTimeAgoString }}</div> <div>{{ epicTimeAgoString }}</div>
<div class="gl-mb-2">{{ epicDateString }}</div> <div class="gl-mb-2">{{ epicDateString }}</div>
......
...@@ -103,7 +103,6 @@ export default { ...@@ -103,7 +103,6 @@ export default {
:container="containerId" :container="containerId"
:target="targetId" :target="targetId"
:disabled="disabled" :disabled="disabled"
triggers="hover focus"
placement="rightbottom" placement="rightbottom"
boundary="viewport" boundary="viewport"
:delay="{ hide: 400 }" :delay="{ hide: 400 }"
......
...@@ -116,7 +116,6 @@ export default { ...@@ -116,7 +116,6 @@ export default {
<gl-icon id="location-info" name="information" class="gl-text-blue-600" /> <gl-icon id="location-info" name="information" class="gl-text-blue-600" />
<gl-popover <gl-popover
target="location-info" target="location-info"
triggers="hover focus"
placement="top" placement="top"
:title="s__('Dependencies|Location and dependency path')" :title="s__('Dependencies|Location and dependency path')"
> >
......
...@@ -66,7 +66,6 @@ export default { ...@@ -66,7 +66,6 @@ export default {
<gl-popover <gl-popover
:target="() => $refs.moreLink.$el" :target="() => $refs.moreLink.$el"
placement="top" placement="top"
triggers="hover focus"
:title="s__('Dependencies|Dependency path')" :title="s__('Dependencies|Dependency path')"
> >
<dependency-path-viewer :dependencies="ancestors" /> <dependency-path-viewer :dependencies="ancestors" />
......
...@@ -117,12 +117,7 @@ export default { ...@@ -117,12 +117,7 @@ export default {
__('Synchronization disabled') __('Synchronization disabled')
}}</span> }}</span>
</div> </div>
<gl-popover <gl-popover :target="`syncDisabled-${itemTitle}`" placement="right" :css-classes="['w-100']">
:target="`syncDisabled-${itemTitle}`"
placement="right"
triggers="hover focus"
:css-classes="['w-100']"
>
<section> <section>
<gl-sprintf :message="$options.disabledText"> <gl-sprintf :message="$options.disabledText">
<template #itemTitle>{{ itemTitle.toLowerCase() }}</template> <template #itemTitle>{{ itemTitle.toLowerCase() }}</template>
......
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
name="question" name="question"
class="text-primary-600 ml-1 cursor-pointer" class="text-primary-600 ml-1 cursor-pointer"
/> />
<gl-popover :target="() => $refs.lastUpdated.$el" placement="top" triggers="hover focus"> <gl-popover :target="() => $refs.lastUpdated.$el" placement="top">
<p>{{ syncTimeAgo.popoverText }}</p> <p>{{ syncTimeAgo.popoverText }}</p>
<gl-link class="mt-3 gl-font-sm" :href="syncHelp.link" target="_blank">{{ <gl-link class="mt-3 gl-font-sm" :href="syncHelp.link" target="_blank">{{
syncHelp.text syncHelp.text
......
...@@ -53,11 +53,7 @@ export default { ...@@ -53,11 +53,7 @@ export default {
name="question" name="question"
class="gl-text-blue-600 gl-ml-2 gl-cursor-pointer" class="gl-text-blue-600 gl-ml-2 gl-cursor-pointer"
/> />
<gl-popover <gl-popover :target="() => $refs.replicationStatusHelp.$el" placement="top">
:target="() => $refs.replicationStatusHelp.$el"
placement="top"
triggers="hover focus"
>
<p>{{ __('Geo nodes are paused using a command run on the node') }}</p> <p>{{ __('Geo nodes are paused using a command run on the node') }}</p>
<gl-link <gl-link
class="gl-mt-5 gl-font-sm" class="gl-mt-5 gl-font-sm"
......
...@@ -54,12 +54,7 @@ export default { ...@@ -54,12 +54,7 @@ export default {
:failure-count="failureCount" :failure-count="failureCount"
:total-count="totalCount" :total-count="totalCount"
/> />
<gl-popover <gl-popover :target="`syncProgress-${itemTitle}`" placement="right" :css-classes="['w-100']">
:target="`syncProgress-${itemTitle}`"
placement="right"
triggers="hover focus"
:css-classes="['w-100']"
>
<template #title> <template #title>
<gl-sprintf :message="__('Number of %{itemTitle}')"> <gl-sprintf :message="__('Number of %{itemTitle}')">
<template #itemTitle> <template #itemTitle>
......
...@@ -86,7 +86,7 @@ export default { ...@@ -86,7 +86,7 @@ export default {
name="question" name="question"
class="text-primary-600 ml-1 cursor-pointer" class="text-primary-600 ml-1 cursor-pointer"
/> />
<gl-popover :target="() => $refs.verificationInfo.$el" placement="top" triggers="hover focus"> <gl-popover :target="() => $refs.verificationInfo.$el" placement="top">
<p> <p>
<gl-sprintf <gl-sprintf
:message=" :message="
......
...@@ -63,7 +63,7 @@ export default { ...@@ -63,7 +63,7 @@ export default {
name="question" name="question"
class="gl-text-blue-500 gl-cursor-pointer gl-ml-2" class="gl-text-blue-500 gl-cursor-pointer gl-ml-2"
/> />
<gl-popover :target="() => $refs.lastUpdated.$el" placement="top" triggers="hover focus"> <gl-popover :target="() => $refs.lastUpdated.$el" placement="top">
<p>{{ syncTimeAgo.popoverText }}</p> <p>{{ syncTimeAgo.popoverText }}</p>
<gl-link :href="syncHelp.link" target="_blank">{{ syncHelp.text }}</gl-link> <gl-link :href="syncHelp.link" target="_blank">{{ syncHelp.text }}</gl-link>
</gl-popover> </gl-popover>
......
...@@ -171,7 +171,6 @@ export default { ...@@ -171,7 +171,6 @@ export default {
<gl-popover <gl-popover
:target="`${item.id}-labels`" :target="`${item.id}-labels`"
placement="top" placement="top"
triggers="hover"
:css-classes="['issue-labels-popover']" :css-classes="['issue-labels-popover']"
> >
<div class="gl-display-flex gl-justify-content-start gl-flex-wrap gl-mr-1"> <div class="gl-display-flex gl-justify-content-start gl-flex-wrap gl-mr-1">
......
...@@ -97,7 +97,6 @@ export default { ...@@ -97,7 +97,6 @@ export default {
<gl-popover <gl-popover
:target="rotationAssigneeUniqueID" :target="rotationAssigneeUniqueID"
:title="assignee.user.username" :title="assignee.user.username"
triggers="hover"
placement="top" placement="top"
> >
<p class="gl-m-0" data-testid="rotation-assignee-starts-at"> <p class="gl-m-0" data-testid="rotation-assignee-starts-at">
......
...@@ -152,7 +152,7 @@ export default { ...@@ -152,7 +152,7 @@ export default {
</ul> </ul>
</div> </div>
</div> </div>
<gl-popover :target="getAuthorPopoverTarget()" triggers="hover focus" placement="top"> <gl-popover :target="getAuthorPopoverTarget()" placement="top">
<div class="gl-line-height-normal gl-display-flex"> <div class="gl-line-height-normal gl-display-flex">
<div class="gl-p-2 gl-flex-shrink-1"> <div class="gl-p-2 gl-flex-shrink-1">
<gl-avatar :entity-name="author.name" :alt="author.name" :src="author.avatarUrl" /> <gl-avatar :entity-name="author.name" :alt="author.name" :src="author.avatarUrl" />
......
...@@ -135,7 +135,7 @@ export default { ...@@ -135,7 +135,7 @@ export default {
</div> </div>
</div> </div>
</a> </a>
<gl-popover :target="generateKey(epic)" :title="epic.title" triggers="hover" placement="left"> <gl-popover :target="generateKey(epic)" :title="epic.title" placement="left">
<p class="gl-text-gray-500 gl-m-0">{{ timeframeString(epic) }}</p> <p class="gl-text-gray-500 gl-m-0">{{ timeframeString(epic) }}</p>
<p class="gl-m-0">{{ popoverWeightText }}</p> <p class="gl-m-0">{{ popoverWeightText }}</p>
</gl-popover> </gl-popover>
......
...@@ -131,7 +131,6 @@ export default { ...@@ -131,7 +131,6 @@ export default {
:target="`milestone-item-${milestone.id}`" :target="`milestone-item-${milestone.id}`"
boundary="viewport" boundary="viewport"
placement="left" placement="left"
triggers="hover"
:title="milestone.title" :title="milestone.title"
> >
<div class="milestone-item-type gl-line-height-normal"> <div class="milestone-item-type gl-line-height-normal">
......
...@@ -48,7 +48,6 @@ export default { ...@@ -48,7 +48,6 @@ export default {
data-testid="vulnerability-solutions-popover" data-testid="vulnerability-solutions-popover"
:target="() => $refs.popover" :target="() => $refs.popover"
placement="top" placement="top"
triggers="hover focus"
> >
<template #title> <template #title>
<span>{{ s__('AutoRemediation| 1 Merge Request') }}</span> <span>{{ s__('AutoRemediation| 1 Merge Request') }}</span>
......
...@@ -41,7 +41,7 @@ export default { ...@@ -41,7 +41,7 @@ export default {
<gl-icon name="issues" class="gl-mr-2" /> <gl-icon name="issues" class="gl-mr-2" />
{{ numberOfIssues }} {{ numberOfIssues }}
</gl-badge> </gl-badge>
<gl-popover ref="popover" :target="issueBadgeEl" triggers="hover" placement="top"> <gl-popover ref="popover" :target="issueBadgeEl" placement="top">
<template #title> <template #title>
{{ popoverTitle }} {{ popoverTitle }}
</template> </template>
......
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
> >
<gl-icon name="question" /> <gl-icon name="question" />
</gl-link> </gl-link>
<gl-popover :target="() => $refs.helpLink" triggers="hover focus"> <gl-popover :target="() => $refs.helpLink">
{{ $options.helpPopoverText }} {{ $options.helpPopoverText }}
</gl-popover> </gl-popover>
</h2> </h2>
......
...@@ -38,7 +38,6 @@ export default { ...@@ -38,7 +38,6 @@ export default {
:target="target" :target="target"
:title="__('Vulnerability remediated. Review before resolving.')" :title="__('Vulnerability remediated. Review before resolving.')"
placement="top" placement="top"
triggers="hover focus"
/> />
</div> </div>
</template> </template>
...@@ -907,10 +907,9 @@ ...@@ -907,10 +907,9 @@
resolved "https://registry.yarnpkg.com/@gitlab/tributejs/-/tributejs-1.0.0.tgz#672befa222aeffc83e7d799b0500a7a4418e59b8" resolved "https://registry.yarnpkg.com/@gitlab/tributejs/-/tributejs-1.0.0.tgz#672befa222aeffc83e7d799b0500a7a4418e59b8"
integrity sha512-nmKw1+hB6MHvlmPz63yPwVs1qQkycHwsKgxpEbzmky16Y6mL4EJMk3w1b8QlOAF/AIAzjCERPhe/R4MJiohbZw== integrity sha512-nmKw1+hB6MHvlmPz63yPwVs1qQkycHwsKgxpEbzmky16Y6mL4EJMk3w1b8QlOAF/AIAzjCERPhe/R4MJiohbZw==
"@gitlab/ui@28.9.1": "@gitlab/ui@https://gitlab.com/gitlab-org/gitlab-ui/-/jobs/1098767989/artifacts/raw/gitlab-ui.1226-make-popover-focus-by-default.tgz":
version "28.9.1" version "28.9.0"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-28.9.1.tgz#7d4d4502ff09fca19ab815504f80afbf03dd2fc1" resolved "https://gitlab.com/gitlab-org/gitlab-ui/-/jobs/1098767989/artifacts/raw/gitlab-ui.1226-make-popover-focus-by-default.tgz#6fe91ad01754866cfec20fe16417a770434d732f"
integrity sha512-+JqkpwzkKBnxo4KkC8XSPEJ5Au9y+TIOE7w9I5o+04krgWCbZKNqaiKZkg2IqSlo/sZSfvihXZMhEVc/JXf7HQ==
dependencies: dependencies:
"@babel/standalone" "^7.0.0" "@babel/standalone" "^7.0.0"
"@gitlab/vue-toasted" "^1.3.0" "@gitlab/vue-toasted" "^1.3.0"
...@@ -5893,10 +5892,22 @@ he@^1.1.0, he@^1.1.1, he@^1.2.0: ...@@ -5893,10 +5892,22 @@ he@^1.1.0, he@^1.1.1, he@^1.2.0:
resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
<<<<<<< HEAD
highlight.js@^10.6.0, highlight.js@~10.6.0: highlight.js@^10.6.0, highlight.js@~10.6.0:
version "10.6.0" version "10.6.0"
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.6.0.tgz#0073aa71d566906965ba6e1b7be7b2682f5e18b6" resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.6.0.tgz#0073aa71d566906965ba6e1b7be7b2682f5e18b6"
integrity sha512-8mlRcn5vk/r4+QcqerapwBYTe+iPL5ih6xrNylxrnBdHQiijDETfXX7VIxC3UiCRiINBJfANBAsPzAvRQj8RpQ== integrity sha512-8mlRcn5vk/r4+QcqerapwBYTe+iPL5ih6xrNylxrnBdHQiijDETfXX7VIxC3UiCRiINBJfANBAsPzAvRQj8RpQ==
=======
highlight.js@^10.6.0:
version "10.6.0"
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.6.0.tgz#0073aa71d566906965ba6e1b7be7b2682f5e18b6"
integrity sha512-8mlRcn5vk/r4+QcqerapwBYTe+iPL5ih6xrNylxrnBdHQiijDETfXX7VIxC3UiCRiINBJfANBAsPzAvRQj8RpQ==
highlight.js@~9.13.0:
version "9.13.1"
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.13.1.tgz#054586d53a6863311168488a0f58d6c505ce641e"
integrity sha512-Sc28JNQNDzaH6PORtRLMvif9RSn1mYuOoX3omVjnb0+HbpPygU2ALBI0R/wsiqCb4/fcp07Gdo8g+fhtFrQl6A==
>>>>>>> 21a4cfe5a5c (GitLab UI integration branch for 1226-make-popover-focus-by-default)
hmac-drbg@^1.0.1: hmac-drbg@^1.0.1:
version "1.0.1" version "1.0.1"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment