Skip to content

Commit

Permalink
Merge pull request #1723 from jdi-testing/issue_739-tooltip-align-fix
Browse files Browse the repository at this point in the history
Issue 739 tooltip align fix
  • Loading branch information
Alinochka07 authored May 7, 2024
2 parents 37d338e + 871f17e commit 6f3d8ad
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 28 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "JDN — Page Object Generator",
"description": "JDN – helps Test Automation Engineer to create Page Objects in the test automation framework and speed up test development",
"devtools_page": "index.html",
"version": "3.15.28",
"version": "3.15.29",
"icons": {
"128": "icon128.png"
},
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jdn-ai-chrome-extension",
"version": "3.15.28",
"version": "3.15.29",
"description": "jdn-ai chrome extension",
"scripts": {
"start": "webpack --watch --env devenv",
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/StatusBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const StatusBar = () => {
</div>
<Space size={[10, 0]} className="header__space">
{isSessionUnique && <OnboardingButton />}
<Tooltip title={componentsTexts.StatusBarVersionReadme}>
<Tooltip title={componentsTexts.StatusBarVersionReadme} align={{ offset: [16, 0] }}>
<Button
ref={readmeRef}
type="link"
Expand Down
13 changes: 0 additions & 13 deletions src/common/components/breadcrumbs/breadcrumbs.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,5 @@
.jdn {
&__breadcrumbs {
overflow-wrap: anywhere;

& .ant-tooltip-inner {
max-height: 350px;
overflow-y: clip;
display: -webkit-box;
-webkit-line-clamp: 15;
-webkit-box-orient: vertical;
}

& .ant-tooltip {
word-break: break-all;
max-width: 100%;
}
}
}
19 changes: 19 additions & 0 deletions src/common/styles/ant.less
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,22 @@
max-height: 104px;
overflow-y: auto;
}

/* Tooltip */
.ant-tooltip {
word-break: break-all;
max-width: 100%;
}

.ant-tooltip-arrow {
margin-top: 6px;
}

.ant-tooltip-inner {
margin-top: 6px;
max-height: 350px;
overflow-y: clip;
display: -webkit-box;
-webkit-line-clamp: 15;
-webkit-box-orient: vertical;
}
2 changes: 1 addition & 1 deletion src/features/locators/components/LocatorCopyButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const LocatorCopyButton: React.FC<Props> = ({ framework, element, pageObj
};

return (
<Tooltip placement="bottom" title={copyTooltipTitle} align={{ offset: [0, -10] }}>
<Tooltip placement="bottom" title={copyTooltipTitle} align={{ offset: [0, -1] }}>
<Button
onClick={handleCopy}
onMouseEnter={handleMouseEnter}
Expand Down
4 changes: 4 additions & 0 deletions src/features/locators/styles/locator.less
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,7 @@
}
}
}

.ant-tooltip-content {
margin-top: -1px;
}
4 changes: 3 additions & 1 deletion src/features/onboarding/components/OnboardingTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ export const OnboardingTooltip: FC<Props> = ({ children }) => {
return (
<>
{isOnboardingOpen ? (
<Tooltip title="Available only after completing the onboarding">{children}</Tooltip>
<Tooltip placement="top" title="Available only after completing the onboarding" align={{ offset: [0, -20] }}>
{children}
</Tooltip>
) : (
children
)}
Expand Down
12 changes: 3 additions & 9 deletions src/features/pageObjects/styles/pageObject.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,16 @@
}

& .ant-tooltip {
max-width: calc(100% - 1px);
word-break: break-all;
padding: 5px 14px;

.ant-tooltip-arrow {
top: 5px;
top: 8px;
left: 27px;
}
}

& .ant-tooltip-inner {
max-height: 350px;
overflow-y: clip;
display: -webkit-box;
-webkit-line-clamp: 15;
-webkit-box-orient: vertical;
margin-top: 8px;
}
}

Expand Down Expand Up @@ -139,4 +133,4 @@
padding: 4px 8px 4px 32px;
width: 100%;
}
}
}

0 comments on commit 6f3d8ad

Please sign in to comment.