Skip to content

Commit db217e1

Browse files
lazzy-pandak.morozov
andauthored
Fix topic names fitting in a table cell (#1812)
* Fixed tags width and added scroll to the table * Dropdown position fixed * Prop up=true moved directly to the table * Scroll removed, table resized * Unused divider removed * Removed extra Divider import Co-authored-by: k.morozov <[email protected]>
1 parent 8eedd17 commit db217e1

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

kafka-ui-react-app/src/components/Connect/Details/Overview/__tests__/__snapshots__/Overview.spec.tsx.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ exports[`Overview view matches snapshot 1`] = `
1313
padding-left: 0.75em;
1414
padding-right: 0.75em;
1515
text-align: center;
16+
width: -webkit-max-content;
17+
width: -moz-max-content;
18+
width: max-content;
1619
}
1720
1821
.c0 {

kafka-ui-react-app/src/components/Connect/Details/Tasks/__tests__/__snapshots__/Tasks.spec.tsx.snap

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ exports[`Tasks view matches snapshot 1`] = `
1212
padding: 8px 8px 8px 24px;
1313
color: #171A1C;
1414
vertical-align: middle;
15+
max-width: 350px;
16+
word-wrap: break-word;
1517
}
1618
1719
.c0 tbody > tr:hover {
@@ -182,6 +184,8 @@ exports[`Tasks view matches snapshot when no tasks 1`] = `
182184
padding: 8px 8px 8px 24px;
183185
color: #171A1C;
184186
vertical-align: middle;
187+
max-width: 350px;
188+
word-wrap: break-word;
185189
}
186190
187191
.c0 tbody > tr:hover {
@@ -279,4 +283,4 @@ exports[`Tasks view matches snapshot when no tasks 1`] = `
279283
</tr>
280284
</tbody>
281285
</table>
282-
`;
286+
`;

kafka-ui-react-app/src/components/Connect/List/ListItem.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { Link, NavLink } from 'react-router-dom';
66
import { useDispatch } from 'react-redux';
77
import { deleteConnector } from 'redux/actions';
88
import Dropdown from 'components/common/Dropdown/Dropdown';
9-
import DropdownDivider from 'components/common/Dropdown/DropdownDivider';
109
import DropdownItem from 'components/common/Dropdown/DropdownItem';
1110
import ConfirmationModal from 'components/common/ConfirmationModal/ConfirmationModal';
1211
import { Tag } from 'components/common/Tag/Tag.styled';
@@ -84,8 +83,7 @@ const ListItem: React.FC<ListItemProps> = ({
8483
</td>
8584
<td>
8685
<div>
87-
<Dropdown label={<VerticalElipsisIcon />} right>
88-
<DropdownDivider />
86+
<Dropdown label={<VerticalElipsisIcon />} right up>
8987
<DropdownItem
9088
onClick={() => setDeleteConnectorConfirmationVisible(true)}
9189
danger

kafka-ui-react-app/src/components/common/Tag/Tag.styled.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ export const Tag = styled.p<Props>`
1616
padding-left: 0.75em;
1717
padding-right: 0.75em;
1818
text-align: center;
19+
width: max-content;
1920
`;

kafka-ui-react-app/src/components/common/table/Table/Table.styled.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ export const Table = styled.table<Props>`
1414
padding: 8px 8px 8px 24px;
1515
color: ${({ theme }) => theme.table.td.color.normal};
1616
vertical-align: middle;
17+
max-width: 350px;
18+
word-wrap: break-word;
1719
}
1820
1921
& tbody > tr {

0 commit comments

Comments
 (0)