Refactor Create Group form with field-by-field rendering and error handling#964
Refactor Create Group form with field-by-field rendering and error handling#964Dhairya1890 wants to merge 1 commit intoalphaonelabs:mainfrom
Conversation
WalkthroughA single template file is updated to replace basic form rendering with a responsive, field-by-field form layout that includes form error alerts, dark mode styling via inline CSS, and improved visual hierarchy. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@web/templates/web/study/create_group.html`:
- Line 13: Add aria-hidden="true" to the decorative <i> icons so they are
ignored by assistive tech; specifically update the <i class="fas fa-users
text-2xl text-green-600 dark:text-green-400"> element and the other decorative
<i> elements referenced around lines 21 and 52 to include aria-hidden="true" (or
an equivalent attribute) while leaving semantic labels for real controls
unchanged so visual appearance stays the same but screen readers won't announce
them.
- Around line 34-47: The template renders form fields using raw widgets
(references: form, field, field.field.widget.input_type, field.id_for_label) and
relies on a large inline <style> block; remove that custom CSS and instead add
Tailwind utility classes to the form widgets via their widget attrs in the form
definition (or Form __init__) so templates only output {{ field }} with
Tailwind-styled widgets, update label markup to use the same Tailwind classes
shown (e.g., block/text-sm/font-medium/mb-1.5 and inline-flex/items-center/gap-3
for checkboxes), and then delete the inline style block (lines 67-166) from the
template to comply with the Tailwind-only rule.
- Line 60: The primary submit button in create_group.html currently uses green
utility classes (e.g., bg-green-600 hover:bg-green-700 active:bg-green-800) —
replace that class attribute on the submit button element with the project
primary button classes: "bg-teal-300 hover:bg-teal-400 text-white px-6 py-2
rounded-lg transition duration-200" (keep any necessary focus/outline classes
like focus:outline-none and focus:ring-* if present).
|
I see there is lot's of changes in CSS, could you please add a screen recording showing the page in both light and dark mode, as well as responsiveness and also the error handling you have added. |
|
@ghanshyam2005singh Sure, Here is the screen recording Screencast.From.2026-02-26.20-41-45.mp4Update : Forgot to test responsiveness, you can see the test here Screencast.From.2026-02-26.21-27-04.mp4 |
Related issues
Fixes #952
Checklist
Summary by CodeRabbit
Release Notes
New Features
Style