Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
927d7f5
Add collection create/edit/delete UI
fhennig Mar 23, 2026
6f028a5
Use default button style for New collection button
fhennig Mar 23, 2026
16ed325
foo
fhennig Mar 23, 2026
c3c1965
hot-fix an issue
fhennig Mar 23, 2026
36ff523
Add lineage filter to variant editor
fhennig Mar 23, 2026
97cd707
Redesign variant editor controls
fhennig Mar 23, 2026
8ff640b
Rename checkbox label and remove coverage query from variant form
fhennig Mar 23, 2026
58b02c0
Add some memoization and callback wrapping
fhennig Mar 25, 2026
2173554
Prevent expensive Gs* web components from re-rendering on variant nam…
fhennig Mar 25, 2026
872c58c
some rebase fixes
fhennig Mar 26, 2026
3bb0e91
delete
fhennig Mar 26, 2026
80b570c
undo
fhennig Mar 26, 2026
845c04d
Polish collection edit/create UI
fhennig Apr 16, 2026
88b8974
Add component and E2E tests for collection create/edit pages [WIP]
fhennig Apr 16, 2026
cac23f6
docs
fhennig Apr 21, 2026
de56dff
Add edit button to collection detail page for owners
fhennig Apr 21, 2026
49d1c37
Add auth fixtures and unauthenticated access test for collection form
fhennig Apr 22, 2026
761a08e
Fix ownership check, error message, and clean up test files
fhennig Apr 22, 2026
e98f50c
Fix TypeScript errors in Inset and CollectionForm
fhennig Apr 22, 2026
01aeae1
Revert accidental XFG* change in wastewaterConfig
fhennig Apr 22, 2026
3414cdb
Revert unused showLabel prop from GsMutationFilter
fhennig Apr 22, 2026
69ca5e5
Use stable clientKey instead of index for variant list keys
fhennig Apr 24, 2026
087ebd1
Use named checkbox selector in CollectionFormPage
fhennig Apr 24, 2026
36a5855
Use named checkbox selector in VariantEditor browser spec
fhennig Apr 24, 2026
2222b26
Use named checkbox selector in CollectionForm browser spec
fhennig Apr 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
292 changes: 0 additions & 292 deletions backend/create-test-collections.sh

This file was deleted.

53 changes: 53 additions & 0 deletions website/src/components/collections/create/CollectionCreate.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { useMutation } from '@tanstack/react-query';

import { getBackendServiceForClientside } from '../../../backendApi/backendService.ts';
import { withQueryProvider } from '../../../backendApi/withQueryProvider.tsx';
import { getClientLogger } from '../../../clientLogger.ts';
import type { DashboardsConfig } from '../../../config.ts';
import type { Organism } from '../../../types/Organism.ts';
import { Page } from '../../../types/pages.ts';
import { getErrorLogMessage } from '../../../util/getErrorLogMessage.ts';
import { CollectionForm, type CollectionFormValues } from '../form/CollectionForm.tsx';

export const CollectionCreate = withQueryProvider(CollectionCreateInner);

const logger = getClientLogger('CollectionCreate');

function CollectionCreateInner({ organism, config }: { organism: Organism; config: DashboardsConfig }) {
const createMutation = useMutation({
mutationFn: (values: CollectionFormValues) =>
getBackendServiceForClientside().postCollection({
collection: {
name: values.name,
organism,
description: values.description || undefined,
variants: values.variants,
},
}),
onSuccess: () => {
window.location.href = Page.collectionsForOrganism(organism);
},
onError: (err) => {
logger.error(`Failed to create collection: ${getErrorLogMessage(err)}`);
},
});

return (
<div className='pb-6'>
<CollectionForm
onSubmit={(values) => createMutation.mutate(values)}
isSubmitting={createMutation.isPending}
isSuccess={createMutation.isSuccess}
successMessage='Collection created.'
submitLabel='Create collection'
organism={organism}
config={config}
/>
{createMutation.isError && (
<div className='alert alert-error mt-4'>
Failed to create collection: {getErrorLogMessage(createMutation.error)}
</div>
)}
</div>
);
}
20 changes: 16 additions & 4 deletions website/src/components/collections/detail/CollectionDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ function CollectionDetailInner({
organism,
collection,
lapisConfig,
isOwner,
}: {
organism: Organism;
collection: Collection;
lapisConfig: LapisConfig;
isOwner: boolean;
}) {
const organismName = organismConfig[organism].label;
const dateFrom30 = dayjs().subtract(30, 'day').format('YYYY-MM-DD');
Expand All @@ -38,10 +40,20 @@ function CollectionDetailInner({
return (
<div className='flex flex-col gap-4'>
<div>
<PageHeadline>
<span className='mr-2 font-normal text-gray-400'>#{collection.id}</span>
{collection.name}
</PageHeadline>
<div className='flex items-start justify-between gap-4'>
<PageHeadline>
<span className='mr-2 font-normal text-gray-400'>#{collection.id}</span>
{collection.name}
</PageHeadline>
{isOwner && (
<a
href={Page.editCollection(organism, String(collection.id))}
className='btn btn-sm mt-1 shrink-0'
>
Edit
</a>
)}
</div>
{collection.description !== null && <p className='mt-1 text-gray-500'>{collection.description}</p>}
<p className='mt-1 text-sm text-gray-500'>
{organismName} collection owned by {collection.ownedBy}
Expand Down
Loading
Loading