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

Issue 739 tooltip align fix #1723

Merged
merged 2 commits into from
May 7, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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%;
}
}
}
Loading