From a3f31e92c13cd13dd89937bea4239f263c4fe773 Mon Sep 17 00:00:00 2001 From: Yared Yemane Date: Tue, 14 Apr 2026 07:56:37 -0700 Subject: [PATCH] refine lesson creation form styling and soften lesson tab contrast Restyle the lesson creation flow to match the polished practice experience with cleaner step visuals and section layouts, and reduce high-contrast accents in the lessons panel for a calmer UI. Made-with: Cursor --- .../content-management/AddNewLessonPage.tsx | 62 +++++++++++++------ .../content-management/HumanLanguagePage.tsx | 14 ++--- 2 files changed, 50 insertions(+), 26 deletions(-) diff --git a/src/pages/content-management/AddNewLessonPage.tsx b/src/pages/content-management/AddNewLessonPage.tsx index 24d60c7..8f5a759 100644 --- a/src/pages/content-management/AddNewLessonPage.tsx +++ b/src/pages/content-management/AddNewLessonPage.tsx @@ -99,6 +99,12 @@ function isDirectVideoFile(url: string): boolean { return /\.(mp4|webm|ogg|mov|m4v)$/.test(clean) } +function stepNodeClass(active: boolean, completed: boolean): string { + if (active) return "bg-grayScale-900 text-white ring-4 ring-grayScale-200" + if (completed) return "bg-grayScale-700 text-white" + return "border-2 border-grayScale-300 bg-white text-grayScale-400" +} + export function AddNewLessonPage() { const { categoryId, courseId, subModuleId } = useParams() const navigate = useNavigate() @@ -277,19 +283,18 @@ export function AddNewLessonPage() {
step.number - ? "bg-brand-500 text-white" - : "border-2 border-grayScale-300 bg-white text-grayScale-400" - }`} + className={`flex h-9 w-9 items-center justify-center rounded-full text-xs font-semibold shadow-sm sm:h-10 sm:w-10 sm:text-sm ${stepNodeClass( + currentStep === step.number, + currentStep > step.number, + )}`} > {currentStep > step.number ? : step.number}
{step.label}
- {index < STEPS.length - 1 ?
: null} + {index < STEPS.length - 1 ? ( +
step.number ? "bg-grayScale-700" : "bg-grayScale-200"}`} /> + ) : null}
))}
@@ -297,19 +302,30 @@ export function AddNewLessonPage() { ) : null} {currentStep === 1 ? ( - -

Step 1: Context

+ +
+

Step 1: Context

+

+ Define lesson metadata that will be stored in the linked question set. +

+
+
- setLessonTitle(e.target.value)} placeholder="Enter lesson title" /> + setLessonTitle(e.target.value)} + placeholder="Enter lesson title" + className="h-11" + />