From e2fccbd56b9dddebe84fd446a4291e19e1ac89ca Mon Sep 17 00:00:00 2001 From: Oleksandr Dubenko Date: Wed, 11 Dec 2024 16:58:35 +0100 Subject: [PATCH 1/4] frontend: Fix name column value in Role list Signed-off-by: Oleksandr Dubenko --- frontend/src/components/role/List.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/role/List.tsx b/frontend/src/components/role/List.tsx index bfb9684be1..15dd8dd61d 100644 --- a/frontend/src/components/role/List.tsx +++ b/frontend/src/components/role/List.tsx @@ -46,7 +46,7 @@ export default function RoleList() { 'type', { label: t('translation|Name'), - getValue: item => item.metadata.namespace, + getValue: item => item.metadata.name, render: item => ( Date: Wed, 11 Dec 2024 17:00:14 +0100 Subject: [PATCH 2/4] frontend ResourceTable: Fix filtering error when some items don't have a namespace Signed-off-by: Oleksandr Dubenko --- frontend/src/components/common/Resource/ResourceTable.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/common/Resource/ResourceTable.tsx b/frontend/src/components/common/Resource/ResourceTable.tsx index 527488f477..59f3e85bbb 100644 --- a/frontend/src/components/common/Resource/ResourceTable.tsx +++ b/frontend/src/components/common/Resource/ResourceTable.tsx @@ -363,7 +363,7 @@ function ResourceTableContent(props: ResourceTablePr return { id: 'namespace', header: t('glossary|Namespace'), - accessorFn: (item: RowItem) => item.getNamespace(), + accessorFn: (item: RowItem) => item.getNamespace() ?? '', filterVariant: 'multi-select', Cell: ({ row }: { row: MRT_Row }) => row.original?.getNamespace() ? ( From e47d591e7fd3ce3ec4f6aaf6bb7f9ae6a16a93a5 Mon Sep 17 00:00:00 2001 From: Oleksandr Dubenko Date: Wed, 11 Dec 2024 17:00:47 +0100 Subject: [PATCH 3/4] frontend Table: Fix per column filtering not working Signed-off-by: Oleksandr Dubenko --- frontend/src/components/common/Table/Table.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/src/components/common/Table/Table.tsx b/frontend/src/components/common/Table/Table.tsx index 89392d7548..43e16ab952 100644 --- a/frontend/src/components/common/Table/Table.tsx +++ b/frontend/src/components/common/Table/Table.tsx @@ -404,9 +404,7 @@ const MemoHeadCell = memo( a.sorting === b.sorting && a.isFiltered === b.isFiltered && a.showColumnFilters === b.showColumnFilters && - a.header.column.id === 'mrt-row-select' - ? a.selected === b.selected - : true + (a.header.column.id === 'mrt-row-select' ? a.selected === b.selected : true) ); const Row = memo( From 60d1e078c05e3e058d82788ee1d16cbc70514f19 Mon Sep 17 00:00:00 2001 From: Oleksandr Dubenko Date: Wed, 11 Dec 2024 17:01:05 +0100 Subject: [PATCH 4/4] frontend Table: Make checkboxes smaller and fixed width Signed-off-by: Oleksandr Dubenko --- ...ListView.OneHiddenColumn.stories.storyshot | 14 ++++++------- .../src/components/common/Table/Table.tsx | 10 +++++++++- .../List.Items.stories.storyshot | 8 ++++---- ...sourceDefinition.Details.stories.storyshot | 8 ++++---- ...mResourceDefinition.List.stories.storyshot | 6 +++--- .../CustomResourceList.List.stories.storyshot | 8 ++++---- .../List.DaemonSets.stories.storyshot | 6 +++--- .../EndpointList.Items.stories.storyshot | 6 +++--- .../HPAList.Items.stories.storyshot | 6 +++--- .../ClassList.Items.stories.storyshot | 8 ++++---- .../List.Items.stories.storyshot | 8 ++++---- .../JobList.Items.stories.storyshot | 12 +++++------ .../List.Items.stories.storyshot | 6 +++--- .../List.Items.stories.storyshot | 6 +++--- .../NamespaceList.Regular.stories.storyshot | 6 +++--- .../List.Nodes.stories.storyshot | 8 ++++---- .../PodList.Items.stories.storyshot | 20 +++++++++---------- .../pdbList.Items.stories.storyshot | 6 +++--- .../priorityClassList.Items.stories.storyshot | 6 +++--- .../List.ReplicaSets.stories.storyshot | 8 ++++---- .../resourceQuotaList.Items.stories.storyshot | 6 +++--- .../List.Items.stories.storyshot | 6 +++--- .../List.Items.stories.storyshot | 8 ++++---- .../ClaimList.Items.stories.storyshot | 10 +++++----- .../ClassList.Items.stories.storyshot | 6 +++--- .../VolumeList.Items.stories.storyshot | 6 +++--- .../VPAList.List.stories.storyshot | 6 +++--- ...gWebhookConfigList.Items.stories.storyshot | 16 +++++++-------- ...gWebhookConfigList.Items.stories.storyshot | 16 +++++++-------- 29 files changed, 127 insertions(+), 119 deletions(-) diff --git a/frontend/src/components/common/Resource/__snapshots__/ResourceListView.OneHiddenColumn.stories.storyshot b/frontend/src/components/common/Resource/__snapshots__/ResourceListView.OneHiddenColumn.stories.storyshot index 44a8092976..63fc85ffb3 100644 --- a/frontend/src/components/common/Resource/__snapshots__/ResourceListView.OneHiddenColumn.stories.storyshot +++ b/frontend/src/components/common/Resource/__snapshots__/ResourceListView.OneHiddenColumn.stories.storyshot @@ -151,7 +151,7 @@ >({ preGridTemplateColumns = `${preGridTemplateColumns} 0.05fr`; } if (tableProps.enableRowSelection) { - preGridTemplateColumns = `0.05fr ${preGridTemplateColumns}`; + preGridTemplateColumns = `44px ${preGridTemplateColumns}`; } return preGridTemplateColumns; @@ -315,6 +315,14 @@ export default function Table>({ paddingTop: '0.5rem', }, }, + muiSelectCheckboxProps: { + size: 'small', + sx: { padding: 0 }, + }, + muiSelectAllCheckboxProps: { + size: 'small', + sx: { padding: 0 }, + }, }); const rows = useMRT_Rows(table); diff --git a/frontend/src/components/configmap/__snapshots__/List.Items.stories.storyshot b/frontend/src/components/configmap/__snapshots__/List.Items.stories.storyshot index f23ffb64bb..463fc479cb 100644 --- a/frontend/src/components/configmap/__snapshots__/List.Items.stories.storyshot +++ b/frontend/src/components/configmap/__snapshots__/List.Items.stories.storyshot @@ -252,7 +252,7 @@