diff --git a/docs/src/content/docs/for-administrators/setup-with-kubernetes.md b/docs/src/content/docs/for-administrators/setup-with-kubernetes.md
index 797a538c5..a9268f6ab 100644
--- a/docs/src/content/docs/for-administrators/setup-with-kubernetes.md
+++ b/docs/src/content/docs/for-administrators/setup-with-kubernetes.md
@@ -134,7 +134,7 @@ organisms:
In this example, the configuration for the "ebolavirus-sudan" organism is defined. It includes schema settings, website display options, silo configuration, preprocessing details, and reference genome information.
-Note the metadata section includes various fields for how the metadata of specific sequences should be displayed. Each metadata item must have a `name` which will also be displayed on the page unless `displayName` is also set. The `type` of the data, as well as if the field is `required` and if `autoComplete` is enabled can also be added. Additionally, links from metadata entries to external websites can be added using the `customDisplay` option. We also allow metadata to be grouped in sections, specified by the `header` field. The `noInput` parameter specifies that a parameter is generated internally by loculus (can be specified in the preprocessing pipeline) and should not be expected as input.
+Note the metadata section includes various fields for how the metadata of specific sequences should be displayed. Each metadata item must have a `name` which will also be displayed on the page unless `displayName` is also set. The `type` of the data, as well as if the field is `required` and if `autoComplete` is enabled can also be added. Additionally, links from metadata entries to external websites can be added using the `customDisplay` option. We also allow metadata to be grouped in sections, specified by the `header` field. The `noInput` parameter specifies that a parameter is generated internally by loculus (can be specified in the preprocessing pipeline) and should not be expected as input. You can optionally add a `columnWidth` for the column in the search table, in pixels, which will be the minimal width for the column.
Your preprocessing pipeline can be customized for each organism. Currently, we use `nextclade run` in our preprocessing pipeline and we suggest it as a fast option to do basic checks on your input sequences. Given a `nextclade dataset` (in its simplest form a reference sequence and a gene_annotation file) nextclade tries to align new sequences to the reference and will discard sequences that cannot be aligned. It will also compute mutations, insertions and deletions for the nucleotide sequence as well as for the corresponding genes. If you would like to use our preprocessing set-up you can add a nextclade dataset to your `values.yaml` as follows:
diff --git a/docs/src/content/docs/reference/helm-chart-config.mdx b/docs/src/content/docs/reference/helm-chart-config.mdx
index f7ac8e88a..93181e037 100644
--- a/docs/src/content/docs/reference/helm-chart-config.mdx
+++ b/docs/src/content/docs/reference/helm-chart-config.mdx
@@ -643,6 +643,12 @@ Each organism object has the following fields:
faster filters. It is recommended if the number of different values is rather small.
+
+ `columnWidth` |
+ Number |
+ |
+ The minimum column width for this field on the search table. |
+
`autocomplete` |
Boolean |
diff --git a/kubernetes/loculus/templates/_common-metadata.tpl b/kubernetes/loculus/templates/_common-metadata.tpl
index 6d1cbfe4e..2bc014041 100644
--- a/kubernetes/loculus/templates/_common-metadata.tpl
+++ b/kubernetes/loculus/templates/_common-metadata.tpl
@@ -67,12 +67,14 @@ fields:
type: timestamp
displayName: Date released
header: Submission details
+ columnWidth: 100
- name: releasedDate
type: string
hideOnSequenceDetailsPage: true
generateIndex: true
autocomplete: true
displayName: Date released (exact)
+ columnWidth: 100
- name: dataUseTerms
type: string
generateIndex: true
@@ -211,6 +213,9 @@ organisms:
{{- if .truncateColumnDisplayTo }}
truncateColumnDisplayTo: {{ .truncateColumnDisplayTo }}
{{- end }}
+ {{- if .columnWidth }}
+ columnWidth: {{ .columnWidth }}
+ {{- end }}
{{- if .customDisplay }}
customDisplay:
type: {{ quote .customDisplay.type }}
diff --git a/kubernetes/loculus/values.yaml b/kubernetes/loculus/values.yaml
index 6b5a8efab..5bdf8c80d 100644
--- a/kubernetes/loculus/values.yaml
+++ b/kubernetes/loculus/values.yaml
@@ -75,6 +75,7 @@ defaultOrganismConfig: &defaultOrganismConfig
fieldType: dateRangeString
required: true
notSearchable: true
+ columnWidth: 100
- name: sampleCollectionDateRangeLower
displayName: Collection date (lower bound)
type: date
@@ -128,6 +129,7 @@ defaultOrganismConfig: &defaultOrganismConfig
inputs:
timestamp: ncbiReleaseDate
noInput: true
+ columnWidth: 100
- name: ncbiUpdateDate
type: date
displayName: NCBI update date
@@ -139,6 +141,7 @@ defaultOrganismConfig: &defaultOrganismConfig
noInput: true
perSegment: true
oneHeader: true
+ columnWidth: 100
- name: geoLocLatitude
displayName: Latitude
header: Sample details
@@ -500,12 +503,13 @@ defaultOrganismConfig: &defaultOrganismConfig
type: authors
header: Authors
enableSubstringSearch: true
- truncateColumnDisplayTo: 15
+ truncateColumnDisplayTo: 25
ingest: ncbiSubmitterNames
preprocessing:
function: check_authors
inputs:
authors: authors
+ columnWidth: 140
- name: authorAffiliations
displayName: Author affiliations
enableSubstringSearch: true
diff --git a/website/src/components/SearchPage/Table.tsx b/website/src/components/SearchPage/Table.tsx
index b6a426a00..4b64ece74 100644
--- a/website/src/components/SearchPage/Table.tsx
+++ b/website/src/components/SearchPage/Table.tsx
@@ -42,6 +42,9 @@ type TableProps = {
columnsToShow: string[];
};
+const getColumnWidthStyle = (columnWidth: number | undefined) =>
+ columnWidth !== undefined ? `${columnWidth}px` : undefined;
+
export const Table: FC = ({
data,
schema,
@@ -63,6 +66,7 @@ export const Table: FC = ({
headerName: schema.metadata.find((m) => m.name === field)?.displayName ?? capitalCase(field),
maxLength: maxLengths[field],
type: schema.metadata.find((m) => m.name === field)?.type ?? 'string',
+ columnWidth: schema.metadata.find((m) => m.name === field)?.columnWidth,
}));
const handleSort = (field: string) => {
@@ -145,6 +149,9 @@ export const Table: FC = ({
key={c.field}
onClick={() => handleSort(c.field)}
className='px-2 py-3 text-xs font-medium tracking-wider text-gray-500 uppercase cursor-pointer last:pr-6 text-left'
+ style={{
+ minWidth: getColumnWidthStyle(c.columnWidth),
+ }}
>
{c.headerName} {orderBy.field === c.field && orderIcon}
@@ -198,6 +205,9 @@ export const Table: FC = ({
c.maxLength
diff --git a/website/src/types/config.ts b/website/src/types/config.ts
index d96aaaf91..f884ec8af 100644
--- a/website/src/types/config.ts
+++ b/website/src/types/config.ts
@@ -54,6 +54,7 @@ export const metadata = z.object({
rangeSearch: z.boolean().optional(),
rangeOverlapSearch: rangeOverlapSearch.optional(),
substringSearch: z.boolean().optional(),
+ columnWidth: z.number().optional(),
});
export const inputField = z.object({
|