From 4a809255074f395bfe2a471b661ffb24f1abb824 Mon Sep 17 00:00:00 2001 From: Emma Fabre Date: Wed, 29 Jan 2025 12:38:14 +0100 Subject: [PATCH 1/5] Pass missing creator prop to OwnershipsTable --- src/pages/organizers/[organizerId]/ownerships/index.page.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/organizers/[organizerId]/ownerships/index.page.tsx b/src/pages/organizers/[organizerId]/ownerships/index.page.tsx index bd2e45df9..e6746cbb8 100644 --- a/src/pages/organizers/[organizerId]/ownerships/index.page.tsx +++ b/src/pages/organizers/[organizerId]/ownerships/index.page.tsx @@ -178,6 +178,7 @@ const Ownership = () => { Date: Wed, 29 Jan 2025 12:44:46 +0100 Subject: [PATCH 2/5] Render both empty state and table with creator when no ownerships --- .../ownerships/OwnershipsTable.tsx | 140 +++++++++--------- 1 file changed, 72 insertions(+), 68 deletions(-) diff --git a/src/pages/organizers/[organizerId]/ownerships/OwnershipsTable.tsx b/src/pages/organizers/[organizerId]/ownerships/OwnershipsTable.tsx index 7deb10d31..8165a7ede 100644 --- a/src/pages/organizers/[organizerId]/ownerships/OwnershipsTable.tsx +++ b/src/pages/organizers/[organizerId]/ownerships/OwnershipsTable.tsx @@ -14,6 +14,7 @@ import { Stack } from '@/ui/Stack'; import { Text } from '@/ui/Text'; import { colors, getValueFromTheme } from '@/ui/theme'; import { Title } from '@/ui/Title'; +import { Alert, AlertVariants } from '@/ui/Alert'; const getGlobalValue = getValueFromTheme('global'); @@ -95,82 +96,85 @@ export const OwnershipsTable = ({ [requests], ); - if (requests.length === 0) { - return {t('organizers.ownerships.table.no_results')}; - } - return ( - - + - {t('organizers.ownerships.table.user')} - {shouldShowItemId && item id} - {hasActions && ( - - {t('organizers.ownerships.table.actions.title')} - - )} - - - {creator?.email && {creator.email}} - {requests.map((request) => ( - + {t('organizers.ownerships.table.user')} + {shouldShowItemId && item id} + {hasActions && ( + + {t('organizers.ownerships.table.actions.title')} + + )} + + + {creator?.email && {creator.email}} + {requests.map((request) => ( + - - - {shouldShowOwnerId && {request.ownerId}} - {request.ownerEmail} - - - {shouldShowItemId && ( + &:not(:last-child) { + border-bottom: 1px solid ${grey3}; + } + `} + > - {request.itemId} + {shouldShowOwnerId && {request.ownerId}} + {request.ownerEmail} - )} - {hasActions && ( - - - - )} - - ))} - - + {shouldShowItemId && ( + + + {request.itemId} + + + )} + {hasActions && ( + + + + )} + + ))} + + + {requests.length === 0 && ( + + {t('organizers.ownerships.table.no_results')} + + )} + ); }; From b1171a7305a9f3e72bb4e5ff0d7c5f39f67d8a8f Mon Sep 17 00:00:00 2001 From: Emma Fabre Date: Wed, 29 Jan 2025 12:45:23 +0100 Subject: [PATCH 3/5] Linting --- .../organizers/[organizerId]/ownerships/OwnershipsTable.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/organizers/[organizerId]/ownerships/OwnershipsTable.tsx b/src/pages/organizers/[organizerId]/ownerships/OwnershipsTable.tsx index 8165a7ede..f7ded5fa1 100644 --- a/src/pages/organizers/[organizerId]/ownerships/OwnershipsTable.tsx +++ b/src/pages/organizers/[organizerId]/ownerships/OwnershipsTable.tsx @@ -6,6 +6,7 @@ import { OwnershipRequest, OwnershipState, } from '@/hooks/api/ownerships'; +import { Alert, AlertVariants } from '@/ui/Alert'; import { Button, ButtonVariants } from '@/ui/Button'; import { Icons } from '@/ui/Icon'; import { Inline } from '@/ui/Inline'; @@ -14,7 +15,6 @@ import { Stack } from '@/ui/Stack'; import { Text } from '@/ui/Text'; import { colors, getValueFromTheme } from '@/ui/theme'; import { Title } from '@/ui/Title'; -import { Alert, AlertVariants } from '@/ui/Alert'; const getGlobalValue = getValueFromTheme('global'); From 331d11e2edb5ca2e414be2a2f6f25e07cf398f12 Mon Sep 17 00:00:00 2001 From: Emma Fabre Date: Mon, 3 Feb 2025 13:19:06 +0100 Subject: [PATCH 4/5] Remove empty state under ownerships table altogether --- .../ownerships/OwnershipsTable.tsx | 135 +++++++++--------- 1 file changed, 64 insertions(+), 71 deletions(-) diff --git a/src/pages/organizers/[organizerId]/ownerships/OwnershipsTable.tsx b/src/pages/organizers/[organizerId]/ownerships/OwnershipsTable.tsx index f7ded5fa1..c21fc2842 100644 --- a/src/pages/organizers/[organizerId]/ownerships/OwnershipsTable.tsx +++ b/src/pages/organizers/[organizerId]/ownerships/OwnershipsTable.tsx @@ -97,84 +97,77 @@ export const OwnershipsTable = ({ ); return ( - <> - + - - {t('organizers.ownerships.table.user')} - {shouldShowItemId && item id} - {hasActions && ( - - {t('organizers.ownerships.table.actions.title')} - - )} - - - {creator?.email && {creator.email}} - {requests.map((request) => ( - {t('organizers.ownerships.table.user')} + {shouldShowItemId && item id} + {hasActions && ( + + {t('organizers.ownerships.table.actions.title')} + + )} + + + {creator?.email && {creator.email}} + {requests.map((request) => ( + + &:not(:last-child) { + border-bottom: 1px solid ${grey3}; + } + `} + > + + + {shouldShowOwnerId && {request.ownerId}} + {request.ownerEmail} + + + {shouldShowItemId && ( - {shouldShowOwnerId && {request.ownerId}} - {request.ownerEmail} + {request.itemId} - {shouldShowItemId && ( - - - {request.itemId} - - - )} - {hasActions && ( - - - - )} - - ))} - - - {requests.length === 0 && ( - - {t('organizers.ownerships.table.no_results')} - - )} - + )} + {hasActions && ( + + + + )} + + ))} + + ); }; From cf8695da9491abff0f0c4af9adf0561b57acd082 Mon Sep 17 00:00:00 2001 From: Emma Fabre Date: Mon, 3 Feb 2025 13:30:12 +0100 Subject: [PATCH 5/5] Update to v4 of Artifacts action --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 3e1100bab..874b33801 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -68,7 +68,7 @@ jobs: AUTH_CLIENT_SECRET: ${{ secrets.AUTH_CLIENT_SECRET }} run: yarn test:e2e - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: playwright-report