Skip to content

feat(website): added display names for file categories#6131

Merged
tombch merged 9 commits intomainfrom
file-display-names
Mar 16, 2026
Merged

feat(website): added display names for file categories#6131
tombch merged 9 commits intomainfrom
file-display-names

Conversation

@tombch
Copy link
Copy Markdown
Collaborator

@tombch tombch commented Mar 12, 2026

Addresses #4315 by adding a displayName property for both the user-submitted file category and the output metadata fields for files. Also adds the display name for the file category within the folder upload component for clarity.

Screenshot

e.g. in the 'Extra files' section when uploading, for raw_reads, the area now has a display name:

image

PR Checklist

  • All necessary documentation has been adapted.
  • The implemented feature is covered by appropriate, automated tests.
  • Any manual testing that has been done is documented (i.e. what exactly was tested?)

🚀 Preview: Add preview label to enable

@claude claude Bot added website Tasks related to the web application deployment Code changes targetting the deployment infrastructure labels Mar 12, 2026
@tombch tombch marked this pull request as ready for review March 12, 2026 18:05
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 12, 2026

Claude finished @tombch's task in 2m 11s —— View job


Code Review

  • Gather context and read changed files
  • Review code changes
  • Post review feedback

Overall this is a clean, well-scoped change. The displayName ?? name fallback pattern is consistent with how other fields in the codebase handle optional display names. A couple of minor points below.

website/src/components/Submission/FileUpload/FolderUploadComponent.spec.tsx

The test fixture sets displayName: 'Extra Files' and the test at line 60 asserts the display name is shown. However, there's no test for the fallback case — when displayName is undefined, the component should display fileCategory.name instead. Worth adding a small test to cover that branch: Fix this →

kubernetes/loculus/templates/_common-metadata.tpl (lines ~269–274)

        - name: {{ .name }}
          {{ if .displayName }}
          displayName: {{ .displayName }}
          {{ end }}
          type: string

The unstripped {{ if ... }} / {{ end }} blocks (no - prefix) emit extra blank lines in the generated YAML. This is functionally harmless since YAML ignores blank lines in mappings, but using {{- if .displayName }} / {{- end }} would produce cleaner output, consistent with how the rest of the template handles optional fields.

Everything else looks good — the zod schema addition in config.ts follows the existing displayName: z.string().optional() pattern, the JSON schema additions in values.schema.json are accurate, and the values.yaml example is helpful.

@anna-parker anna-parker added the preview Triggers a deployment to argocd label Mar 13, 2026
Copy link
Copy Markdown
Contributor

@anna-parker anna-parker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! the preview looks good!

@anna-parker anna-parker removed the preview Triggers a deployment to argocd label Mar 15, 2026
@tombch tombch merged commit 5221c61 into main Mar 16, 2026
50 of 52 checks passed
@tombch tombch deleted the file-display-names branch March 16, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deployment Code changes targetting the deployment infrastructure website Tasks related to the web application

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants