-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Field name is oddly displayed when long #6755
Changes from 3 commits
b05feb8
cd119a4
023ded1
526d382
47310fc
574f610
4784e72
de6917a
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 |
---|---|---|
|
@@ -47,6 +47,12 @@ const StyledNameTableCell = styled(TableCell)` | |
color: ${({ theme }) => theme.font.color.primary}; | ||
gap: ${({ theme }) => theme.spacing(2)}; | ||
`; | ||
const StyledNameLabel = styled.div` | ||
white-space: nowrap; | ||
text-overflow: ellipsis; | ||
overflow: hidden; | ||
} | ||
`; | ||
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. style: Consider adding max-width to StyledNameLabel for consistent truncation |
||
|
||
const StyledIconTableCell = styled(TableCell)` | ||
justify-content: center; | ||
|
@@ -203,9 +209,15 @@ export const SettingsObjectFieldItemTableRow = ({ | |
> | ||
<StyledNameTableCell> | ||
{!!Icon && ( | ||
<Icon size={theme.icon.size.md} stroke={theme.icon.stroke.sm} /> | ||
<Icon | ||
style={{ minWidth: theme.icon.size.md }} | ||
size={theme.icon.size.md} | ||
stroke={theme.icon.stroke.sm} | ||
/> | ||
)} | ||
{fieldMetadataItem.label} | ||
<StyledNameLabel title={fieldMetadataItem.label}> | ||
{fieldMetadataItem.label} | ||
</StyledNameLabel> | ||
</StyledNameTableCell> | ||
<TableCell>{typeLabel}</TableCell> | ||
<TableCell> | ||
|
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. The changes we did here fix the problem we found on our QA review, this component is also used in other places but we could not identify any problem in other places of the app |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ const StyledWrapper = styled.nav` | |
// font-weight: ${({ theme }) => theme.font.weight.semiBold}; | ||
gap: ${({ theme }) => theme.spacing(2)}; | ||
line-height: ${({ theme }) => theme.text.lineHeight.lg}; | ||
max-width: 100%; | ||
`; | ||
|
||
const StyledLink = styled(Link)` | ||
|
@@ -24,6 +25,9 @@ const StyledLink = styled(Link)` | |
|
||
const StyledText = styled.span` | ||
color: ${({ theme }) => theme.font.color.primary}; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
`; | ||
|
||
export const Breadcrumb = ({ className, links }: BreadcrumbProps) => ( | ||
|
@@ -33,7 +37,7 @@ export const Breadcrumb = ({ className, links }: BreadcrumbProps) => ( | |
{link.href ? ( | ||
<StyledLink to={link.href}>{link.children}</StyledLink> | ||
) : ( | ||
<StyledText>{link.children}</StyledText> | ||
<StyledText title={link.children}>{link.children}</StyledText> | ||
)} | ||
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. style: Consider applying the same overflow handling to StyledLink for consistency |
||
{index < links.length - 1 && '/'} | ||
</Fragment> | ||
|
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.
syntax: Missing opening curly brace for the styled component