Skip to content

Commit 972b63f

Browse files
committed
fix(FR-869): fix session launcher to display appropriate type for folders (#3538)
resolves #3537 (FR-869) **changes** * fix showing the type of a folder in the session launcher to look the same as it does on the data page * I'm not getting a value for `group_name`, so I've removed the part that shows it. Please let me know if you need this in your review. |before|after| |-----|------| |![12eb0504-2009-4ba3-ba91-6cf06a9e364c.jpg](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/xbCemO1RqqcSjEXCRK3p/90cf0e22-239d-48c2-a61e-ab2b0b49addc.jpg) | ![CleanShot 2025-04-19 at 21.12.18@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/xbCemO1RqqcSjEXCRK3p/93f5bf78-ea26-4b21-a2a6-8f7099bbfd5c.png)| **Checklist:** (if applicable) - [ ] Documentation - [ ] Minium required manager version - [ ] Specific setting for review (eg., KB link, endpoint or how to setup) - [ ] Minimum requirements to check during review - [ ] Test case(s) to demonstrate the difference of before/after
1 parent 7628526 commit 972b63f

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

react/src/components/VFolderTable.tsx

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { useSuspenseTanQuery } from '../hooks/reactQueryAlias';
55
import useControllableState from '../hooks/useControllableState';
66
import { useCurrentProjectValue } from '../hooks/useCurrentProject';
77
import { useEventNotStable } from '../hooks/useEventNotStable';
8+
import UserUnionIcon from './BAIIcons/UserUnionIcon';
89
import BAILink from './BAILink';
910
import Flex from './Flex';
1011
import FolderCreateModal from './FolderCreateModal';
@@ -26,6 +27,7 @@ import {
2627
Table,
2728
TableProps,
2829
Tag,
30+
theme,
2931
Tooltip,
3032
Typography,
3133
} from 'antd';
@@ -147,6 +149,7 @@ const VFolderTable: React.FC<VFolderTableProps> = ({
147149
}, [aliasMap, internalForm, aliasBasePath]);
148150

149151
const { t } = useTranslation();
152+
const { token } = theme.useToken();
150153
const baiRequestWithPromise = useBaiSignedRequestWithPromise();
151154
const currentProject = useCurrentProjectValue();
152155
const [fetchKey, updateFetchKey] = useUpdatableState('first');
@@ -447,15 +450,20 @@ const VFolderTable: React.FC<VFolderTableProps> = ({
447450
title: t('data.Type'),
448451
dataIndex: 'type',
449452
sorter: (a, b) => a.type.localeCompare(b.type),
450-
render: (value, record) => {
453+
render: (_, record) => {
451454
return (
452455
<Flex direction="column">
453-
{record.type === 'user' ? (
454-
<UserOutlined title="User" />
456+
{record.ownership_type === 'user' ? (
457+
<Flex gap={'xs'}>
458+
<Typography.Text>{t('data.User')}</Typography.Text>
459+
<UserOutlined style={{ color: token.colorTextTertiary }} />
460+
</Flex>
455461
) : (
456-
<div>Group</div>
462+
<Flex gap={'xs'}>
463+
<Typography.Text>{t('data.Project')}</Typography.Text>
464+
<UserUnionIcon style={{ color: token.colorTextTertiary }} />
465+
</Flex>
457466
)}
458-
{record.type === 'group' && `(${record.group_name})`}
459467
</Flex>
460468
);
461469
},

0 commit comments

Comments
 (0)