-
Notifications
You must be signed in to change notification settings - Fork 180
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
fix(app): increase size of robot version mismatch tooltip #16064
fix(app): increase size of robot version mismatch tooltip #16064
Conversation
@@ -189,7 +189,7 @@ function MenuDropdown(props: MenuDropdownProps): JSX.Element { | |||
{t('rerun_now')} | |||
</MenuItem> | |||
{isRobotOnWrongVersionOfSoftware && ( | |||
<Tooltip tooltipProps={tooltipProps}> | |||
<Tooltip tooltipProps={tooltipProps} maxWidth={'max-content'}> |
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.
I think the issue here is that the Tooltip was inheriting whiteSpace='nowrap'
from its parent. This is maybe a question for design, but we can either:
- Keep
maxWidth=FLEX_MAX_CONTENT
- Give an explicit
whiteSpace=WRAP
prop toTooltip
to override parent style one-off on this component
<Tooltip tooltipProps={tooltipProps} whiteSpace={WRAP}>
- default wrap behavior on
app/src/atomsTooltip/index.tsx
@Tooltip
export function Tooltip(props: TooltipProps): JSX.Element {
const {
children,
tooltipProps,
width = FLEX_MAX_CONTENT,
maxWidth = '8.75rem',
whiteSpace = WRAP,
...styleProps
} = props
return (
<SharedTooltip
{...tooltipProps}
backgroundColor={COLORS.black90}
fontSize={TYPOGRAPHY.fontSizeCaption}
width={width}
maxWidth={maxWidth}
whiteSpace={whiteSpace}
{...styleProps}
>
{children}
</SharedTooltip>
)
}
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.
good call — got rid of the white space and added a max-content with so each of the overflow items stretch horizontally to fit the container
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.
For whiteSpace
, we would need to use normal
.
https://developer.mozilla.org/en-US/docs/Web/CSS/white-space
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.
Looks good!
Overview
closes RQA-2857
Changelog
Review requests
app/src/organisms/Devices/HistoricalProtocolRunOverflowMenu.tsx
and replaceisRobotOnWrongVersionOfSoftware
withtrue
Risk assessment
Low