Skip to content

Commit

Permalink
feat(website): update with comments
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-parker committed Jan 14, 2025
1 parent 393d729 commit efd0797
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
18 changes: 18 additions & 0 deletions docs/src/content/docs/reference/helm-chart-config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,24 @@ Each organism object has the following fields:
<td></td>
<td>Whether the field is required by backend</td>
</tr>
<tr>
<td>`desired`</td>
<td>Boolean</td>
<td></td>
<td>Whether the field is a desired input field for submitters</td>
</tr>
<tr>
<td>`definition`</td>
<td>Boolean</td>
<td></td>
<td>Definition of input field for submitters</td>
</tr>
<tr>
<td>`guidance`</td>
<td>Boolean</td>
<td></td>
<td>Guidance for submitters on filling in input field</td>
</tr>
<tr>
<td>`noInput`</td>
<td>Boolean</td>
Expand Down
4 changes: 2 additions & 2 deletions website/src/components/MetadataTable.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import { getConfiguredOrganisms, getSchema } from '../config';
import OrganismTableSelector from './OrganismTableSelector';
import type { OrganismMetadata } from './OrganismTableSelector';
import OrganismTableSelector from './OrganismMetadataTableSelector';
import type { OrganismMetadata } from './OrganismMetadataTableSelector';
const configuredOrganisms = getConfiguredOrganisms();
const organisms: OrganismMetadata[] = configuredOrganisms.map((organism) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React, { useState, useEffect } from 'react';
import type { FC } from 'react';

import { routes } from '../routes/routes.ts';
import type { Metadata, InputField } from '../types/config';
import { groupFieldsByHeader } from '../utils/groupFieldsByHeader';
import type { Metadata, InputField } from '../types/config.ts';
import { groupFieldsByHeader } from '../utils/groupFieldsByHeader.ts';
import IwwaArrowDown from '~icons/iwwa/arrow-down';

export type OrganismMetadata = {
Expand All @@ -17,7 +17,7 @@ type Props = {
organisms: OrganismMetadata[];
};

const OrganismTableSelector: FC<Props> = ({ organisms }) => {
const OrganismMetadataTableSelector: FC<Props> = ({ organisms }) => {
const [selectedOrganism, setSelectedOrganism] = useState<OrganismMetadata | null>(null);
const [groupedFields, setGroupedFields] = useState<Map<string, InputField[]>>(new Map());
const [expandedHeaders, setExpandedHeaders] = useState<Set<string>>(new Set(['Required fields', 'Desired fields']));
Expand Down Expand Up @@ -94,7 +94,7 @@ const OrganismTableSelector: FC<Props> = ({ organisms }) => {
);
};

export default OrganismTableSelector;
export default OrganismMetadataTableSelector;

type TableProps = {
fields: InputField[];
Expand Down

0 comments on commit efd0797

Please sign in to comment.