Skip to content

Commit

Permalink
make tooltip width larger
Browse files Browse the repository at this point in the history
  • Loading branch information
nleroy917 committed Oct 14, 2024
1 parent 305f514 commit f11a67c
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 5 deletions.
7 changes: 7 additions & 0 deletions ui/package-lock.json

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

5 changes: 3 additions & 2 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"chart.js": "^4.4.2",
"chartjs-chart-error-bars": "^4.4.0",
"framer-motion": "^11.0.20",
"js-yaml": "^4.1.0",
"react": "^18.2.0",
"react-bootstrap": "^2.10.1",
"react-chartjs-2": "^5.2.0",
Expand All @@ -31,10 +32,10 @@
"react-hot-toast": "^2.4.1",
"react-markdown": "^9.0.1",
"react-router-dom": "^6.22.3",
"rehype-highlight": "^7.0.0",
"js-yaml": "^4.1.0"
"rehype-highlight": "^7.0.0"
},
"devDependencies": {
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.11.27",
"@types/react": "^18.2.64",
"@types/react-dom": "^18.2.21",
Expand Down
9 changes: 7 additions & 2 deletions ui/src/components/search/search-results-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,13 @@ export const SearchResultsTable = (props: Props) => {
<OverlayTrigger
placement="auto"
overlay={
<Tooltip id={`tooltip-${result.id}`}>
{YAML.dump(result?.metadata?.annotation, null, 4) || 'No description'}
<Tooltip id={`tooltip-${result.id}`} className="moreinfo-tooltip">
<pre className="text-start">
{YAML.dump(result?.metadata, {
indent: 2,
noRefs: true,
}) || 'No description'}
</pre>
</Tooltip>
}
>
Expand Down
4 changes: 4 additions & 0 deletions ui/src/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -291,3 +291,7 @@ a {
opacity: 0.5;
}
}

.moreinfo-tooltip > .tooltip-inner {
max-width: none;
}
2 changes: 1 addition & 1 deletion ui/src/pages/bed-splash.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const BedSplash = () => {
</Layout>
);
} else {
return <ErrorPage title={`BEDbase | ${bedId}`} error={error} />;
return <ErrorPage title={`BEDbase | ${bedId}`} error={error as AxiosError} />;
}
} else {
return (
Expand Down

0 comments on commit f11a67c

Please sign in to comment.