-
Notifications
You must be signed in to change notification settings - Fork 5
Assessment: Adjust CompetencyHeader and ScoreLevelSelector styles for 2xl screens
#952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Assessment: Adjust CompetencyHeader and ScoreLevelSelector styles for 2xl screens
#952
Conversation
WalkthroughRemoved 2xl responsive Tailwind CSS grid classes from CompetencyHeader and ScoreLevelSelector components in AssessmentForm. CompetencyHeader no longer uses 2xl:col-span-1, and ScoreLevelSelector no longer uses 2xl:col-span-4, simplifying the responsive grid layout behavior at extra-large breakpoints. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
clients/assessment_component/src/assessment/pages/AssessmentPage/components/AssessmentForm/AssessmentForm.tsx (1)
209-212:completed ??prevents completed-state background from ever applyingBecause
completedis always a boolean (defaulting tofalse),completed ?? 'bg-gray-700 border-gray-700'will always evaluate totrueorfalse, so the gray background/border classes are never actually passed tocn. If the intent is to style completed assessments differently, use a conditional class instead, e.g.:- className={cn( - 'grid grid-cols-1 lg:grid-cols-2 gap-4 items-start p-4 border rounded-md', - completed ?? 'bg-gray-700 border-gray-700', - )} + className={cn( + 'grid grid-cols-1 lg:grid-cols-2 gap-4 items-start p-4 border rounded-md', + completed && 'bg-gray-700 border-gray-700', + )}
🧹 Nitpick comments (1)
clients/assessment_component/src/assessment/pages/AssessmentPage/components/AssessmentForm/AssessmentForm.tsx (1)
222-245: ScoreLevelSelector col-span change looks good; consider aligning grid columns with 4 score levelsDropping the
2xl:col-span override and keepinglg:col-span-2ensures the selector also uses the full grid width consistently across ≥lg breakpoints, matching the header behavior. That change looks correct.Given there are exactly 4 score levels, you might optionally consider changing the internal layout from
lg:grid-cols-5tolg:grid-cols-4so the grid matches the number of items and avoids an extra empty column, assuming this doesn’t conflict with design spacing requirements. Based on learnings, this would better reflect the 4-level structure.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
clients/assessment_component/src/assessment/pages/AssessmentPage/components/AssessmentForm/AssessmentForm.tsx(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: rappm
Repo: ls1intum/prompt2 PR: 540
File: clients/assessment_component/src/assessment/pages/AssessmentPage/components/AssessmentForm.tsx:96-97
Timestamp: 2025-05-26T10:38:42.515Z
Learning: The assessment system has 4 assessment score levels, so grid layouts should accommodate exactly 4 items to maintain visual balance and avoid uneven layouts.
📚 Learning: 2025-04-17T18:24:33.223Z
Learnt from: rappm
Repo: ls1intum/prompt2 PR: 415
File: servers/assessment/assessments/remainingAssessments/remainingAssessmentsDTO/remainingAssessments.go:1-1
Timestamp: 2025-04-17T18:24:33.223Z
Learning: The package rename from `assessmentDTO` to `remainingAssessmentsDTO` in servers/assessment/assessments/remainingAssessments/remainingAssessmentsDTO/remainingAssessments.go was a targeted change specific to the remaining assessments functionality, not a global package rename. Only files directly working with remaining assessments functionality should have their imports updated.
Applied to files:
clients/assessment_component/src/assessment/pages/AssessmentPage/components/AssessmentForm/AssessmentForm.tsx
📚 Learning: 2025-06-21T20:23:39.827Z
Learnt from: rappm
Repo: ls1intum/prompt2 PR: 613
File: clients/assessment_component/src/assessment/pages/AssessmentPage/components/AssessmentForm/components/ScoreLevelSelector.tsx:57-62
Timestamp: 2025-06-21T20:23:39.827Z
Learning: In the assessment component, the Competency interface has description properties for all ScoreLevel enum values, following the naming pattern `description${ScoreLevel}`. This means dynamic property access like `competency[descriptionBeginner]` is safe and guaranteed to exist.
Applied to files:
clients/assessment_component/src/assessment/pages/AssessmentPage/components/AssessmentForm/AssessmentForm.tsx
🧬 Code graph analysis (1)
clients/assessment_component/src/assessment/pages/AssessmentPage/components/AssessmentForm/AssessmentForm.tsx (1)
clients/assessment_component/src/assessment/pages/components/ScoreLevelSelector.tsx (1)
ScoreLevelSelector(33-174)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
- GitHub Check: build-clients / clients-base / Build Docker Image for ghcr.io/ls1intum/prompt2/prompt-clients-base
- GitHub Check: build-clients / clients-base / Build Docker Image for ghcr.io/ls1intum/prompt2/prompt-clients-base
- GitHub Check: build-servers / self-team-allocation / Build Docker Image for ghcr.io/ls1intum/prompt2/prompt-server-self-team-allocation
- GitHub Check: build-servers / team-allocation / Build Docker Image for ghcr.io/ls1intum/prompt2/prompt-server-team-allocation
- GitHub Check: build-servers / self-team-allocation / Build Docker Image for ghcr.io/ls1intum/prompt2/prompt-server-self-team-allocation
- GitHub Check: build-servers / assessment / Build Docker Image for ghcr.io/ls1intum/prompt2/prompt-server-assessment
- GitHub Check: build-servers / team-allocation / Build Docker Image for ghcr.io/ls1intum/prompt2/prompt-server-team-allocation
- GitHub Check: build-servers / assessment / Build Docker Image for ghcr.io/ls1intum/prompt2/prompt-server-assessment
- GitHub Check: build-servers / core / Build Docker Image for ghcr.io/ls1intum/prompt2/prompt-server-core
- GitHub Check: build-servers / core / Build Docker Image for ghcr.io/ls1intum/prompt2/prompt-server-core
- GitHub Check: build-servers / intro-course / Build Docker Image for ghcr.io/ls1intum/prompt2/prompt-server-intro-course
- GitHub Check: build-servers / intro-course / Build Docker Image for ghcr.io/ls1intum/prompt2/prompt-server-intro-course
- GitHub Check: Analyze (go)
- GitHub Check: Analyze (go)
🔇 Additional comments (1)
clients/assessment_component/src/assessment/pages/AssessmentPage/components/AssessmentForm/AssessmentForm.tsx (1)
214-220: CompetencyHeader now consistently spans full width on ≥lg breakpointsUsing only
lg:col-span-2(and removing the 2xl override) makes the header span the full two columns of the parent grid for all breakpoints ≥lg, which aligns with the PR goal of avoiding the half-width header on very large screens. This looks good and doesn’t introduce layout regressions within this component.
✨ What is the change?
📌 Reason for the change / Link to issue
🧪 How to Test
🖼️ Screenshots (if UI changes are included)
✅ PR Checklist
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.