Commit edb919c5 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'gitlab-ui-integration-1226-make-popover-focus-by-default' into 'master'

Upgrade @gitlab/ui to v28.15.0

See merge request gitlab-org/gitlab!56778
parents 479e3a9f 423fc4bf
......@@ -158,7 +158,7 @@ export default {
data-testid="issue-blocked-icon"
@mouseenter="handleMouseEnter"
/>
<gl-popover :target="glIconId" placement="top" triggers="hover">
<gl-popover :target="glIconId" placement="top">
<template #title
><span data-testid="popover-title">{{ blockedLabel }}</span></template
>
......
......@@ -37,7 +37,7 @@ export default {
<template>
<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
class="gl-display-flex gl-justify-content-space-between gl-align-items-center gl-word-break-all"
>
......
......@@ -34,7 +34,7 @@ export default {
<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>
<span class="gl-display-block gl-text-left">{{ errorContent.title }}</span>
</template>
......
......@@ -71,7 +71,6 @@ export default {
ref="popover"
:target="$options.targetId"
:css-classes="['feature-highlight-popover']"
triggers="hover"
container="body"
placement="right"
boundary="viewport"
......
......@@ -60,11 +60,7 @@ export default {
</select>
<span v-if="requestsWithWarnings.length">
<span id="performance-bar-request-selector-warning" v-html="glEmojiTag('warning')"></span>
<gl-popover
target="performance-bar-request-selector-warning"
:content="warningMessage"
triggers="hover focus"
/>
<gl-popover target="performance-bar-request-selector-warning" :content="warningMessage" />
</span>
</div>
</template>
......@@ -37,6 +37,6 @@ export default {
<template>
<span v-if="hasWarnings">
<span :id="htmlId" v-html="glEmojiTag('warning')"></span>
<gl-popover :target="htmlId" :content="warningMessage" triggers="hover focus" />
<gl-popover :target="htmlId" :content="warningMessage" />
</span>
</template>
......@@ -149,12 +149,7 @@ export default {
>
{{ s__('mrWidget|Resolve conflicts') }}
</gl-button>
<gl-popover
v-if="showPopover"
:target="() => $refs.popover"
placement="top"
triggers="hover focus"
>
<gl-popover v-if="showPopover" :target="() => $refs.popover" placement="top">
<template #title>
<div class="gl-font-weight-normal gl-font-base">
{{ $options.i18n.title }}
......
......@@ -26,7 +26,7 @@ export default {
<template>
<span>
<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>
<span v-safe-html="options.title"></span>
</template>
......
......@@ -60,7 +60,7 @@ export default {
<template>
<!-- 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-2 flex-shrink-1">
<user-avatar-image :img-src="user.avatarUrl" :size="60" css-classes="gl-mr-3!" />
......
---
title: Show popovers on hover and focus by default
merge_request: 56778
author:
type: changed
......@@ -29,12 +29,7 @@ export default {
:size="14"
class="author-link suggestion-help-hover"
/>
<gl-popover
target="pop-approver"
container="popovercontainer"
placement="top"
triggers="hover focus"
>
<gl-popover target="pop-approver" container="popovercontainer" placement="top">
<template #title>{{ __('Who can approve?') }}</template>
<ul class="pl-3">
<li>
......
......@@ -67,7 +67,7 @@ export default {
:size="14"
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>
<p>{{ description }}</p>
<gl-link v-if="linkPath" :href="linkPath" class="gl-font-sm" target="_blank">{{
......
......@@ -142,7 +142,7 @@ export default {
>
{{ epic.title }}
</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>
<div>{{ epicTimeAgoString }}</div>
<div class="gl-mb-2">{{ epicDateString }}</div>
......
......@@ -103,7 +103,6 @@ export default {
:container="containerId"
:target="targetId"
:disabled="disabled"
triggers="hover focus"
placement="rightbottom"
boundary="viewport"
:delay="{ hide: 400 }"
......
......@@ -116,7 +116,6 @@ export default {
<gl-icon id="location-info" name="information" class="gl-text-blue-600" />
<gl-popover
target="location-info"
triggers="hover focus"
placement="top"
:title="s__('Dependencies|Location and dependency path')"
>
......
......@@ -66,7 +66,6 @@ export default {
<gl-popover
:target="() => $refs.moreLink.$el"
placement="top"
triggers="hover focus"
:title="s__('Dependencies|Dependency path')"
>
<dependency-path-viewer :dependencies="ancestors" />
......
......@@ -117,12 +117,7 @@ export default {
__('Synchronization disabled')
}}</span>
</div>
<gl-popover
:target="`syncDisabled-${itemTitle}`"
placement="right"
triggers="hover focus"
:css-classes="['w-100']"
>
<gl-popover :target="`syncDisabled-${itemTitle}`" placement="right" :css-classes="['w-100']">
<section>
<gl-sprintf :message="$options.disabledText">
<template #itemTitle>{{ itemTitle.toLowerCase() }}</template>
......
......@@ -65,7 +65,7 @@ export default {
name="question"
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>
<gl-link class="mt-3 gl-font-sm" :href="syncHelp.link" target="_blank">{{
syncHelp.text
......
......@@ -53,11 +53,7 @@ export default {
name="question"
class="gl-text-blue-600 gl-ml-2 gl-cursor-pointer"
/>
<gl-popover
:target="() => $refs.replicationStatusHelp.$el"
placement="top"
triggers="hover focus"
>
<gl-popover :target="() => $refs.replicationStatusHelp.$el" placement="top">
<p>{{ __('Geo nodes are paused using a command run on the node') }}</p>
<gl-link
class="gl-mt-5 gl-font-sm"
......
......@@ -54,12 +54,7 @@ export default {
:failure-count="failureCount"
:total-count="totalCount"
/>
<gl-popover
:target="`syncProgress-${itemTitle}`"
placement="right"
triggers="hover focus"
:css-classes="['w-100']"
>
<gl-popover :target="`syncProgress-${itemTitle}`" placement="right" :css-classes="['w-100']">
<template #title>
<gl-sprintf :message="__('Number of %{itemTitle}')">
<template #itemTitle>
......
......@@ -86,7 +86,7 @@ export default {
name="question"
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>
<gl-sprintf
:message="
......
......@@ -63,7 +63,7 @@ export default {
name="question"
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>
<gl-link :href="syncHelp.link" target="_blank">{{ syncHelp.text }}</gl-link>
</gl-popover>
......
......@@ -171,7 +171,6 @@ export default {
<gl-popover
:target="`${item.id}-labels`"
placement="top"
triggers="hover"
:css-classes="['issue-labels-popover']"
>
<div class="gl-display-flex gl-justify-content-start gl-flex-wrap gl-mr-1">
......
......@@ -94,12 +94,7 @@ export default {
>
</div>
</div>
<gl-popover
:target="rotationAssigneeUniqueID"
:title="assignee.user.username"
triggers="hover"
placement="top"
>
<gl-popover :target="rotationAssigneeUniqueID" :title="assignee.user.username" placement="top">
<p class="gl-m-0" data-testid="rotation-assignee-starts-at">
{{ startsAt }}
</p>
......
......@@ -152,7 +152,7 @@ export default {
</ul>
</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-p-2 gl-flex-shrink-1">
<gl-avatar :entity-name="author.name" :alt="author.name" :src="author.avatarUrl" />
......
......@@ -135,7 +135,7 @@ export default {
</div>
</div>
</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-m-0">{{ popoverWeightText }}</p>
</gl-popover>
......
......@@ -131,7 +131,6 @@ export default {
:target="`milestone-item-${milestone.id}`"
boundary="viewport"
placement="left"
triggers="hover"
:title="milestone.title"
>
<div class="milestone-item-type gl-line-height-normal">
......
......@@ -48,7 +48,6 @@ export default {
data-testid="vulnerability-solutions-popover"
:target="() => $refs.popover"
placement="top"
triggers="hover focus"
>
<template #title>
<span>{{ s__('AutoRemediation| 1 Merge Request') }}</span>
......
......@@ -41,7 +41,7 @@ export default {
<gl-icon name="issues" class="gl-mr-2" />
{{ numberOfIssues }}
</gl-badge>
<gl-popover ref="popover" :target="issueBadgeEl" triggers="hover" placement="top">
<gl-popover ref="popover" :target="issueBadgeEl" placement="top">
<template #title>
{{ popoverTitle }}
</template>
......
......@@ -99,7 +99,7 @@ export default {
>
<gl-icon name="question" />
</gl-link>
<gl-popover :target="() => $refs.helpLink" triggers="hover focus">
<gl-popover :target="() => $refs.helpLink">
{{ $options.helpPopoverText }}
</gl-popover>
</h2>
......
......@@ -38,7 +38,6 @@ export default {
:target="target"
:title="__('Vulnerability remediated. Review before resolving.')"
placement="top"
triggers="hover focus"
/>
</div>
</template>
......@@ -7,7 +7,6 @@ exports[`TrialStatusPopover component matches the snapshot 1`] = `
delay="[object Object]"
placement="rightbottom"
target="target-element-identifier"
triggers="hover focus"
>
<gl-sprintf-stub
......
......@@ -11,7 +11,7 @@ exports[`dashboard has no vulnerabilities empty state matches snapshot 1`] = `
<p>
Although it's rare to have no vulnerabilities, it can happen. Check your settings to make sure you've set up your dashboard correctly.
</p>
<div><a href=\\"/path/to/dashboard/documentation\\" class=\\"btn btn-success btn-md gl-button\\">
<div class=\\"gl-display-flex gl-flex-wrap gl-justify-content-center\\"><a href=\\"/path/to/dashboard/documentation\\" class=\\"btn gl-mb-3 btn-confirm btn-md gl-button gl-mx-2\\">
<!---->
<!----> <span class=\\"gl-button-text\\">Learn more about setting up your dashboard</span></a>
<!---->
......
......@@ -32,9 +32,11 @@ exports[`Vulnerability Report error states has unavailable pages 1`] = `
<p>
Either you don't have permission to view this dashboard or the dashboard has not been setup. Please check your permission settings with your administrator or check your dashboard configurations to proceed.
</p>
<div>
<div
class="gl-display-flex gl-flex-wrap gl-justify-content-center"
>
<a
class="btn btn-success btn-md gl-button"
class="btn gl-mb-3 btn-confirm btn-md gl-button gl-mx-2"
href="/test/dashboard_page"
>
<span
......
......@@ -62,9 +62,11 @@ exports[`Security Charts error states has unavailable pages 1`] = `
<p>
Either you don't have permission to view this dashboard or the dashboard has not been setup. Please check your permission settings with your administrator or check your dashboard configurations to proceed.
</p>
<div>
<div
class="gl-display-flex gl-flex-wrap gl-justify-content-center"
>
<a
class="btn btn-success btn-md gl-button"
class="btn gl-mb-3 btn-confirm btn-md gl-button gl-mx-2"
href="/test/dashboard_page"
>
<span
......
......@@ -41,7 +41,6 @@ describe('feature_highlight/feature_highlight_popover', () => {
expect(findPopover().props()).toMatchObject({
target: POPOVER_TARGET_ID,
cssClasses: ['feature-highlight-popover'],
triggers: 'hover',
container: 'body',
placement: 'right',
boundary: 'viewport',
......
......@@ -52,7 +52,9 @@ exports[`packages_list_app renders 1`] = `
with GitLab.
</p>
<div>
<div
class="gl-display-flex gl-flex-wrap gl-justify-content-center"
>
<!---->
<!---->
......
......@@ -10,8 +10,8 @@ exports[`EmptyStateComponent should render content 1`] = `
<h1 class=\\"h4\\">Getting started with serverless</h1>
<p>In order to start using functions as a service, you must first install Knative on your Kubernetes cluster. <gl-link-stub href=\\"/help\\">More information</gl-link-stub>
</p>
<div>
<gl-button-stub category=\\"primary\\" variant=\\"success\\" size=\\"medium\\" icon=\\"\\" buttontextclasses=\\"\\" href=\\"/clusters\\">Install Knative</gl-button-stub>
<div class=\\"gl-display-flex gl-flex-wrap gl-justify-content-center\\">
<gl-button-stub category=\\"primary\\" variant=\\"confirm\\" size=\\"medium\\" icon=\\"\\" buttontextclasses=\\"\\" href=\\"/clusters\\" class=\\"gl-mb-3 gl-mx-2\\">Install Knative</gl-button-stub>
<!---->
</div>
</div>
......
......@@ -41,10 +41,6 @@ describe('HelpPopover', () => {
expect(findPopover().props().target()).toBe(findQuestionButton().vm.$el);
});
it('triggers popover on hover and focus', () => {
expect(findPopover().props().triggers).toBe('hover focus');
});
it('allows rendering title with HTML tags', () => {
expect(findPopover().find('strong').exists()).toBe(true);
});
......
......@@ -907,16 +907,16 @@
resolved "https://registry.yarnpkg.com/@gitlab/tributejs/-/tributejs-1.0.0.tgz#672befa222aeffc83e7d799b0500a7a4418e59b8"
integrity sha512-nmKw1+hB6MHvlmPz63yPwVs1qQkycHwsKgxpEbzmky16Y6mL4EJMk3w1b8QlOAF/AIAzjCERPhe/R4MJiohbZw==
"@gitlab/ui@28.9.1":
version "28.9.1"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-28.9.1.tgz#7d4d4502ff09fca19ab815504f80afbf03dd2fc1"
integrity sha512-+JqkpwzkKBnxo4KkC8XSPEJ5Au9y+TIOE7w9I5o+04krgWCbZKNqaiKZkg2IqSlo/sZSfvihXZMhEVc/JXf7HQ==
"@gitlab/ui@28.15.0":
version "28.15.0"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-28.15.0.tgz#e78a1c0724c7cc8880fcff8161e529ca7bcaf6e8"
integrity sha512-muz1tX3nQmu9dMv7GbTNIkWkEwYhvnLPhtwtnrt8eyRGQ0zIUWLEzdoSiwvMNLAqT2JB8kxahoavR5iSFAYtXA==
dependencies:
"@babel/standalone" "^7.0.0"
"@gitlab/vue-toasted" "^1.3.0"
bootstrap-vue "2.13.1"
copy-to-clipboard "^3.0.8"
dompurify "^2.2.6"
dompurify "^2.2.7"
echarts "^4.9.0"
highlight.js "^10.6.0"
js-beautify "^1.8.8"
......@@ -4270,7 +4270,7 @@ domhandler@^2.3.0:
dependencies:
domelementtype "1"
dompurify@^2.2.6, dompurify@^2.2.7:
dompurify@^2.2.7:
version "2.2.7"
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.2.7.tgz#a5f055a2a471638680e779bd08fc334962d11fd8"
integrity sha512-jdtDffdGNY+C76jvodNTu9jt5yYj59vuTUyx+wXdzcSwAGTYZDAQkQ7Iwx9zcGrA4ixC1syU4H3RZROqRxokxg==
......
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