Skip to content

Commit 729c722

Browse files
authored
fix(search-indexes): smaller column widths COMPASS-7341 (#4989)
1 parent 07d1436 commit 729c722

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/compass-indexes/src/components/indexes-table/indexes-table.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ const indexActionsCellStyles = css({
3636
minWidth: spacing[5],
3737
});
3838

39+
const indexActionsCellContainerStyles = css({
40+
display: 'flex',
41+
justifyContent: 'flex-end',
42+
});
43+
3944
const tableHeaderStyles = css({
4045
borderWidth: 0,
4146
borderBottomWidth: 3,
@@ -78,6 +83,7 @@ type IndexInfo = {
7883
key?: string;
7984
'data-testid': string;
8085
children: React.ReactNode;
86+
className?: string;
8187
}[];
8288
actions?: React.ReactNode;
8389
details?: React.ReactNode;
@@ -185,7 +191,7 @@ export function IndexesTable<Column extends string>({
185191
<Cell
186192
key={field.key ?? `${info.key}-${index}`}
187193
data-testid={`${dataTestId}-${field['data-testid']}`}
188-
className={cellStyles}
194+
className={cx(cellStyles, field.className)}
189195
>
190196
{field.children}
191197
</Cell>
@@ -195,7 +201,7 @@ export function IndexesTable<Column extends string>({
195201
{canModifyIndex && (
196202
<Cell
197203
data-testid={`${dataTestId}-actions-field`}
198-
className={cellStyles}
204+
className={cx(cellStyles, indexActionsCellContainerStyles)}
199205
>
200206
{info.actions && (
201207
<div

packages/compass-indexes/src/components/search-indexes-table/search-indexes-table.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,16 @@ export const SearchIndexesTable: React.FunctionComponent<
202202
fields: [
203203
{
204204
'data-testid': 'name-field',
205+
className: css({
206+
width: '30%',
207+
}),
205208
children: index.name,
206209
},
207210
{
208211
'data-testid': 'status-field',
212+
className: css({
213+
width: '20%',
214+
}),
209215
children: (
210216
<IndexStatus
211217
status={index.status}

0 commit comments

Comments
 (0)