revert: removes expanded option, cards should always start minimized

This commit is contained in:
Lewis Wynne 2026-03-23 18:56:49 +00:00
parent a96acdd0d2
commit 973541e24f
7 changed files with 5 additions and 13 deletions

View file

@ -102,7 +102,6 @@ export function parseTemplate(xml: string, id: string): Template {
const records: RecordDef[] = root.record.map((r: any) => ({
type: r['@_type'],
expanded: r['@_expanded'] === 'true',
preamble: r.preamble?.trim(),
fields: r.field.map(parseField)
}));

View file

@ -189,7 +189,6 @@ const testTemplate: Template = {
records: [
{
type: 'public',
expanded: true,
fields: [
{ label: 'Name', type: 'text' },
{ label: 'Species', type: 'species' },
@ -198,7 +197,6 @@ const testTemplate: Template = {
},
{
type: 'employment',
expanded: false,
preamble: 'This information has been verified by employment agents.',
fields: [
{ label: 'Employment History', type: 'list' },
@ -207,7 +205,6 @@ const testTemplate: Template = {
},
{
type: 'medical',
expanded: false,
preamble: 'Protected by doctor-patient confidentiality.',
fields: [
{
@ -220,7 +217,6 @@ const testTemplate: Template = {
},
{
type: 'security',
expanded: false,
preamble: 'This information has been verified by employment agents.',
fields: [
{ label: 'Attitude Towards SCC', type: 'textarea' },

View file

@ -8,7 +8,7 @@ function makeTemplate(fields: any[]): Template {
name: 'Test',
description: '',
schemaVersion: 1,
records: [{ type: 'public', expanded: true, fields }]
records: [{ type: 'public', fields }]
};
}

View file

@ -15,7 +15,6 @@ const testTemplate: Template = {
records: [
{
type: 'public',
expanded: true,
fields: [
{ label: 'Name', type: 'text' },
{ label: 'Species', type: 'species' }

View file

@ -92,7 +92,6 @@ export type FieldDef =
export interface RecordDef {
type: string;
preamble?: string;
expanded: boolean;
fields: FieldDef[];
}

View file

@ -10,7 +10,6 @@ const template = {
records: [
{
type: 'public',
expanded: true,
fields: [
{ label: 'Name', type: 'text' as const },
{ label: 'Species', type: 'species' as const },