Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imprv: Prevent tooltip flickering #8642

Merged
merged 3 commits into from
Mar 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/app/src/components/PageControls/BookmarkButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const BookmarkButtons: FC<Props> = (props: Props) => {
</span>
</DropdownToggle>
</BookmarkFolderMenu>
<UncontrolledTooltip placement="top" data-testid="bookmark-button-tooltip" target="bookmark-dropdown-btn" fade={false}>
<UncontrolledTooltip data-testid="bookmark-button-tooltip" target="bookmark-dropdown-btn" fade={false}>
{t(getTooltipMessage())}
</UncontrolledTooltip>

Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/components/PageControls/LikeButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const LikeButtons: FC<LikeButtonsProps> = (props: LikeButtonsProps) => {
<span className={`material-symbols-outlined ${isLiked ? 'fill' : ''}`}>favorite</span>
</button>

<UncontrolledTooltip data-testid="like-button-tooltip" placement="top" target="like-button" autohide={false} fade={false}>
<UncontrolledTooltip data-testid="like-button-tooltip" target="like-button" autohide={false} fade={false}>
{t(getTooltipMessage())}
</UncontrolledTooltip>

Expand Down
3 changes: 1 addition & 2 deletions apps/app/src/components/PageControls/SeenUserInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type { FC } from 'react';
import React, { useState } from 'react';

import type { IUser } from '@growi/core';
import { FootstampIcon } from '@growi/ui/dist/components';
import { useTranslation } from 'next-i18next';
import { UncontrolledTooltip, Popover, PopoverBody } from 'reactstrap';

Expand Down Expand Up @@ -40,7 +39,7 @@ const SeenUserInfo: FC<Props> = (props: Props) => {
</div>
</PopoverBody>
</Popover>
<UncontrolledTooltip data-testid="seen-user-info-tooltip" placement="top" target="btn-seen-user" fade={false}>
<UncontrolledTooltip data-testid="seen-user-info-tooltip" target="btn-seen-user" fade={false}>
{t('tooltip.footprints')}
</UncontrolledTooltip>
</div>
Expand Down
5 changes: 3 additions & 2 deletions apps/app/src/components/PageControls/SubscribeButton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { FC, useCallback } from 'react';
import type { FC } from 'react';
import React, { useCallback } from 'react';

import { SubscriptionStatusType } from '@growi/core';
import { useTranslation } from 'next-i18next';
Expand Down Expand Up @@ -41,7 +42,7 @@ const SubscribeButton: FC<Props> = (props: Props) => {
</span>
</button>

<UncontrolledTooltip data-testid="subscribe-button-tooltip" placement="top" target="subscribe-button" fade={false}>
<UncontrolledTooltip data-testid="subscribe-button-tooltip" target="subscribe-button" fade={false}>
{t(getTooltipMessage())}
</UncontrolledTooltip>
</>
Expand Down
3 changes: 3 additions & 0 deletions apps/app/src/styles/atoms/_tooltip.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.tooltip {
pointer-events: none;
}
1 change: 1 addition & 0 deletions apps/app/src/styles/style-app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
@import 'atoms/custom_control';
@import 'atoms/code';
@import 'atoms/tag';
@import 'atoms/tooltip';

// molecules
@import 'molecules/toastr';
Expand Down