]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-22218 Rename props to match the new API
authorJeremy Davis <jeremy.davis@sonarsource.com>
Wed, 22 May 2024 10:12:50 +0000 (12:12 +0200)
committersonartech <sonartech@sonarsource.com>
Mon, 27 May 2024 20:02:41 +0000 (20:02 +0000)
88 files changed:
server/sonar-web/design-system/src/components/Breadcrumbs.tsx
server/sonar-web/design-system/src/components/BubbleChart.tsx
server/sonar-web/design-system/src/components/ColorsLegend.tsx
server/sonar-web/design-system/src/components/DropdownMenu.tsx
server/sonar-web/design-system/src/components/FacetBox.tsx
server/sonar-web/design-system/src/components/FavoriteButton.tsx
server/sonar-web/design-system/src/components/Histogram.tsx
server/sonar-web/design-system/src/components/NavBarTabs.tsx
server/sonar-web/design-system/src/components/Tags.tsx
server/sonar-web/design-system/src/components/Tooltip.tsx
server/sonar-web/design-system/src/components/TreeMapRect.tsx
server/sonar-web/design-system/src/components/__tests__/DropdownMenu-test.tsx
server/sonar-web/design-system/src/components/__tests__/Tooltip-test.tsx
server/sonar-web/design-system/src/components/clipboard.tsx
server/sonar-web/design-system/src/components/code-line/LineCoverage.tsx
server/sonar-web/design-system/src/components/input/MultiSelectMenuOption.tsx
server/sonar-web/design-system/src/sonar-aligned/components/buttons/ButtonPrimary.tsx
server/sonar-web/design-system/src/sonar-aligned/components/buttons/ButtonSecondary.tsx
server/sonar-web/design-system/src/sonar-aligned/components/buttons/DangerButtonPrimary.tsx
server/sonar-web/design-system/src/sonar-aligned/components/buttons/DangerButtonSecondary.tsx
server/sonar-web/design-system/src/sonar-aligned/components/buttons/ThirdPartyButton.tsx
server/sonar-web/src/main/js/app/components/global-search/GlobalSearch.tsx
server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUser.tsx
server/sonar-web/src/main/js/apps/account/projects/ProjectCard.tsx
server/sonar-web/src/main/js/apps/background-tasks/components/StatPendingCount.tsx
server/sonar-web/src/main/js/apps/background-tasks/components/Workers.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/BulkChange.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeaderMeta.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsIssues.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx
server/sonar-web/src/main/js/apps/component-measures/components/LeakPeriodLegend.tsx
server/sonar-web/src/main/js/apps/component-measures/components/MeasureHeader.tsx
server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectSelectionForm.tsx
server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx
server/sonar-web/src/main/js/apps/marketplace/components/PluginActions.tsx
server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLogItem.tsx
server/sonar-web/src/main/js/apps/marketplace/components/PluginLicense.tsx
server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdateButton.tsx
server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdateItem.tsx
server/sonar-web/src/main/js/apps/overview/branches/BranchMetaTopBar.tsx
server/sonar-web/src/main/js/apps/projectActivity/components/Event.tsx
server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.tsx
server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.tsx
server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaQualityProfiles.tsx
server/sonar-web/src/main/js/apps/projectNewCode/components/BranchListRow.tsx
server/sonar-web/src/main/js/apps/projectNewCode/components/NewCodeDefinitionSettingReferenceBranch.tsx
server/sonar-web/src/main/js/apps/projects/components/PageHeader.tsx
server/sonar-web/src/main/js/apps/projects/components/ProjectsSortingSelect.tsx
server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCard.tsx
server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardLanguages.tsx
server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/BuiltInQualityGateBadge.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/List.tsx
server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonForm.tsx
server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultActivation.tsx
server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultDeactivation.tsx
server/sonar-web/src/main/js/apps/quality-profiles/components/BuiltInQualityProfileBadge.tsx
server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListRow.tsx
server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeaderRightSection.tsx
server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSidebarHeader.tsx
server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSimpleList.tsx
server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusReviewButton.tsx
server/sonar-web/src/main/js/apps/settings/components/DefinitionDescription.tsx
server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionBox.tsx
server/sonar-web/src/main/js/apps/settings/components/almIntegration/CreationTooltip.tsx
server/sonar-web/src/main/js/apps/system/components/info-items/HealthItem.tsx
server/sonar-web/src/main/js/apps/web-api/components/DeprecatedBadge.tsx
server/sonar-web/src/main/js/apps/web-api/components/InternalBadge.tsx
server/sonar-web/src/main/js/apps/webhooks/components/PageActions.tsx
server/sonar-web/src/main/js/components/SourceViewer/components/LineDuplicationBlock.tsx
server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesIndicator.tsx
server/sonar-web/src/main/js/components/SourceViewer/components/LineSCM.tsx
server/sonar-web/src/main/js/components/activity-graph/EventInner.tsx
server/sonar-web/src/main/js/components/activity-graph/GraphsLegendCustom.tsx
server/sonar-web/src/main/js/components/activity-graph/GraphsLegendItem.tsx
server/sonar-web/src/main/js/components/common/DisableableSelectOption.tsx
server/sonar-web/src/main/js/components/common/PrivacyBadgeContainer.tsx
server/sonar-web/src/main/js/components/controls/Favorite.tsx
server/sonar-web/src/main/js/components/controls/HomePageSelect.tsx
server/sonar-web/src/main/js/components/controls/Tooltip.tsx
server/sonar-web/src/main/js/components/embed-docs-modal/EmbedDocsPopupHelper.tsx
server/sonar-web/src/main/js/components/issue/components/IssueMetaBar.tsx
server/sonar-web/src/main/js/components/issue/components/SonarLintBadge.tsx
server/sonar-web/src/main/js/components/permissions/PermissionHeader.tsx
server/sonar-web/src/main/js/components/workspace/WorkspaceHeader.tsx
server/sonar-web/src/main/js/sonar-aligned/components/controls/DocHelpTooltip.tsx
server/sonar-web/src/main/js/sonar-aligned/components/controls/HelpTooltip.tsx

index bb30a36052b05b83c1c06b8f406e11617a5d7c1c..5d981c9ce6547d5d5ec138e8a350806abae55546 100644 (file)
@@ -117,9 +117,9 @@ export function Breadcrumbs(props: Props) {
       if (isLastBreadcrumb && breadcrumbSize > maxWidth) {
         onlyVisibleBreadcrumbs.push(
           <Tooltip
-            key={modifiedChildren[index].key}
             // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
-            overlay={modifiedChildren[index].props.children as React.ReactNode}
+            content={modifiedChildren[index].props.children as React.ReactNode}
+            key={modifiedChildren[index].key}
           >
             {modifiedChildren[index]}
           </Tooltip>,
index 61bdbd22b867d56739fd6a0660a65de93e33e739..108527dbb93fce4392629ccfe23010068813bdab 100644 (file)
@@ -365,7 +365,7 @@ export function BubbleChart<T>(props: BubbleChartProps<T>) {
   return (
     <div>
       <div className="sw-flex sw-items-center sw-justify-end sw-h-control sw-mb-4">
-        <Tooltip overlay={zoomTooltipText}>
+        <Tooltip content={zoomTooltipText}>
           <span>
             <Note className="sw-body-sm-highlight">{zoomLabel}</Note>
             {': '}
@@ -423,7 +423,7 @@ function Bubble<T>(props: BubbleProps<T>) {
     </a>
   );
 
-  return <Tooltip overlay={tooltip}>{circle}</Tooltip>;
+  return <Tooltip content={tooltip}>{circle}</Tooltip>;
 }
 
 const BubbleStyled = styled.circle`
index 19abcdc298b251f1f99ec44e1a7738fb09251b4a..43f7c415241db652f97db80ca2f87bc903e3b2e4 100644 (file)
@@ -49,7 +49,7 @@ export function ColorsLegend(props: ColorLegendProps) {
     <ColorsLegendWrapper className={className}>
       {colors.map((color, idx) => (
         <li className="sw-ml-4" key={color.value}>
-          <Tooltip overlay={color.overlay}>
+          <Tooltip content={color.overlay}>
             <div>
               <Checkbox
                 checked={color.selected}
index 162b11f9c0b48840a94aa68dbeff473ed62939c8..335f28f434e4e3deb810903bada6f757d495d86c 100644 (file)
@@ -213,7 +213,7 @@ export function ItemCopy(props: ItemCopyProps) {
   return (
     <ClipboardBase>
       {({ setCopyButton, copySuccess }) => (
-        <Tooltip overlay={tooltipOverlay} visible={copySuccess}>
+        <Tooltip content={tooltipOverlay} visible={copySuccess}>
           <li role="none">
             <ItemButtonStyled
               className={className}
index 8b13dc4cac89e3498ba11cdebe5b58b886f57a2d..792eb2731232f77d77bceedf98723464d4c69277 100644 (file)
@@ -50,7 +50,7 @@ export interface FacetBoxProps {
   onClear?: () => void;
   onClick?: (isOpen: boolean) => void;
   open?: boolean;
-  tooltipComponent?: React.ComponentType<React.PropsWithChildren<{ overlay: React.ReactNode }>>;
+  tooltipComponent?: React.ComponentType<React.PropsWithChildren<{ content: React.ReactNode }>>;
 }
 
 export function FacetBox(props: FacetBoxProps) {
@@ -105,7 +105,7 @@ export function FacetBox(props: FacetBoxProps) {
           {expandable && <OpenCloseIndicator aria-hidden open={open} />}
 
           {disabled ? (
-            <Tooltip overlay={disabledHelper}>
+            <Tooltip content={disabledHelper}>
               <HeaderTitle
                 aria-disabled
                 aria-label={`${name}, ${disabledHelper ?? ''}`}
@@ -130,7 +130,7 @@ export function FacetBox(props: FacetBoxProps) {
             </Badge>
 
             {Boolean(clearable) && (
-              <Tooltip overlay={clearIconLabel}>
+              <Tooltip content={clearIconLabel}>
                 <ClearIcon
                   Icon={CloseIcon}
                   aria-label={clearIconLabel ?? ''}
index 5782c37de92944d2817688ff38593e57f494c5af..ef31b04fcb7b920400bcab1ec66c906b30408a84 100644 (file)
@@ -28,7 +28,7 @@ interface Props {
   innerRef?: React.Ref<HTMLButtonElement>;
   overlay: string;
   toggleFavorite: VoidFunction;
-  tooltip?: React.ComponentType<React.PropsWithChildren<{ overlay: React.ReactNode }>>;
+  tooltip?: React.ComponentType<React.PropsWithChildren<{ content: React.ReactNode }>>;
 }
 
 export function FavoriteButton(props: Props) {
@@ -36,7 +36,7 @@ export function FavoriteButton(props: Props) {
   const Tooltip = tooltip ?? React.Fragment;
 
   return (
-    <Tooltip overlay={overlay}>
+    <Tooltip content={overlay}>
       <InteractiveIcon
         Icon={favorite ? StarFillIcon : StarIcon}
         aria-label={overlay}
index 197cc263d283249e8d8879fa13b13768e02cf3b7..b054114ef41dabb47afd465e445bb5947876853a 100644 (file)
@@ -67,7 +67,7 @@ export class Histogram extends React.PureComponent<Props> {
     const y = Math.round((yScale(index) ?? 0) + yScale.bandwidth() / 2 + BAR_HEIGHT / 2);
 
     return (
-      <Tooltip overlay={this.props.yTooltips && this.props.yTooltips[index]}>
+      <Tooltip content={this.props.yTooltips && this.props.yTooltips[index]}>
         <HistogramTick dx="1em" dy="0.3em" textAnchor="start" x={x} y={y}>
           {value}
         </HistogramTick>
index ab3286ec0cfbfbde020afea5002123a1262ada14..590cb913605785e2592c188455f9eeb9a4fa3778 100644 (file)
@@ -75,7 +75,7 @@ export function NavBarTabLink(props: NavBarTabLinkProps) {
 export function DisabledTabLink(props: { label: string; overlay: React.ReactNode }) {
   return (
     <NavBarTabLinkWrapper>
-      <Tooltip overlay={props.overlay}>
+      <Tooltip content={props.overlay}>
         <a aria-disabled="true" className="disabled-link" role="link">
           {props.label}
         </a>
index 3444f6af034ab87b6ae1c11a9a44d6c2bef1cb77..9fd333135b6089b62d3bfd16766cdb09f11d943e 100644 (file)
@@ -40,7 +40,7 @@ interface Props {
   tags: string[];
   tagsClassName?: string;
   tagsToDisplay?: number;
-  tooltip?: React.ComponentType<React.PropsWithChildren<{ overlay: React.ReactNode }>>;
+  tooltip?: React.ComponentType<React.PropsWithChildren<{ content: React.ReactNode }>>;
 }
 
 export function Tags({
@@ -63,7 +63,7 @@ export function Tags({
   const Tooltip = tooltip || React.Fragment;
 
   const displayedTagsContent = (open = false) => (
-    <Tooltip overlay={open ? undefined : tags.join(', ')}>
+    <Tooltip content={open ? undefined : tags.join(', ')}>
       <span className="sw-inline-flex sw-items-center sw-gap-1">
         {/* Display first 3 (tagsToDisplay) tags */}
         {displayedTags.map((tag) => (
index 053c54d9033080e3f09e330be7cff2bd3a89348c..bf17f07979f2bf540ef5a9ffdbe3cf5f83942b3e 100644 (file)
@@ -37,11 +37,11 @@ const MILLISECONDS_IN_A_SECOND = 1000;
 
 interface TooltipProps {
   children: React.ReactElement;
+  content: React.ReactNode;
   mouseEnterDelay?: number;
   mouseLeaveDelay?: number;
   onHide?: VoidFunction;
   onShow?: VoidFunction;
-  overlay: React.ReactNode;
   placement?: BasePlacement;
   visible?: boolean;
 }
@@ -84,7 +84,7 @@ export function Tooltip(props: TooltipProps) {
   // overlay is a ReactNode, so it can be a boolean, `undefined` or `null`
   // this allows to easily render a tooltip conditionally
   // more generaly we avoid rendering empty tooltips
-  return props.overlay ? <TooltipInner {...props}>{props.children}</TooltipInner> : props.children;
+  return props.content ? <TooltipInner {...props}>{props.children}</TooltipInner> : props.children;
 }
 
 export class TooltipInner extends React.Component<TooltipProps, State> {
@@ -404,7 +404,7 @@ export class TooltipInner extends React.Component<TooltipProps, State> {
               role="tooltip"
               style={style}
             >
-              <TooltipWrapperInner>{this.props.overlay}</TooltipWrapperInner>
+              <TooltipWrapperInner>{this.props.content}</TooltipWrapperInner>
               <TooltipWrapperArrow
                 style={
                   isMeasured(this.state)
index 066d861f1c69531f83283db1e5b98d0c999362d2..45ece8b7fe582dbe1f38946848ddec29e2de9250 100644 (file)
@@ -83,7 +83,7 @@ export function TreeMapRect(props: Props) {
   const isIconVisible = width >= ICON_VISIBLE_AT_WIDTH && height >= ICON_VISIBLE_AT_HEIGHT;
 
   return (
-    <Tooltip overlay={tooltip} placement={placement ?? PopupPlacement.Left}>
+    <Tooltip content={tooltip} placement={placement ?? PopupPlacement.Left}>
       <StyledCell style={cellStyles}>
         <StyledCellLink href="#" onClick={handleRectClick}>
           <StyledCellLabel width={width}>
index 5e2aebceb65226e885d9d776be4570f5cc004cde..8f855b319b269e3641f4978ccdeca28cec8f66d7 100644 (file)
@@ -43,7 +43,7 @@ it('should render a full menu correctly', () => {
 
 it('menu items should work with tooltips', async () => {
   render(
-    <Tooltip overlay="test tooltip">
+    <Tooltip content="test tooltip">
       <ItemButton onClick={jest.fn()}>button</ItemButton>
     </Tooltip>,
     {},
index 487d1bbf5cfdd1969c825642fa86bb0ece39db12..2d0882b1c3fef130236c3aa2365a4f0bfe995867 100644 (file)
@@ -96,7 +96,7 @@ describe('TooltipInner', () => {
     children = <div role="note" />,
   ) {
     return render(
-      <TooltipInner mouseLeaveDelay={0} overlay={<span id="overlay" />} {...props}>
+      <TooltipInner content={<span id="overlay" />} mouseLeaveDelay={0} {...props}>
         {children}
       </TooltipInner>,
     );
@@ -105,19 +105,19 @@ describe('TooltipInner', () => {
 
 describe('Tooltip', () => {
   it('should not render tooltip without overlay', async () => {
-    const { user } = setupWithProps({ overlay: undefined });
+    const { user } = setupWithProps({ content: undefined });
     await user.hover(screen.getByRole('note'));
     expect(screen.queryByRole('tooltip')).not.toBeInTheDocument();
   });
 
   it('should not render undefined tooltips', async () => {
-    const { user } = setupWithProps({ overlay: undefined, visible: true });
+    const { user } = setupWithProps({ content: undefined, visible: true });
     await user.hover(screen.getByRole('note'));
     expect(screen.queryByRole('tooltip')).not.toBeInTheDocument();
   });
 
   it('should not render empty tooltips', async () => {
-    const { user } = setupWithProps({ overlay: '', visible: true });
+    const { user } = setupWithProps({ content: '', visible: true });
     await user.hover(screen.getByRole('note'));
     expect(screen.queryByRole('tooltip')).not.toBeInTheDocument();
   });
@@ -127,7 +127,7 @@ describe('Tooltip', () => {
     children = <div role="note" />,
   ) {
     return render(
-      <Tooltip overlay={<span id="overlay" />} {...props}>
+      <Tooltip content={<span id="overlay" />} {...props}>
         {children}
       </Tooltip>,
     );
index a5c30188f6bae33352165625552a3758622e5b80..ffe88b4a0452fb0e4844d3786a5f2b90e5769636 100644 (file)
@@ -116,12 +116,12 @@ export function ClipboardButton({
   return (
     <ClipboardBase>
       {({ setCopyButton, copySuccess }) => (
-        <Tooltip overlay={copiedLabel} visible={copySuccess}>
+        <Tooltip content={copiedLabel} visible={copySuccess}>
           <ButtonSecondary
             className={classNames('sw-select-none', className)}
             data-clipboard-text={copyValue}
             icon={icon}
-            innerRef={setCopyButton}
+            ref={setCopyButton}
           >
             {children ?? copyLabel}
           </ButtonSecondary>
@@ -159,12 +159,12 @@ export function ClipboardIconButton(props: IconButtonProps) {
       {({ setCopyButton, copySuccess }) => {
         return (
           <Tooltip
-            mouseEnterDelay={INTERACTIVE_TOOLTIP_DELAY}
-            overlay={
+            content={
               <div className="sw-w-abs-150 sw-text-center">
                 {copySuccess ? copiedLabel : copyLabel}
               </div>
             }
+            mouseEnterDelay={INTERACTIVE_TOOLTIP_DELAY}
             {...(copySuccess ? { visible: copySuccess } : undefined)}
           >
             <InteractiveIconComponent
index 718c040d8740b6c81145057ca3c5d1b42907575f..35e60f2a6b202f7369d599e56d0c228bbb5dc630 100644 (file)
@@ -50,7 +50,7 @@ function LineCoverageFunc({ lineNumber, coverageStatus, status, scrollToUncovere
   }
 
   return (
-    <Tooltip overlay={status} placement={PopupPlacement.Right}>
+    <Tooltip content={status} placement={PopupPlacement.Right}>
       <LineMeta data-line-number={lineNumber} ref={coverageMarker}>
         {coverageStatus === 'covered' && <CoveredBlock aria-label={status} />}
         {coverageStatus === 'uncovered' && <UncoveredBlock aria-label={status} />}
index 2df004a3c6afffe72c625af27d6d74c8371b1758..2336dd914a3d6b7233aa04ee2deefaa0c892dedf 100644 (file)
@@ -56,7 +56,7 @@ export function MultiSelectMenuOption(props: MultiSelectOptionProps) {
   const label = renderLabel(element);
 
   return (
-    <Tooltip overlay={renderTooltip?.(element, disabled)} placement={PopupPlacement.Right}>
+    <Tooltip content={renderTooltip?.(element, disabled)} placement={PopupPlacement.Right}>
       <ItemCheckbox
         checked={Boolean(selected)}
         className={classNames('sw-flex sw-py-2 sw-px-4', { active })}
index a3355135482516039518ac19d0403a007cdf2e10..8931442ebc9f9a291354a04d33fc0b48c469e5f2 100644 (file)
@@ -21,7 +21,7 @@ import { css } from '@emotion/react';
 import styled from '@emotion/styled';
 import { OPACITY_20_PERCENT, themeBorder, themeColor, themeContrast } from '../../../helpers';
 import { ThemedProps } from '../../../types';
-import { Button, ButtonProps } from './Button';
+import { Button } from './Button';
 
 export const PrimaryStyle = (props: ThemedProps) => css`
   --background: ${themeColor('button')(props)};
@@ -31,6 +31,6 @@ export const PrimaryStyle = (props: ThemedProps) => css`
   --border: ${themeBorder('default', 'transparent')(props)};
 `;
 
-export const ButtonPrimary: React.FC<React.PropsWithChildren<ButtonProps>> = styled(Button)`
+export const ButtonPrimary = styled(Button)`
   ${PrimaryStyle}
 `;
index 3ee6c5f28924367459043dedc6eeef148a5070b9..f513c5f803ac970bf230aafebb0c9de03d44861c 100644 (file)
@@ -19,9 +19,9 @@
  */
 import styled from '@emotion/styled';
 import { OPACITY_20_PERCENT, themeBorder, themeColor, themeContrast } from '../../../helpers';
-import { Button, ButtonProps } from './Button';
+import { Button } from './Button';
 
-export const ButtonSecondary: React.FC<React.PropsWithChildren<ButtonProps>> = styled(Button)`
+export const ButtonSecondary = styled(Button)`
   --background: ${themeColor('buttonSecondary')};
   --backgroundHover: ${themeColor('buttonSecondaryHover')};
   --color: ${themeContrast('buttonSecondary')};
index b0770cdfce181c87c039fa93eaaaa8fc88730cc4..ca701d8944e5756338b7f4f40923c14bdd8164a8 100644 (file)
@@ -19,9 +19,9 @@
  */
 import styled from '@emotion/styled';
 import { OPACITY_20_PERCENT, themeBorder, themeColor, themeContrast } from '../../../helpers';
-import { Button, ButtonProps } from './Button';
+import { Button } from './Button';
 
-export const DangerButtonPrimary: React.FC<React.PropsWithChildren<ButtonProps>> = styled(Button)`
+export const DangerButtonPrimary = styled(Button)`
   --background: ${themeColor('dangerButton')};
   --backgroundHover: ${themeColor('dangerButtonHover')};
   --color: ${themeContrast('dangerButton')};
index 8815ab12de9775684b679921976ace3e8d6bf8b2..81cfc90010b965212e6e3ddbc52b27c624b6148d 100644 (file)
@@ -19,9 +19,9 @@
  */
 import styled from '@emotion/styled';
 import { OPACITY_20_PERCENT, themeBorder, themeColor, themeContrast } from '../../../helpers';
-import { Button, ButtonProps } from './Button';
+import { Button } from './Button';
 
-export const DangerButtonSecondary: React.FC<React.PropsWithChildren<ButtonProps>> = styled(Button)`
+export const DangerButtonSecondary = styled(Button)`
   --background: ${themeColor('dangerButtonSecondary')};
   --backgroundHover: ${themeColor('dangerButtonSecondaryHover')};
   --color: ${themeContrast('dangerButtonSecondary')};
index 9239e4ab209cc3124f856fca0bb8512bbb5c8001..afc27b57f1c6886ddde3bc63988255d1de5b0a98 100644 (file)
@@ -18,7 +18,6 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import styled from '@emotion/styled';
-import React from 'react';
 import { OPACITY_20_PERCENT } from '../../../helpers/constants';
 import { themeBorder, themeColor, themeContrast } from '../../../helpers/theme';
 import { Button, ButtonProps } from './Button';
@@ -43,7 +42,7 @@ export function ThirdPartyButton({
   );
 }
 
-const ThirdPartyButtonStyled: React.FC<React.PropsWithChildren<ButtonProps>> = styled(Button)`
+const ThirdPartyButtonStyled = styled(Button)`
   --background: ${themeColor('thirdPartyButton')};
   --backgroundHover: ${themeColor('thirdPartyButtonHover')};
   --color: ${themeContrast('thirdPartyButton')};
index 7e849acf4ea96ec4c442cc30347101514d2afe05..22f2a8856b34c3dc3f584b25a38a6f3ec8892857 100644 (file)
@@ -420,7 +420,7 @@ export class GlobalSearch extends React.PureComponent<Props, State> {
     return (
       <form role="search">
         {!open && !query ? (
-          <Tooltip mouseEnterDelay={INTERACTIVE_TOOLTIP_DELAY} overlay={translate('search_verb')}>
+          <Tooltip mouseEnterDelay={INTERACTIVE_TOOLTIP_DELAY} content={translate('search_verb')}>
             <InteractiveIcon
               className="it__search-icon"
               Icon={MenuSearchIcon}
index 66317b37cccf406aa20b04add25f61067bd0d538..e9d95f3a2bf41c7cbb3d7057fa25840dcc73a9d1 100644 (file)
@@ -69,7 +69,7 @@ export function GlobalNavUser() {
       {({ a11yAttrs: { role, ...a11yAttrs }, onToggleClick, open }) => (
         <Tooltip
           mouseEnterDelay={0.2}
-          overlay={!open ? translate('global_nav.account.tooltip') : undefined}
+          content={!open ? translate('global_nav.account.tooltip') : undefined}
         >
           <BareButton
             aria-label={translate('global_nav.account.tooltip')}
index a2279d8b63260f330eac01683fc6715f49a34acb..c528eaf085a8e4b37decb1e9642eece492070a88 100644 (file)
@@ -77,7 +77,7 @@ export default function ProjectCard({ project }: Readonly<Props>) {
 
         {project.qualityGate !== undefined && (
           <div>
-            <Tooltip overlay={qualityGateLabel}>
+            <Tooltip content={qualityGateLabel}>
               <span className="sw-flex sw-items-center">
                 <QualityGateIndicator
                   status={(project.qualityGate as Status) ?? 'NONE'}
index c04ec1b0f0397112290bcb45d4765f71da922b60..129f1d84c68d8e76a80a7047a06ce022892feb73 100644 (file)
@@ -50,7 +50,7 @@ function StatPendingCount({ appState, onCancelAllPending, pendingCount }: Readon
           onConfirm={onCancelAllPending}
         >
           {({ onClick }) => (
-            <Tooltip overlay={translate('background_tasks.cancel_all_tasks')}>
+            <Tooltip content={translate('background_tasks.cancel_all_tasks')}>
               <DestructiveIcon
                 aria-label={translate('background_tasks.cancel_all_tasks')}
                 className="sw-ml-1"
index cfab3673035b1a4b50f3ad0fda8779395262e575..5f51fe69c0c20a7598233f9bff4260737b70a957 100644 (file)
@@ -92,7 +92,7 @@ export default class Workers extends React.PureComponent<{}, State> {
     return (
       <div className="sw-flex sw-items-center">
         {!loading && workerCount > 1 && (
-          <Tooltip overlay={translate('background_tasks.number_of_workers.warning')}>
+          <Tooltip content={translate('background_tasks.number_of_workers.warning')}>
             <div className="sw-py-1/2 sw-mr-1">
               <FlagWarningIcon />
             </div>
@@ -108,7 +108,7 @@ export default class Workers extends React.PureComponent<{}, State> {
         </Spinner>
 
         {!loading && canSetWorkerCount && (
-          <Tooltip overlay={translate('background_tasks.change_number_of_workers')}>
+          <Tooltip content={translate('background_tasks.change_number_of_workers')}>
             <InteractiveIcon
               Icon={PencilIcon}
               aria-label={translate('background_tasks.change_number_of_workers')}
index 83d32a57f152bd587925a6c8b957044e42e07f80..9eb641e5e1cb9a2d949619863108b7f09c6735f6 100644 (file)
@@ -80,7 +80,7 @@ export default class BulkChange extends React.PureComponent<Props, State> {
     );
     if (!canBulkChange) {
       return (
-        <Tooltip overlay={translate('coding_rules.can_not_bulk_change')}>
+        <Tooltip content={translate('coding_rules.can_not_bulk_change')}>
           <ButtonPrimary disabled>{translate('bulk_change')}</ButtonPrimary>
         </Tooltip>
       );
index 846377823ddb02c496e37633634209b20eed5b64..f89b77de11be4c7482a8f2cedd2770c9f4a2680c 100644 (file)
@@ -43,7 +43,7 @@ export default function RuleDetailsHeaderMeta(props: Readonly<Props>) {
       {!ruleDetails.isExternal && ruleDetails.isTemplate && (
         <>
           <li>
-            <Tooltip overlay={translate('coding_rules.rule_template.title')}>
+            <Tooltip content={translate('coding_rules.rule_template.title')}>
               <span className="it__coding-rules-detail-property">
                 {translate('coding_rules.rule_template')}
               </span>
@@ -117,7 +117,7 @@ export default function RuleDetailsHeaderMeta(props: Readonly<Props>) {
           <SeparatorCircleIcon aria-hidden as="li" />
           <li>
             <Tooltip
-              overlay={translateWithParameters(
+              content={translateWithParameters(
                 'coding_rules.external_rule.engine_tooltip',
                 externalEngine,
               )}
@@ -141,7 +141,7 @@ export default function RuleDetailsHeaderMeta(props: Readonly<Props>) {
         <>
           <SeparatorCircleIcon aria-hidden as="li" />
           <li>
-            <Tooltip overlay={translate('status')}>
+            <Tooltip content={translate('status')}>
               <Note data-meta="status">
                 <Badge variant="deleted">{translate('rules.status', ruleDetails.status)}</Badge>
               </Note>
index c09f2c8b9c01ab0b683d94ed56e9f0863b53bbf8..a4080ff26eef25967c2a5c1c48417e90bc3c6c99 100644 (file)
@@ -155,7 +155,7 @@ export class RuleDetailsIssues extends React.PureComponent<Props, State> {
     }
 
     return (
-      <Tooltip overlay={translate('coding_rules.issues.only_main_branches')}>{totalItem}</Tooltip>
+      <Tooltip content={translate('coding_rules.issues.only_main_branches')}>{totalItem}</Tooltip>
     );
   };
 
index 394220d35a6cb4b247ec263424f0a3dd5a46667e..81aba54fac13bd59c124eb935c82e97ad384f5eb 100644 (file)
@@ -107,7 +107,7 @@ export default class RuleListItem extends React.PureComponent<Props> {
       <div className="sw-mr-2 sw-shrink-0">
         {activation.inherit === 'OVERRIDES' && (
           <Tooltip
-            overlay={translateWithParameters(
+            content={translateWithParameters(
               'coding_rules.overrides',
               selectedProfile.name,
               selectedProfile.parentName,
@@ -118,7 +118,7 @@ export default class RuleListItem extends React.PureComponent<Props> {
         )}
         {activation.inherit === 'INHERITED' && (
           <Tooltip
-            overlay={translateWithParameters(
+            content={translateWithParameters(
               'coding_rules.inherits',
               selectedProfile.name,
               selectedProfile.parentName,
@@ -142,7 +142,7 @@ export default class RuleListItem extends React.PureComponent<Props> {
     if (selectedProfile.isBuiltIn && canCopy) {
       return (
         <div className="sw-ml-4">
-          <Tooltip overlay={translate('coding_rules.need_extend_or_copy')}>
+          <Tooltip content={translate('coding_rules.need_extend_or_copy')}>
             <DangerButtonSecondary disabled>
               {translate('coding_rules', activation ? 'deactivate' : 'activate')}
             </DangerButtonSecondary>
@@ -173,7 +173,7 @@ export default class RuleListItem extends React.PureComponent<Props> {
               )}
             </ConfirmButton>
           ) : (
-            <Tooltip overlay={translate('coding_rules.can_not_deactivate')}>
+            <Tooltip content={translate('coding_rules.can_not_deactivate')}>
               <DangerButtonSecondary disabled>
                 {translate('coding_rules.deactivate')}
               </DangerButtonSecondary>
@@ -271,7 +271,7 @@ export default class RuleListItem extends React.PureComponent<Props> {
                 <>
                   <SeparatorCircleIcon aria-hidden as="li" />
                   <li>
-                    <Tooltip overlay={translate('coding_rules.rule_template.title')}>
+                    <Tooltip content={translate('coding_rules.rule_template.title')}>
                       <span>
                         <Badge>{translate('coding_rules.rule_template')}</Badge>
                       </span>
index 34492842e8ee3abbfa6ee3071ea3c28fe2e59c24..4fb5f84627802923fe1b9f7a10fe6126cb99249d 100644 (file)
@@ -86,7 +86,7 @@ class LeakPeriodLegend extends React.PureComponent<LeakPeriodLegendProps & Wrapp
       </div>
     );
 
-    return <Tooltip overlay={tooltip}>{label}</Tooltip>;
+    return <Tooltip content={tooltip}>{label}</Tooltip>;
   }
 }
 
index aaed001569ca2330c95de0488545ae1c368497d4..59bea826a7109d75ed33cd9614468767d4634cb4 100644 (file)
@@ -72,7 +72,7 @@ export default function MeasureHeader(props: Readonly<Props>) {
           </div>
 
           {!isDiff && hasHistory && (
-            <Tooltip overlay={translate('component_measures.show_metric_history')}>
+            <Tooltip content={translate('component_measures.show_metric_history')}>
               <span className="sw-ml-4">
                 <LinkStandalone
                   className="it__show-history-link sw-font-semibold"
index 9484caabda856f5d32039a881a2c2baa47c3aee1..b5b5d2cedd0c1ef6f76620d9a095cdf7d176db49 100644 (file)
@@ -100,12 +100,12 @@ export default function GitlabProjectSelectionForm(
               sqProjectKey={project.sqProjectKey}
               onImport={props.onImport}
               primaryTextNode={
-                <Tooltip overlay={project.slug}>
+                <Tooltip content={project.slug}>
                   <span>{project.name}</span>
                 </Tooltip>
               }
               secondaryTextNode={
-                <Tooltip overlay={project.pathSlug}>
+                <Tooltip content={project.pathSlug}>
                   <span>{project.pathName}</span>
                 </Tooltip>
               }
index f4925ec2e623cf389bd7ee3a84f2181ea3e638c6..3ba705f36a25589cb0892f4d60199aa1754657e8 100644 (file)
@@ -965,7 +965,7 @@ export class App extends React.PureComponent<Props, State> {
         <ButtonSecondary
           disabled={checked.length === 0}
           id="issues-bulk-change"
-          innerRef={this.bulkButtonRef}
+          ref={this.bulkButtonRef}
           onClick={this.handleOpenBulkChange}
         >
           {this.getButtonLabel(checked, checkAll, paging)}
index b0ea8e15593bcab48b8074ab39e1e8098cd07569..1a4d7c0b87c397bb3119eeaee504a9cf3f623c5f 100644 (file)
@@ -149,7 +149,7 @@ export default class PluginActions extends React.PureComponent<Props, State> {
                 />
               </div>
             ))}
-            <Tooltip overlay={translate('marketplace.requires_restart')}>
+            <Tooltip content={translate('marketplace.requires_restart')}>
               <DangerButtonSecondary disabled={loading} onClick={this.handleUninstall}>
                 {translate('marketplace.uninstall')}
               </DangerButtonSecondary>
@@ -157,7 +157,7 @@ export default class PluginActions extends React.PureComponent<Props, State> {
           </>
         )}
         {isAvailablePlugin(plugin) && (
-          <Tooltip overlay={translate('marketplace.requires_restart')}>
+          <Tooltip content={translate('marketplace.requires_restart')}>
             <ButtonSecondary
               disabled={
                 loading || (plugin.termsAndConditionsUrl != null && !this.state.acceptTerms)
index 1775cf6aebcebd8baab4a7b1943a3f4ef5a5e4ba..8e63e555798324acc2d0bd001b40e483785f972b 100644 (file)
@@ -38,7 +38,7 @@ export default function PluginChangeLogItem({ release, update }: Props) {
             {release.version}
           </Badge>
         ) : (
-          <Tooltip overlay={translate('marketplace.update_status', update.status)}>
+          <Tooltip content={translate('marketplace.update_status', update.status)}>
             <span>
               <Badge className="sw-mr-4">{release.version}</Badge>
             </span>
index aa5ac6ccacbe55b6538eadb493c8389c5accd7e9..67def352cc2a7a700f5f65117428f1290d02bc30 100644 (file)
@@ -33,7 +33,7 @@ export default function PluginLicense({ license }: Readonly<Props>) {
   }
   return (
     <ListItem>
-      <Tooltip overlay={license}>
+      <Tooltip content={license}>
         <div>
           <FormattedMessage
             id="marketplace.licensed_under_x"
index bfa202e0daf1cf592e783f34ad17b5a81c2479b9..d25f34030e5e939adfdd1f9e118885d34a8576f2 100644 (file)
@@ -40,7 +40,7 @@ export default function PluginUpdateButton(props: Readonly<Props>) {
     return null;
   }
   return (
-    <Tooltip overlay={translate('marketplace.requires_restart')}>
+    <Tooltip content={translate('marketplace.requires_restart')}>
       <ButtonSecondary disabled={disabled} onClick={handleClick}>
         {translateWithParameters('marketplace.update_to_x', update.release.version)}
       </ButtonSecondary>
index 9c6923f8bb2b1854c13d7b89053cb438d04673fc..fe90b7b6a9d5823e6ebc55aa4168a30cbbf4fa60 100644 (file)
@@ -37,7 +37,7 @@ export default function PluginUpdateItem({ release, update, pluginName }: Readon
         {update.status === 'COMPATIBLE' ? (
           <Badge variant="new">{release.version}</Badge>
         ) : (
-          <Tooltip overlay={translate('marketplace.update_status', update.status)}>
+          <Tooltip content={translate('marketplace.update_status', update.status)}>
             <span>
               <Badge>{release.version}</Badge>
             </span>
index 61ec2cbf3bc215a9d9967685fe4f8a22e1a70ca2..bd55e0a1313550dc46b0f72410889a8e0b333976 100644 (file)
@@ -78,7 +78,7 @@ export default function BranchMetaTopBar({
       <HomePageSelect currentPage={currentPage} type="button" />
       <ComponentReportActions component={component} branch={branch} />
       {showTakeTheTourButton && (
-        <Tooltip overlay={translate('overview.promoted_section.button_tooltip')}>
+        <Tooltip content={translate('overview.promoted_section.button_tooltip')}>
           <ButtonSecondary
             className="sw-pl-4 sw-shrink-0"
             data-spotlight-id="take-tour-1"
index 3dac2d41bdeef9446459f3b56c3cf8b2ccbd1e58..418cc66b740d073ee61f7e7a6fe76228df85c9cf 100644 (file)
@@ -52,7 +52,7 @@ function Event(props: Readonly<EventProps>) {
       {showActions && (
         <div className="sw-grow-0 sw-shrink-0 sw-ml-2">
           {canChange && (
-            <Tooltip overlay={translate('project_activity.events.tooltip.edit')}>
+            <Tooltip content={translate('project_activity.events.tooltip.edit')}>
               <InteractiveIcon
                 Icon={PencilIcon}
                 aria-label={translate('project_activity.events.tooltip.edit')}
@@ -64,7 +64,7 @@ function Event(props: Readonly<EventProps>) {
             </Tooltip>
           )}
           {canDelete && (
-            <Tooltip overlay={translate('project_activity.events.tooltip.delete')}>
+            <Tooltip content={translate('project_activity.events.tooltip.delete')}>
               <DestructiveIcon
                 Icon={TrashIcon}
                 aria-label={translate('project_activity.events.tooltip.delete')}
index 59d0ede66e8a2a7a3560eb6208fd60c94b024e7f..4afc148e25b43da6681db868189a418fdfde2916 100644 (file)
@@ -159,8 +159,8 @@ export default class ProjectActivityAnalysesList extends React.PureComponent<Pro
                 {translate('project_activity.new_code_period_start')}
               </span>
               <Tooltip
-                overlay={translate('project_activity.new_code_period_start.help')}
-                placement="top"
+                content={translate('project_activity.new_code_period_start.help')}
+                side="top"
               >
                 <HelperHintIcon className="sw-ml-1" />
               </Tooltip>
@@ -186,7 +186,7 @@ export default class ProjectActivityAnalysesList extends React.PureComponent<Pro
                 >
                   <Tooltip
                     mouseEnterDelay={0.5}
-                    overlay={`${translate('version')} ${version.version}`}
+                    content={`${translate('version')} ${version.version}`}
                   >
                     <Badge className="sw-p-1">{version.version}</Badge>
                   </Tooltip>
index 27223214eeefa1a96a030dd4759381bb4fb849dc..9d9ef2d832ef90e2344388aee5d00ba0b4660204 100644 (file)
@@ -101,7 +101,7 @@ function ProjectActivityAnalysis(props: ProjectActivityAnalysisProps) {
 
   return (
     <>
-      <Tooltip mouseEnterDelay={0.5} overlay={tooltipContent} placement="left">
+      <Tooltip mouseEnterDelay={0.5} content={tooltipContent} side="left">
         <ActivityAnalysisListItem
           className={classNames(
             'it__project-activity-analysis sw-flex sw-cursor-pointer sw-p-1 sw-relative',
@@ -205,10 +205,7 @@ function ProjectActivityAnalysis(props: ProjectActivityAnalysisProps) {
           <span className="sw-py-1/2 sw-px-1">
             {translate('project_activity.new_code_period_start')}
           </span>
-          <Tooltip
-            overlay={translate('project_activity.new_code_period_start.help')}
-            placement="top"
-          >
+          <Tooltip content={translate('project_activity.new_code_period_start.help')} side="top">
             <HelperHintIcon className="sw-ml-1" />
           </Tooltip>
         </BaselineMarker>
index dc94c4d0417bf746aa84c015025a011dea0be411..103b591e1887a73f17557885d71403e73e840df8 100644 (file)
@@ -99,7 +99,7 @@ function ProfileItem({
           {profile.deleted ? (
             <Tooltip
               key={profile.key}
-              overlay={translateWithParameters('overview.deleted_profile', profile.name)}
+              content={translateWithParameters('overview.deleted_profile', profile.name)}
             >
               <div className="project-info-deleted-profile">{profile.name}</div>
             </Tooltip>
@@ -119,7 +119,7 @@ function ProfileItem({
               {count > 0 && (
                 <Tooltip
                   key={profile.key}
-                  overlay={translateWithParameters('overview.deprecated_profile', count)}
+                  content={translateWithParameters('overview.deprecated_profile', count)}
                 >
                   <span className="sw-ml-6">
                     <Badge variant="deleted">{translate('deprecated')}</Badge>
index 8d0b663ed8bdbfcab05a116c40468158661cdd5d..79709380d5535a09289edd5123f678d25ed21d5d 100644 (file)
@@ -117,7 +117,7 @@ export default function BranchListRow(props: BranchListRowProps) {
         {branch.isMain && <Badge className="sw-ml-1">{translate('branches.main_branch')}</Badge>}
       </ContentCell>
       <ContentCell>
-        <Tooltip overlay={settingWarning}>
+        <Tooltip content={settingWarning}>
           <span>
             {settingWarning !== undefined && <FlagWarningIcon className="sw-mr-1" />}
             {branch.newCodePeriod
@@ -143,7 +143,7 @@ export default function BranchListRow(props: BranchListRowProps) {
             ariaLabel={translateWithParameters('branch_list.show_actions_for_x', branch.name)}
           >
             <Tooltip
-              overlay={
+              content={
                 isCompliant ? null : translate('project_baseline.compliance.warning.title.project')
               }
             >
index e3135885d3331ca2e8a1fc943b60f30beb9daa18..76fa8185cc54595a4c525458ece6fe55155f46f2 100644 (file)
@@ -56,7 +56,7 @@ function renderBranchOption(props: OptionProps<BranchOption, false>) {
     <components.Option {...props}>
       {option.isInvalid ? (
         <Tooltip
-          overlay={translateWithParameters(
+          content={translateWithParameters(
             'baseline.reference_branch.does_not_exist',
             option.value,
           )}
index 4f939c92d32d651a6aa14b68f6068db01727fb4a..7320eb30c822a712f5529f3c7748af55ddbf97b9 100644 (file)
@@ -58,7 +58,7 @@ export default function PageHeader(props: Props) {
       </div>
       <div className="sw-flex sw-justify-between">
         <div className="sw-flex sw-flex-1">
-          <Tooltip overlay={translate('projects.search')}>
+          <Tooltip content={translate('projects.search')}>
             <InputSearch
               className="sw-mr-4 it__page-header-search sw-max-w-abs-300 sw-flex-1"
               minLength={MIN_SEARCH_QUERY_LENGTH}
index a148fc75137b6136af9c45836fcbca30d95264f2..41e106aab5f975a7e1fc8a70cb234d187ad649bc 100644 (file)
@@ -117,7 +117,7 @@ export default class ProjectsSortingSelect extends React.PureComponent<Props> {
         />
         <Tooltip
           mouseLeaveDelay={1}
-          overlay={
+          content={
             sortDesc ? translate('projects.sort_descending') : translate('projects.sort_ascending')
           }
         >
index 9a2b27300cbede32ad529fd59b1a4ed929be21c8..d2e64fd147600f7c164577b3ee10f1ad9a5bf785 100644 (file)
@@ -99,7 +99,7 @@ function renderFirstLine(
 
           {qualifier === ComponentQualifier.Application && (
             <Tooltip
-              overlay={
+              content={
                 <span>
                   {translate('qualifier.APP')}
                   {measures.projects !== '' && (
@@ -117,14 +117,14 @@ function renderFirstLine(
             </Tooltip>
           )}
 
-          <Tooltip overlay={translate('visibility', visibility, 'description', qualifier)}>
+          <Tooltip content={translate('visibility', visibility, 'description', qualifier)}>
             <span>
               <Badge className="sw-ml-2">{translate('visibility', visibility)}</Badge>
             </span>
           </Tooltip>
 
           {awaitingScan && !isNewCode && !isEmpty(analysisDate) && measures.ncloc !== undefined && (
-            <Tooltip overlay={translate(`projects.awaiting_scan.description.${qualifier}`)}>
+            <Tooltip content={translate(`projects.awaiting_scan.description.${qualifier}`)}>
               <span>
                 <Badge variant="new" className="sw-ml-2">
                   {translate('projects.awaiting_scan')}
@@ -135,7 +135,7 @@ function renderFirstLine(
         </div>
 
         {isDefined(analysisDate) && analysisDate !== '' && (
-          <Tooltip overlay={qualityGateLabel}>
+          <Tooltip content={qualityGateLabel}>
             <span className="sw-flex sw-items-center">
               <QualityGateIndicator
                 status={(measures[MetricKey.alert_status] as Status) ?? 'NONE'}
index 8217c74c95abe30e1dfc0a5e57b36bdad0e42e32..a1596b0caff85b63a7cbe51afb43650941f4bf25 100644 (file)
@@ -59,7 +59,7 @@ export function ProjectCardLanguages({ className, distribution, languages }: Pro
     ) : null;
 
   return (
-    <Tooltip overlay={tooltip}>
+    <Tooltip content={tooltip}>
       <span className={className}>{languagesText}</span>
     </Tooltip>
   );
index 915cea831008e681b8f9e9f6ec3e94e081e44cca..8be3a04d3d54b529bff3c6e46859fca5a5624384 100644 (file)
@@ -61,7 +61,7 @@ export default function ProjectRow(props: Readonly<Props>) {
           highlight={LinkHighlight.CurrentColor}
           to={getComponentOverviewUrl(project.key, project.qualifier)}
         >
-          <Tooltip overlay={project.name} placement="left">
+          <Tooltip content={project.name} side="left">
             <span>{project.name}</span>
           </Tooltip>
         </LinkStandalone>
@@ -73,7 +73,7 @@ export default function ProjectRow(props: Readonly<Props>) {
         <PrivacyBadgeContainer qualifier={project.qualifier} visibility={project.visibility} />
       </ContentCell>
       <ContentCell className="it__project-row-text-cell">
-        <Tooltip overlay={project.key} placement="left">
+        <Tooltip content={project.key} side="left">
           <Note>{project.key}</Note>
         </Tooltip>
       </ContentCell>
index c3c91ffbec5ea3419d199bdec3fcb77c33bcaac5..0df69ce9ad439660846d047c97b1cf1d34fed1be 100644 (file)
@@ -28,7 +28,7 @@ interface Props {
 
 export default function BuiltInQualityGateBadge({ className }: Props) {
   return (
-    <Tooltip overlay={translate('quality_gates.built_in.help')}>
+    <Tooltip content={translate('quality_gates.built_in.help')}>
       <Badge className={className}>{translate('quality_gates.built_in')}</Badge>
     </Tooltip>
   );
index c55952d85d125795ff03d5827f0bb5b34b1e80f7..8087e5f2d42482b41e48c2781f7dbf6bab5d9205 100644 (file)
@@ -82,7 +82,7 @@ export default function DetailsHeader({ qualityGate }: Readonly<Props>) {
             )}
             {actions.copy && (
               <Tooltip
-                overlay={
+                content={
                   qualityGate.caycStatus === CaycStatus.NonCompliant
                     ? translate('quality_gates.cannot_copy_no_cayc')
                     : null
@@ -98,7 +98,7 @@ export default function DetailsHeader({ qualityGate }: Readonly<Props>) {
             )}
             {actions.setAsDefault && (
               <Tooltip
-                overlay={
+                content={
                   qualityGate.caycStatus === CaycStatus.NonCompliant
                     ? translate('quality_gates.cannot_set_default_no_cayc')
                     : null
@@ -129,7 +129,7 @@ export default function DetailsHeader({ qualityGate }: Readonly<Props>) {
             )}
             {actions.copy && (
               <Tooltip
-                overlay={
+                content={
                   qualityGate.caycStatus === CaycStatus.NonCompliant
                     ? translate('quality_gates.cannot_copy_no_cayc')
                     : null
@@ -145,7 +145,7 @@ export default function DetailsHeader({ qualityGate }: Readonly<Props>) {
             )}
             {actions.setAsDefault && (
               <Tooltip
-                overlay={
+                content={
                   qualityGate.caycStatus === CaycStatus.NonCompliant
                     ? translate('quality_gates.cannot_set_default_no_cayc')
                     : null
index 4f268fdfd92efeb4ddeb1635906006358c12b10e..56dba85252b026a50f47c790a4476c05e8efc964 100644 (file)
@@ -76,7 +76,7 @@ export default function List({ qualityGates, currentQualityGate }: Props) {
               )}
             </div>
             {qualityGate.caycStatus !== CaycStatus.NonCompliant && (
-              <Tooltip overlay={translate('quality_gates.cayc.tooltip.message')}>
+              <Tooltip content={translate('quality_gates.cayc.tooltip.message')}>
                 <span>
                   <QGRecommendedIcon />
                 </span>
index 58a9815dbbcffb01d6dcc0d4ee8772eee35f2807..0446064fca56a52312ae503f3234b097abf3f426 100644 (file)
@@ -81,7 +81,7 @@ function OptionRenderer(props: Readonly<OptionProps<Option, false>>) {
     <components.Option {...props}>
       <span>{label}</span>
       {isDefault && (
-        <Tooltip overlay={intl.formatMessage({ id: 'quality_profiles.list.default.help' })}>
+        <Tooltip content={intl.formatMessage({ id: 'quality_profiles.list.default.help' })}>
           <span>
             <Badge className="sw-ml-1">{intl.formatMessage({ id: 'default' })}</Badge>
           </span>
index 7727b0f947d70ef8d392172b2ef4cceadca91390..7df42fa7ea57d4bdd354ed9d26021199cabe6945 100644 (file)
@@ -60,7 +60,7 @@ export default function ComparisonResultActivation(props: React.PropsWithChildre
 
   return (
     <Spinner loading={state === 'opening'}>
-      <Tooltip placement="bottom" overlay={activateRuleMsg}>
+      <Tooltip side="bottom" content={activateRuleMsg}>
         <ButtonSecondary
           disabled={state !== 'closed'}
           aria-label={activateRuleMsg}
index 6112b9d5bcb5bcd21ecdccf5a1c8b3e99dbf5d07..59a91f7d5130a7b7f19959ea43c11f1d1486c1e9 100644 (file)
@@ -53,7 +53,7 @@ export default function ComparisonResultDeactivation(props: React.PropsWithChild
     >
       {({ onClick }) => (
         <Tooltip
-          overlay={
+          content={
             canDeactivateInheritedRules
               ? intl.formatMessage(
                   { id: 'quality_profiles.comparison.deactivate_rule' },
index 2e28d6b95e836feb06a8bc5f4fc2fc84432e399e..941c3fa44e3aa68eac945433fce19ab1dd998c93 100644 (file)
@@ -35,7 +35,7 @@ export default function BuiltInQualityProfileBadge({ className, tooltip = true }
   );
 
   if (tooltip) {
-    return <Tooltip overlay={translate('quality_profiles.built_in.description')}>{badge}</Tooltip>;
+    return <Tooltip content={translate('quality_profiles.built_in.description')}>{badge}</Tooltip>;
   }
 
   return badge;
index a4d14dadec6c03d04a639f9c4c990bbf373bbaa8..a35dcd8b9fa202be26c5c2553e4ec8a0dd128d72 100644 (file)
@@ -66,7 +66,7 @@ export function ProfilesListRow(props: Readonly<ProfilesListRowProps>) {
 
       <ContentCell>
         {profile.isDefault ? (
-          <Tooltip overlay={intl.formatMessage({ id: 'quality_profiles.list.default.help' })}>
+          <Tooltip content={intl.formatMessage({ id: 'quality_profiles.list.default.help' })}>
             <Badge>{intl.formatMessage({ id: 'default' })}</Badge>
           </Tooltip>
         ) : (
@@ -80,7 +80,7 @@ export function ProfilesListRow(props: Readonly<ProfilesListRowProps>) {
 
           {profile.activeDeprecatedRuleCount > 0 && (
             <span className="sw-ml-2">
-              <Tooltip overlay={intl.formatMessage({ id: 'quality_profiles.deprecated_rules' })}>
+              <Tooltip content={intl.formatMessage({ id: 'quality_profiles.deprecated_rules' })}>
                 <BaseLink to={deprecatedRulesUrl} className="sw-border-0">
                   <Badge variant="deleted">{profile.activeDeprecatedRuleCount}</Badge>
                 </BaseLink>
index 3c3f2cc680d08dcfae3069cda0c01a172c247d43..64ea79d48049d840e6f87774da684c464ee0cb2e 100644 (file)
@@ -49,7 +49,7 @@ export default function HotspotHeaderRightSection(props: Props) {
       {hotspot.codeVariants && hotspot.codeVariants.length > 0 && (
         <HotspotHeaderInfo title={translate('issues.facet.codeVariants')} className="sw-truncate">
           <LightLabel className="sw-body-sm">
-            <Tooltip overlay={hotspot.codeVariants.join(', ')}>
+            <Tooltip content={hotspot.codeVariants.join(', ')}>
               <span>{hotspot.codeVariants.join(', ')}</span>
             </Tooltip>
           </LightLabel>
index 1a587ce308b043485ca0e16c3af4600b40145351..b640a000212e3841c9ea75790effdfebee3c93a0 100644 (file)
@@ -128,8 +128,8 @@ function HotspotSidebarHeader(props: SecurityHotspotsAppRendererProps) {
                 {userLoggedIn && (
                   <Tooltip
                     classNameSpace={component?.needIssueSync ? 'tooltip' : 'sw-hidden'}
-                    overlay={<HotspotDisabledFilterTooltip />}
-                    placement="right"
+                    content={<HotspotDisabledFilterTooltip />}
+                    side="right"
                   >
                     <ItemCheckbox
                       checked={Boolean(filters.assignedToMe)}
index b7729278627d4043a4d04ad364945e4d9a4288fa..c39192787a44260f959a3e5a3cec973e87ad350c 100644 (file)
@@ -89,7 +89,7 @@ export default function HotspotSimpleList(props: HotspotSimpleListProps) {
             <SubNavigationContainer className="sw-flex sw-justify-between">
               <div className="sw-flex sw-items-center">
                 {filterByFile ? (
-                  <Tooltip overlay={filterByFile}>
+                  <Tooltip content={filterByFile}>
                     <span>
                       <QualifierIcon className="sw-mr-1" qualifier={ComponentQualifier.File} />
                       {fileFromPath(filterByFile)}
index d956ec80ceae921c555aaa6d59431defbee55f5e..171ea409a3c987900f53ee89b2d927822749e751 100644 (file)
@@ -41,8 +41,8 @@ export function StatusReviewButton(props: StatusProps) {
   return (
     <>
       <Tooltip
-        overlay={readonly ? translate('hotspots.status.cannot_change_status') : null}
-        placement="bottom"
+        content={readonly ? translate('hotspots.status.cannot_change_status') : null}
+        side="bottom"
       >
         <ButtonPrimary id="status-trigger" onClick={() => setIsOpen(true)} disabled={readonly}>
           {translate('hotspots.status.review')}
index 4e63f301c920fd5a2d79fd6a1e937740f1a80a43..342f00dde2b143414326e1908b3412de0af0d3b6 100644 (file)
@@ -45,7 +45,7 @@ export default function DefinitionDescription({ definition }: Readonly<Props>) {
         />
       )}
 
-      <Tooltip overlay={translateWithParameters('settings.key_x', definition.key)}>
+      <Tooltip content={translateWithParameters('settings.key_x', definition.key)}>
         <Note as="div" className="sw-mt-4">
           {translateWithParameters('settings.key_x', definition.key)}
         </Note>
index 2cca33a9d60f314156794c974c93c7b3e992f221..9b54225ab2f4baf78e4d99a8206db6cbe3b5e184 100644 (file)
@@ -182,7 +182,7 @@ export default function AlmBindingDefinitionBox(props: AlmBindingDefinitionBoxPr
       {status.type !== AlmSettingsBindingStatusType.Warning && (
         <div className="sw-flex sw-mb-3">
           <div className="sw-mr-10">
-            <Tooltip overlay={getPrDecoFeatureDescription(alm)}>
+            <Tooltip content={getPrDecoFeatureDescription(alm)}>
               <span>{translate('settings.almintegration.feature.status_reporting.title')}</span>
             </Tooltip>
             {getPRDecorationFeatureStatus(branchesEnabled, status.type)}
@@ -190,7 +190,7 @@ export default function AlmBindingDefinitionBox(props: AlmBindingDefinitionBoxPr
           {IMPORT_COMPATIBLE_ALMS.includes(alm) && (
             <div>
               <Tooltip
-                overlay={translate('settings.almintegration.feature.alm_repo_import.description')}
+                content={translate('settings.almintegration.feature.alm_repo_import.description')}
               >
                 <span>{translate('settings.almintegration.feature.alm_repo_import.title')}</span>
               </Tooltip>
index 76ba872ca80dd798a4feca5d41ab07cb92d8b50f..2fb9dbece8356f3e03c4f5be03ebfa0d379a85d9 100644 (file)
@@ -46,7 +46,7 @@ export function CreationTooltip(props: CreationTooltipProps) {
 
   return (
     <Tooltip
-      overlay={
+      content={
         preventCreation ? (
           <FormattedMessage
             id="settings.almintegration.create.tooltip"
index 357e8dca6fc5bf801ec3f4859f18e8238b6aa105..9b1988e7fab5e4694f5af03fba9f501ca2b2638d 100644 (file)
@@ -44,7 +44,7 @@ export default function HealthItem({ className, name, health, healthCauses }: Re
         ))}
 
       <Tooltip
-        overlay={name ? translateWithParameters('system.current_health_of_x', name) : undefined}
+        content={name ? translateWithParameters('system.current_health_of_x', name) : undefined}
       >
         <span>{statusIndicator}</span>
       </Tooltip>
index 6cf82658848d05f798ec8a6d687373fbe2e874cf..894be35d029f41ec392bbd901cc63018fbbe5cce 100644 (file)
@@ -32,7 +32,7 @@ export default function DeprecatedBadge({ since }: { since?: string }) {
     ? translateWithParameters('api_documentation.deprecated_since_x', since)
     : translate('api_documentation.deprecated');
   return (
-    <Tooltip overlay={overlay}>
+    <Tooltip content={overlay}>
       <span>
         <Badge variant="default">{label}</Badge>
       </span>
index f659020d05233e66d3a77fe52eba4f8143fec487..7d4e5444aa8c7257a227c74eda475b30e19ae8c5 100644 (file)
@@ -24,7 +24,7 @@ import { translate } from '../../../helpers/l10n';
 
 export default function InternalBadge() {
   return (
-    <Tooltip overlay={translate('api_documentation.internal_tooltip')}>
+    <Tooltip content={translate('api_documentation.internal_tooltip')}>
       <span>
         <Badge variant="deleted">{translate('internal')}</Badge>
       </span>
index 57b6c4cc83d163c34e9fc607821655364e5acbfa..8fcebb986f7bd3cf6bc2d3bdf07d37564037d157 100644 (file)
@@ -52,7 +52,7 @@ export default function PageActions(props: Props) {
 
   if (webhooksCount >= WEBHOOKS_LIMIT) {
     return (
-      <Tooltip overlay={translateWithParameters('webhooks.maximum_reached', WEBHOOKS_LIMIT)}>
+      <Tooltip content={translateWithParameters('webhooks.maximum_reached', WEBHOOKS_LIMIT)}>
         <ButtonPrimary className="it__webhook-create" disabled>
           {translate('create')}
         </ButtonPrimary>
index 897b60e7beaa48a5cbc350f5652318786934d5f0..a05afb972448646985732e5c510d0e8049071f56 100644 (file)
@@ -48,7 +48,7 @@ export function LineDuplicationBlock(props: LineDuplicationBlockProps) {
   const handleClose = React.useCallback(() => setPopupOpen(false), []);
 
   return duplicated ? (
-    <Tooltip overlay={tooltip} placement={PopupPlacement.Right}>
+    <Tooltip content={tooltip} side={PopupPlacement.Right}>
       <LineMeta
         className="it__source-line-duplicated"
         data-index={index}
@@ -56,10 +56,10 @@ export function LineDuplicationBlock(props: LineDuplicationBlockProps) {
       >
         <OutsideClickHandler onClickOutside={handleClose}>
           <Tooltip
-            placement={PopupPlacement.Right}
-            visible={popupOpen}
+            side={PopupPlacement.Right}
+            isOpen={popupOpen}
             isInteractive
-            overlay={popupOpen ? props.renderDuplicationPopup(index, line.line) : undefined}
+            content={popupOpen ? props.renderDuplicationPopup(index, line.line) : undefined}
             classNameInner="sw-max-w-abs-400"
           >
             <DuplicationBlock
index c4d4d50c82463cdce6370344f0c9c44021416b6c..250d19f6ca491dec7bf2c160266221abe082b05e 100644 (file)
@@ -67,7 +67,7 @@ export function LineIssuesIndicator(props: LineIssuesIndicatorProps) {
 
   return (
     <LineMeta className="it__source-line-with-issues" data-line-number={line.line}>
-      <Tooltip mouseLeaveDelay={MOUSE_LEAVE_DELAY} overlay={tooltipContent}>
+      <Tooltip mouseLeaveDelay={MOUSE_LEAVE_DELAY} content={tooltipContent}>
         <IssueIndicatorButton
           aria-label={tooltipContent}
           aria-expanded={issuesOpen}
index a3d75917d9f39f110f89f4956bdcef7eedae7b85..5fe6dbbe20c5790aeae0a4f74a27db45d49c31cf 100644 (file)
@@ -66,9 +66,9 @@ function LineSCM({ line, previousLine }: Props) {
     <LineMeta data-line-number={line.line}>
       <OutsideClickHandler onClickOutside={handleClose}>
         <Tooltip
-          overlay={<SCMPopup line={line} />}
-          placement={PopupPlacement.Right}
-          visible={isOpen}
+          content={<SCMPopup line={line} />}
+          side={PopupPlacement.Right}
+          isOpen={isOpen}
           isInteractive
           classNameInner="sw-max-w-abs-600"
         >
index af8dc01651b02815c3e63fc5e23afe8087dc1876..3996d5e2125ac8cb3ef78953781ad467cdf1cefc 100644 (file)
@@ -65,7 +65,7 @@ export default function EventInner({ event, readonly }: EventInnerProps) {
       : event.description;
 
   return (
-    <Tooltip overlay={tooltipContent}>
+    <Tooltip content={tooltipContent}>
       <div className="sw-min-w-0 sw-flex-1 sw-py-1/2">
         <div className="sw-flex sw-items-start">
           <span>
index a2ef7eb9830102841e7bccd3a2913531e0ae13c2..4dd506acea5ccc159c7fc8c233b7be720e0c11a4 100644 (file)
@@ -53,7 +53,7 @@ export default function GraphsLegendCustom(props: GraphsLegendCustomProps) {
           return (
             <Tooltip
               key={serie.name}
-              overlay={translate('project_activity.graphs.custom.metric_no_history')}
+              content={translate('project_activity.graphs.custom.metric_no_history')}
             >
               <li
                 className="sw-mx-2"
index 8035becb36dc16899b3e065da5775dc72b087c0f..239a868a50d8ba3c351dc7361bdc449d49f9066b 100644 (file)
@@ -76,7 +76,7 @@ export function GraphsLegendItem({
       </span>
       {isDeprecated && (
         <Tooltip
-          overlay={
+          content={
             <FormattedMessage
               id={getDeprecatedTranslationKeyForTooltip(metric as MetricKey)}
               tagName="div"
index 1fa817dd339a9bd103be471fbec30f23664c8aa2..2d70f784cb37fb5af0ffac3c0264b989162b2a40 100644 (file)
@@ -31,7 +31,7 @@ export default function DisableableSelectOption(props: DisableableSelectOptionPr
   const { option, disableTooltipOverlay, disabledReason, className = '' } = props;
   const label = option.label || option.value;
   return option.isDisabled ? (
-    <Tooltip overlay={disableTooltipOverlay()} placement="left">
+    <Tooltip content={disableTooltipOverlay()} side="left">
       <span className={className}>
         {label}
         {disabledReason !== undefined && <em className="small sw-ml-1">({disabledReason})</em>}
index cc9ebd48d7b3223f91c657b8dd3939f54b9db35f..2090c30a99326cdeb60472315e7285f29414bdc8 100644 (file)
@@ -35,7 +35,7 @@ export default function PrivacyBadgeContainer({
   visibility,
 }: PrivacyBadgeContainerProps) {
   return (
-    <Tooltip overlay={translate('visibility', visibility, 'description', qualifier)}>
+    <Tooltip content={translate('visibility', visibility, 'description', qualifier)}>
       <div className={classNames('badge', className)}>{translate('visibility', visibility)}</div>
     </Tooltip>
   );
index a5c5e17fdde7c9a65d1e38af65ccb35d029dbb56..07e81ed46192c2b679b0933be40194b456696216 100644 (file)
@@ -96,7 +96,7 @@ export default class Favorite extends React.PureComponent<Props, State> {
         toggleFavorite={this.toggleFavorite}
         tooltip={Tooltip}
         favorite={favorite}
-        innerRef={(node) => (this.buttonNode = node)}
+        innerRef={(node: HTMLElement | null) => (this.buttonNode = node)}
       />
     );
   }
index e7d6e2ff1af73760cd181259c9ded203c9aa69ea..e0fe8fbe090692635600dac7c6595d06f3625ac9 100644 (file)
@@ -65,7 +65,7 @@ export function HomePageSelect(props: Readonly<Props>) {
   const Icon = isChecked ? HomeFillIcon : HomeIcon;
 
   return (
-    <Tooltip overlay={tooltip}>
+    <Tooltip content={tooltip}>
       {type === 'icon' ? (
         <DiscreetInteractiveIcon
           aria-label={tooltip}
index 56e463fb7f1460296ffa529ae1058b1679076834..af330ecdb9110ace294d87fd4ed222506831c558 100644 (file)
@@ -38,9 +38,9 @@ interface TooltipProps {
   mouseLeaveDelay?: number;
   onShow?: () => void;
   onHide?: () => void;
-  overlay: React.ReactNode;
-  placement?: Placement;
-  visible?: boolean;
+  content: React.ReactNode;
+  side?: Placement;
+  isOpen?: boolean;
   // If tooltip overlay has interactive content (links for instance) we may set this to true to stop
   // default behavior of tabbing (other changes should be done outside of this component to make it work)
   // See example DocHelpTooltip
@@ -90,7 +90,7 @@ function isMeasured(state: State): state is OwnState & Measurements {
 export default function Tooltip(props: TooltipProps) {
   // `overlay` is a ReactNode, so it can be `undefined` or `null`. This allows to easily
   // render a tooltip conditionally. More generally, we avoid rendering empty tooltips.
-  return props.overlay != null && props.overlay !== '' ? (
+  return props.content != null && props.content !== '' ? (
     <TooltipInner {...props} />
   ) : (
     props.children
@@ -114,8 +114,8 @@ export class TooltipInner extends React.Component<TooltipProps, State> {
     super(props);
     this.state = {
       flipped: false,
-      placement: props.placement,
-      visible: props.visible ?? false,
+      placement: props.side,
+      visible: props.isOpen ?? false,
     };
     this.id = uniqueId('tooltip-');
     this.throttledPositionTooltip = throttle(this.positionTooltip, 10);
@@ -123,15 +123,15 @@ export class TooltipInner extends React.Component<TooltipProps, State> {
 
   componentDidMount() {
     this.mounted = true;
-    if (this.props.visible === true) {
+    if (this.props.isOpen === true) {
       this.positionTooltip();
       this.addEventListeners();
     }
   }
 
   componentDidUpdate(prevProps: TooltipProps, prevState: State) {
-    if (this.props.placement !== prevProps.placement) {
-      this.setState({ placement: this.props.placement });
+    if (this.props.side !== prevProps.side) {
+      this.setState({ placement: this.props.side });
       // Break. This will trigger a new componentDidUpdate() call, so the below
       // positionTooltip() call will be correct. Otherwise, it might not use
       // the new state.placement value.
@@ -140,15 +140,15 @@ export class TooltipInner extends React.Component<TooltipProps, State> {
 
     if (
       // opens
-      (this.props.visible === true && !prevProps.visible) ||
-      (this.props.visible === undefined && this.state.visible && !prevState.visible)
+      (this.props.isOpen === true && !prevProps.isOpen) ||
+      (this.props.isOpen === undefined && this.state.visible && !prevState.visible)
     ) {
       this.positionTooltip();
       this.addEventListeners();
     } else if (
       // closes
-      (!this.props.visible && prevProps.visible === true) ||
-      (this.props.visible === undefined && !this.state.visible && prevState.visible)
+      (!this.props.isOpen && prevProps.isOpen === true) ||
+      (this.props.isOpen === undefined && !this.state.visible && prevState.visible)
     ) {
       this.clearPosition();
       this.removeEventListeners();
@@ -177,7 +177,7 @@ export class TooltipInner extends React.Component<TooltipProps, State> {
   };
 
   isVisible = () => {
-    return this.props.visible ?? this.state.visible;
+    return this.props.isOpen ?? this.state.visible;
   };
 
   getPlacement = (): Placement => {
@@ -255,7 +255,7 @@ export class TooltipInner extends React.Component<TooltipProps, State> {
       top: undefined,
       width: undefined,
       height: undefined,
-      placement: this.props.placement,
+      placement: this.props.side,
     });
   };
 
@@ -267,7 +267,7 @@ export class TooltipInner extends React.Component<TooltipProps, State> {
         // (if it's `undefined`, it means the timer has been reset).
         if (
           this.mounted &&
-          this.props.visible === undefined &&
+          this.props.isOpen === undefined &&
           this.mouseEnterTimeout !== undefined
         ) {
           this.setState({ visible: true });
@@ -290,7 +290,7 @@ export class TooltipInner extends React.Component<TooltipProps, State> {
     if (!this.mouseIn) {
       this.mouseLeaveTimeout = window.setTimeout(
         () => {
-          if (this.mounted && this.props.visible === undefined && !this.mouseIn) {
+          if (this.mounted && this.props.isOpen === undefined && !this.mouseIn) {
             this.setState({ visible: false });
           }
           if (this.props.onHide && !this.mouseIn) {
@@ -415,7 +415,12 @@ export class TooltipInner extends React.Component<TooltipProps, State> {
 
   renderOverlay() {
     const isVisible = this.isVisible();
-    const { classNameSpace = 'tooltip', isInteractive, overlay, classNameInner } = this.props;
+    const {
+      classNameSpace = 'tooltip',
+      isInteractive,
+      content: overlay,
+      classNameInner,
+    } = this.props;
     return (
       <div
         className={classNames(`${classNameSpace}-inner sw-font-sans`, classNameInner, {
index ff3449523982e8775169e8b846e8ffcf9a9c2099..39fd69449afedcf0ba40211bf32714e2188feacf 100644 (file)
@@ -36,7 +36,7 @@ export default function EmbedDocsPopupHelper() {
         zLevel={PopupZLevel.Global}
       >
         {({ onToggleClick, open }) => (
-          <Tooltip mouseLeaveDelay={0.2} overlay={!open ? translate('help') : undefined}>
+          <Tooltip mouseLeaveDelay={0.2} content={!open ? translate('help') : undefined}>
             <InteractiveIcon
               Icon={IconQuestionMark}
               aria-expanded={open}
index ce454048545f2413e851f36c69faf05ff975976f..3d692d4f6b00dcff6c1574e17f0f4b6181b1cc08 100644 (file)
@@ -75,7 +75,7 @@ export default function IssueMetaBar(props: Readonly<Props>) {
         <>
           <li className={issueMetaListItemClassNames}>
             <Tooltip
-              overlay={translateWithParameters('issue.from_external_rule_engine', ruleEngine)}
+              content={translateWithParameters('issue.from_external_rule_engine', ruleEngine)}
             >
               <span>
                 <Badge>{ruleEngine}</Badge>
@@ -89,7 +89,7 @@ export default function IssueMetaBar(props: Readonly<Props>) {
       {!!issue.codeVariants?.length && (
         <>
           <IssueMetaListItem>
-            <Tooltip overlay={issue.codeVariants.join(', ')}>
+            <Tooltip content={issue.codeVariants.join(', ')}>
               <span>
                 {issue.codeVariants.length > 1
                   ? translateWithParameters('issue.x_code_variants', issue.codeVariants.length)
@@ -116,7 +116,7 @@ export default function IssueMetaBar(props: Readonly<Props>) {
 
       {showLine && isDefined(issue.textRange) && (
         <>
-          <Tooltip overlay={translate('line_number')}>
+          <Tooltip content={translate('line_number')}>
             <IssueMetaListItem className={issueMetaListItemClassNames}>
               {translateWithParameters('issue.ncloc_x.short', issue.textRange.endLine)}
             </IssueMetaListItem>
index ae18f700477c0599026c2606a3106033f48b593e..5f03969c216f3db3a7f46a9c389a498440c347f5 100644 (file)
@@ -39,7 +39,7 @@ export default function SonarLintBadge({ compact }: Readonly<Props>) {
 function SonarLintBadgeFull() {
   return (
     <Tooltip
-      overlay={translate('issue.quick_fix_available_with_sonarlint_no_link')}
+      content={translate('issue.quick_fix_available_with_sonarlint_no_link')}
       mouseLeaveDelay={0.5}
     >
       <LinkStandalone
@@ -65,7 +65,7 @@ function SonarLintBadgeFull() {
 function SonarLintBadgeCompact() {
   return (
     <Tooltip
-      overlay={
+      content={
         <FormattedMessage
           id="issue.quick_fix_available_with_sonarlint"
           defaultMessage={translate('issue.quick_fix_available_with_sonarlint')}
index 73bed5c6305da9f4d7953a1aa590a978d6047357..0df8399d0bfdcb8f1f664eca88aac14e97172a84 100644 (file)
@@ -68,7 +68,7 @@ export default class PermissionHeader extends React.PureComponent<Props> {
         <ClickEventBoundary>
           <BareButton onClick={this.handlePermissionClick}>
             <Tooltip
-              overlay={translateWithParameters(
+              content={translateWithParameters(
                 'global_permissions.filter_by_x_permission',
                 permission.name,
               )}
index 69b10941cca65e7bdc42a35c9b2419993be1b8ba..adb623f07e29afd753a52fefc4094f43267fc139 100644 (file)
@@ -129,7 +129,7 @@ function WorkspaceHeaderButton({
   tooltipContent,
 }: Readonly<WorkspaceHeaderButtonProps>) {
   return (
-    <Tooltip overlay={translate(tooltipContent)}>
+    <Tooltip content={translate(tooltipContent)}>
       <InteractiveIcon
         aria-label={translate(tooltipContent)}
         Icon={icon}
index 8454f7c1b901fb2e17089150dfb057c82dea45cd..19d0e4f0ab20a68c619ae841c76d5c3a5be4f8e6 100644 (file)
@@ -121,8 +121,8 @@ export default function DocHelpTooltip(props: Readonly<DocHelpTooltipProps>) {
         mouseLeaveDelay={0.25}
         onShow={handleShowTooltip}
         onHide={handleHideTooltip}
-        overlay={overlay}
-        placement={placement}
+        content={overlay}
+        side={placement}
         isInteractive
       >
         <span
index 5b62130d27b54ffb84e29acfc66b7120c7004c81..41ad7f597a707ae32b62a2c2fdcd8b024f88a3dc 100644 (file)
@@ -43,7 +43,7 @@ export default function HelpTooltip(props: Readonly<Props>) {
         props.className,
       )}
     >
-      <Tooltip mouseLeaveDelay={0.25} overlay={overlay} placement={placement}>
+      <Tooltip mouseLeaveDelay={0.25} content={overlay} side={placement}>
         <span
           aria-label={props['aria-label']}
           className="sw-inline-flex sw-items-center"