Skip to content

Commit e238861

Browse files
BenPerroclaude
andcommitted
fix: address Sprint 2 code review findings (i18n key, dark mode, empty name, icon differentiation)
- Add session.setup.open i18n key to EN/DE locales - Remove ineffective color:textColor inline style (Tailwind specificity wins) - SessionSetup: add dark mode classes, maxLength=30, trim+fallback on empty name save - PhaseIndicator: Speaker B uses two-person icon to visually distinguish from A Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3ef88f3 commit e238861

5 files changed

Lines changed: 21 additions & 12 deletions

File tree

src/components/PhaseIndicator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function SpeakerIcon({ speaker, className = '' }: { speaker: Speaker; className?
6868
</svg>
6969
) : (
7070
<svg className="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
71-
<path d="M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z" />
71+
<path d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v1h8v-1zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-1a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v1h-3zM4.75 14.094A5.973 5.973 0 004 17v1H1v-1a3 3 0 013.75-2.906z" />
7272
</svg>
7373
)}
7474
</span>

src/components/SessionSetup.tsx

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ const SessionSetup: React.FC<SessionSetupProps> = ({ config, onSave, onCancel })
3636
};
3737

3838
const handleSave = () => {
39-
onSave(localConfig);
39+
const defaults = createDefaultParticipantConfig()
40+
onSave({
41+
...localConfig,
42+
nameA: localConfig.nameA.trim() || defaults.nameA,
43+
nameB: localConfig.nameB.trim() || defaults.nameB,
44+
})
4045
};
4146

4247
const handleReset = () => {
@@ -45,26 +50,27 @@ const SessionSetup: React.FC<SessionSetupProps> = ({ config, onSave, onCancel })
4550

4651
return (
4752
<div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4">
48-
<div className="bg-white rounded-lg shadow-xl w-full max-w-md">
53+
<div className="bg-white dark:bg-gray-800 rounded-lg shadow-xl w-full max-w-md">
4954
<div className="p-6">
50-
<h2 className="text-xl font-bold text-gray-900 mb-4">
55+
<h2 className="text-xl font-bold text-gray-900 dark:text-white mb-4">
5156
{t('session.setup.title', 'Session Setup')}
5257
</h2>
5358

5459
<div className="space-y-6">
5560
{/* Participant A Configuration */}
5661
<div>
57-
<label className="block text-sm font-medium text-gray-700 mb-1">
62+
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
5863
{t('session.setup.nameA', 'Partner A Name')}
5964
</label>
6065
<input
6166
type="text"
6267
value={localConfig.nameA}
6368
onChange={(e) => handleNameChange('A', e.target.value)}
64-
className="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"
69+
maxLength={30}
70+
className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"
6571
/>
6672

67-
<label className="block text-sm font-medium text-gray-700 mt-3 mb-1">
73+
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mt-3 mb-1">
6874
{t('session.setup.colorA', 'Partner A Color')}
6975
</label>
7076
<div className="flex space-x-2">
@@ -93,17 +99,18 @@ const SessionSetup: React.FC<SessionSetupProps> = ({ config, onSave, onCancel })
9399

94100
{/* Participant B Configuration */}
95101
<div>
96-
<label className="block text-sm font-medium text-gray-700 mb-1">
102+
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
97103
{t('session.setup.nameB', 'Partner B Name')}
98104
</label>
99105
<input
100106
type="text"
101107
value={localConfig.nameB}
102108
onChange={(e) => handleNameChange('B', e.target.value)}
103-
className="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"
109+
maxLength={30}
110+
className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"
104111
/>
105112

106-
<label className="block text-sm font-medium text-gray-700 mt-3 mb-1">
113+
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mt-3 mb-1">
107114
{t('session.setup.colorB', 'Partner B Color')}
108115
</label>
109116
<div className="flex space-x-2">

src/components/SessionView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ function ActiveSessionView() {
186186

187187
const showGuidance = !(viewModel.modeId === 'maintain' && !guidanceSettings.enableInMaintain)
188188

189-
const { backgroundColor, textColor } = useParticipantBackground(
189+
const { backgroundColor } = useParticipantBackground(
190190
viewModel.speaker,
191191
viewModel.participantColorA,
192192
viewModel.participantColorB
@@ -195,7 +195,7 @@ function ActiveSessionView() {
195195
return (
196196
<div
197197
className="flex flex-col min-h-screen transition-colors duration-700"
198-
style={backgroundColor !== 'transparent' ? { backgroundColor, color: textColor } : undefined}
198+
style={backgroundColor !== 'transparent' ? { backgroundColor } : undefined}
199199
>
200200
{/* Header with mode name and progress */}
201201
<header className="px-4 py-4 border-b border-gray-200 dark:border-gray-700">

src/i18n/locales/de/translation.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
},
5555
"setup": {
5656
"title": "Sitzungseinrichtung",
57+
"open": "Teilnehmer einrichten",
5758
"nameA": "Name von Partner A",
5859
"nameB": "Name von Partner B",
5960
"colorA": "Farbe von Partner A",

src/i18n/locales/en/translation.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
},
5555
"setup": {
5656
"title": "Session Setup",
57+
"open": "Participant setup",
5758
"nameA": "Partner A Name",
5859
"nameB": "Partner B Name",
5960
"colorA": "Partner A Color",

0 commit comments

Comments
 (0)