-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
cleanup data reference tooltips #47747
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,11 @@ import { memo } from "react"; | |
|
||
import Card from "metabase/components/Card"; | ||
import S from "metabase/components/List/List.module.css"; | ||
import { Ellipsified } from "metabase/core/components/Ellipsified"; | ||
import CS from "metabase/css/core/index.css"; | ||
import { Icon } from "metabase/ui"; | ||
|
||
import { ListItemLink, ListItemName, Root } from "./ListItem.styled"; | ||
import { ListItemLink, Root } from "./ListItem.styled"; | ||
|
||
const ListItem = ({ | ||
"data-testid": dataTestId, | ||
|
@@ -30,9 +31,7 @@ const ListItem = ({ | |
</div> | ||
<div className={S.itemBody}> | ||
<div className={S.itemTitle}> | ||
<ListItemName tooltip={name} tooltipMaxWidth="100%"> | ||
<h3>{name}</h3> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nesting a component inside ellipsified prevented anything from actually getting an ellipsis |
||
</ListItemName> | ||
<Ellipsified tooltip={name}>{name}</Ellipsified> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I killed this styled component because it just made it all harder to reason about |
||
</div> | ||
{(description || placeholder) && ( | ||
<div className={cx(S.itemSubtitle)}> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tooltipMaxWidth
here was the biggest sin. I think with our old tooltip, this was based on the width of the container, and our new tooltips get appended to the body so the container is the screen width.