From b66f966adb0ee6f1c1038a561fdae4a63864545f Mon Sep 17 00:00:00 2001 From: shay Date: Mon, 20 Apr 2026 14:38:29 -0400 Subject: [PATCH] feat(workshop): refactor achievements section for improved layout. --- .../frontend/src/screens/WorkshopScreen.tsx | 145 +++++++++--------- 1 file changed, 70 insertions(+), 75 deletions(-) diff --git a/generator/frontend/src/screens/WorkshopScreen.tsx b/generator/frontend/src/screens/WorkshopScreen.tsx index 1f18b5d..da18332 100644 --- a/generator/frontend/src/screens/WorkshopScreen.tsx +++ b/generator/frontend/src/screens/WorkshopScreen.tsx @@ -553,13 +553,76 @@ export function WorkshopScreen({ )} {w.id === 'achievements' && ( -
- Max shown - updateWidgetSetting('achievements', 'max_items', v)} - /> +
+
+ Max shown + updateWidgetSetting('achievements', 'max_items', v)} + /> +
+
+ {settings.achievements.map((ach, aidx) => ( +
+
+ {ICONS.map(ic => { + const selected = ach.icon === ic.id + return ( + + ) + })} +
+ +
+ updateAchievement(aidx, 'title', e.target.value)} + placeholder="Title (e.g. Hackathon Winner)" + className="w-full px-2 py-1.5 rounded-md border border-gray-200 bg-white text-xs text-gray-800 placeholder:text-gray-300 focus:outline-none focus:ring-1 focus:ring-gray-300 mb-1.5" + /> + updateAchievement(aidx, 'subtitle', e.target.value)} + placeholder="Subtitle (e.g. 1st Place · AI Track)" + className="w-full px-2 py-1.5 rounded-md border border-gray-200 bg-white text-xs text-gray-800 placeholder:text-gray-300 focus:outline-none focus:ring-1 focus:ring-gray-300 mb-1.5" + /> + updateAchievement(aidx, 'event_date', e.target.value)} + placeholder="Date (e.g. 2025-01)" + className="w-full px-2 py-1.5 rounded-md border border-gray-200 bg-white text-xs text-gray-800 placeholder:text-gray-300 focus:outline-none focus:ring-1 focus:ring-gray-300" + /> +
+ ))} + +
)}
@@ -570,74 +633,6 @@ export function WorkshopScreen({
- {/* Achievements editor */} - {settings.widgets.includes('achievements') && ( -
-
Achievements
-
- {settings.achievements.map((ach, idx) => ( -
-
- {ICONS.map(ic => { - const selected = ach.icon === ic.id - return ( - - ) - })} -
- -
- updateAchievement(idx, 'title', e.target.value)} - placeholder="Title (e.g. Hackathon Winner)" - className="w-full px-2 py-1.5 rounded-md border border-gray-200 bg-white text-xs text-gray-800 placeholder:text-gray-300 focus:outline-none focus:ring-1 focus:ring-gray-300 mb-1.5" - /> - updateAchievement(idx, 'subtitle', e.target.value)} - placeholder="Subtitle (e.g. 1st Place · AI Track)" - className="w-full px-2 py-1.5 rounded-md border border-gray-200 bg-white text-xs text-gray-800 placeholder:text-gray-300 focus:outline-none focus:ring-1 focus:ring-gray-300 mb-1.5" - /> - updateAchievement(idx, 'event_date', e.target.value)} - placeholder="Date (e.g. 2025-01)" - className="w-full px-2 py-1.5 rounded-md border border-gray-200 bg-white text-xs text-gray-800 placeholder:text-gray-300 focus:outline-none focus:ring-1 focus:ring-gray-300" - /> -
- ))} - -
-
- )} - {/* Spacer */}