mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
Fleet UI: Fix tables that bleed over on smaller screens (#9475)
This commit is contained in:
parent
5fabe6ce2d
commit
a09c4520ee
1
changes/9461-table-bugs
Normal file
1
changes/9461-table-bugs
Normal file
@ -0,0 +1 @@
|
||||
- Clean tables at smaller screen widths
|
@ -17,7 +17,7 @@ const LinkCell = ({
|
||||
value,
|
||||
path,
|
||||
title,
|
||||
classes = "w250",
|
||||
classes,
|
||||
}: ILinkCellProps): JSX.Element => {
|
||||
const onClick = (): void => {
|
||||
browserHistory.push(path);
|
||||
|
@ -55,7 +55,8 @@ $shadow-transition-width: 10px;
|
||||
white-space: initial; // wraps long text with tooltip
|
||||
}
|
||||
|
||||
tr, .single-row {
|
||||
tr,
|
||||
.single-row {
|
||||
transition: background-color 150ms ease-out;
|
||||
&:hover {
|
||||
background-color: $ui-off-white-opaque; // opaque needed for horizontal scroll shadow
|
||||
@ -307,15 +308,4 @@ $shadow-transition-width: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
@media screen and (max-width: 1025px) {
|
||||
.data-table {
|
||||
tbody {
|
||||
td {
|
||||
.w250-sm {
|
||||
max-width: calc(250px - 48px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -166,4 +166,12 @@
|
||||
.fleet-checkbox__tick {
|
||||
top: 1px;
|
||||
}
|
||||
|
||||
// Truncates clickable button cells
|
||||
.children-wrapper {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ const generateTableHeaders = (options: {
|
||||
accessor: "name",
|
||||
Cell: (cellProps: ICellProps): JSX.Element => (
|
||||
<LinkCell
|
||||
classes="w250-sm"
|
||||
classes="w250"
|
||||
value={cellProps.cell.value}
|
||||
path={PATHS.EDIT_POLICY(cellProps.row.original)}
|
||||
/>
|
||||
|
@ -131,6 +131,14 @@
|
||||
.name__cell {
|
||||
max-width: $col-lg;
|
||||
}
|
||||
|
||||
@media (max-width: $break-990) {
|
||||
.name__cell {
|
||||
.w400 {
|
||||
max-width: calc(400px - 81px);
|
||||
}
|
||||
}
|
||||
}
|
||||
.platforms__cell {
|
||||
max-width: $col-md;
|
||||
}
|
||||
|
@ -92,6 +92,7 @@
|
||||
tbody {
|
||||
.query_name__cell {
|
||||
width: $col-lg;
|
||||
max-width: 175px; // Truncates at smaller widths
|
||||
}
|
||||
.interval__cell {
|
||||
width: auto;
|
||||
|
@ -121,7 +121,7 @@ const generateTableHeaders = (
|
||||
disableSortBy: true,
|
||||
accessor: "query_name",
|
||||
Cell: (cellProps: ICellProps): JSX.Element => (
|
||||
<TextCell classes="w400" value={cellProps.cell.value} />
|
||||
<TextCell value={cellProps.cell.value} />
|
||||
),
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user