From db3a418d3cb1f1a64b623077809461ba14f62612 Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 10 Sep 2025 23:05:02 -0500 Subject: [PATCH] aligned manual persona editor tabs and fields with view-only mode - removed tabs and fields from manual edit mode that don't show up in view-only detail mode --- dist/index.html | 2 +- src/components/persona/PersonaEditor.tsx | 891 +++++++---------------- 2 files changed, 279 insertions(+), 614 deletions(-) diff --git a/dist/index.html b/dist/index.html index 6ba40893..44a8d37a 100644 --- a/dist/index.html +++ b/dist/index.html @@ -7,7 +7,7 @@ - + diff --git a/src/components/persona/PersonaEditor.tsx b/src/components/persona/PersonaEditor.tsx index 113135dc..344f45bc 100644 --- a/src/components/persona/PersonaEditor.tsx +++ b/src/components/persona/PersonaEditor.tsx @@ -97,14 +97,14 @@ export default function PersonaEditor({ persona, onSave, onCancel }: PersonaEdit })); }; - const handleArrayAdd = (field: 'goals' | 'frustrations' | 'motivations' | 'scenarios' | 'fears') => { + const handleArrayAdd = (field: 'goals' | 'frustrations' | 'motivations' | 'scenarios') => { setEditedPersona(prev => ({ ...prev, [field]: [...(prev[field] || []), ''] })); }; - const handleArrayUpdate = (field: 'goals' | 'frustrations' | 'motivations' | 'scenarios' | 'fears', index: number, value: string) => { + const handleArrayUpdate = (field: 'goals' | 'frustrations' | 'motivations' | 'scenarios', index: number, value: string) => { setEditedPersona(prev => { const newArray = [...(prev[field] || [])]; newArray[index] = value; @@ -115,7 +115,7 @@ export default function PersonaEditor({ persona, onSave, onCancel }: PersonaEdit }); }; - const handleArrayRemove = (field: 'goals' | 'frustrations' | 'motivations' | 'scenarios' | 'fears', index: number) => { + const handleArrayRemove = (field: 'goals' | 'frustrations' | 'motivations' | 'scenarios', index: number) => { setEditedPersona(prev => { const newArray = [...(prev[field] || [])]; newArray.splice(index, 1); @@ -366,141 +366,147 @@ export default function PersonaEditor({ persona, onSave, onCancel }: PersonaEdit - - - Basic - Cooper + + + General + Cooper Profile Personality - Demographics - Lifestyle - Extended + Scenarios - + -
-
+
+
+
+ {editedPersona.name?.charAt(0) || 'P'} +
+
+
handleChange('name', e.target.value)} + className="w-64" />
- -
-
- - -
- -
- - -
-
-
handleChange('occupation', e.target.value)} + className="w-64" />
- -
- - -
- -
- - handleChange('location', e.target.value)} - /> -
- -
- - -
- -
-
- -