Skip to content

Added interactions to all the three cards#944

Open
withinJoel wants to merge 2 commits intoalphaonelabs:mainfrom
withinJoel:page-cards-hover-issue
Open

Added interactions to all the three cards#944
withinJoel wants to merge 2 commits intoalphaonelabs:mainfrom
withinJoel:page-cards-hover-issue

Conversation

@withinJoel
Copy link

@withinJoel withinJoel commented Feb 23, 2026

Related issues

Fixes #943

Checklist

  • [ x] Did you run the pre-commit? (If not, your PR will most likely not pass — please ensure it passes pre-commit)
  • [ x] Did you test the change? (Ensure you didn’t just prompt the AI and blindly commit — test the code and confirm it works)
  • Added screenshots to the PR description (if applicable)

Summary by CodeRabbit

  • Style
    • Improved quiz card interactions across My Quizzes, Shared With Me, and Public Quizzes with smooth transition animations on hover and focus, adding subtle lift and shadow effects for clearer visual feedback and a more responsive feel. No changes to content or data behavior.

@github-actions github-actions bot added the files-changed: 1 PR changes 1 file label Feb 23, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 23, 2026

Walkthrough

Added Tailwind CSS transition, hover, and focus-within classes to the three quiz category cards on the quiz list page so they animate with a 300ms upward translate and deeper shadow on hover/focus. No DOM, data, or functional changes.

Changes

Cohort / File(s) Summary
Quiz list card styles
web/templates/web/quiz/quiz_list.html
Added Tailwind classes (transition-all, duration-300, hover:-translate-y-1, hover:shadow-2xl, focus-within:-translate-y-1, focus-within:shadow-2xl) to the three quiz category card containers (My Quizzes, Shared With Me, Public Quizzes) to enable smooth hover/focus lift and shadow animations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding hover/focus interactions to the three quiz cards on the page.
Linked Issues check ✅ Passed The code changes fully implement the requirements from issue #943: cards now lift slightly (hover:-translate-y-1), show deeper shadows (hover:shadow-2xl), and animate smoothly (transition duration-300).
Out of Scope Changes check ✅ Passed All changes are scoped to implementing hover/focus interactions on the three quiz cards; no unrelated modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 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/quiz/quiz_list.html`:
- Line 27: Update the card container divs in
web/templates/web/quiz/quiz_list.html that currently have the classes "bg-white
dark:bg-gray-800 rounded-lg shadow-lg overflow-hidden transition-all
duration-300 hover:-translate-y-1 hover:shadow-2xl" to also include the
corresponding focus-within variants so keyboard focus mirrors hover (e.g., add
"focus-within:-translate-y-1 focus-within:shadow-2xl"); apply the same change to
the other two card blocks mentioned (lines with the same div pattern).
- Line 27: The long Tailwind class strings on the three card containers (the
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-lg overflow-hidden
transition-all duration-300 hover:-translate-y-1 hover:shadow-2xl"> instances at
the spots you changed) exceed the 120-char djlint limit; split the class
attribute across multiple lines (group utilities or put one or a few classes per
line) so each line stays ≤120 chars, apply the same split pattern to the other
two identical <div> elements, and then reformat the template with djlint
(120-char config) to ensure the file passes linting.

ℹ️ Review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 20cc175 and e53941c.

📒 Files selected for processing (1)
  • web/templates/web/quiz/quiz_list.html

Updated transition classes for quiz card components to include focus states.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 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/quiz/quiz_list.html`:
- Around line 27-29: The card transform classes (hover:-translate-y-1 and
focus-within:-translate-y-1) are applied unconditionally; update the card
container class strings (the div with classes starting "bg-white
dark:bg-gray-800 rounded-lg shadow-lg overflow-hidden ...") to prefix those
transform utilities with Tailwind's motion-safe: so use
motion-safe:hover:-translate-y-1 and motion-safe:focus-within:-translate-y-1
(apply the same change to the other two card blocks with the identical class
pattern).
- Around line 27-29: The "My Quizzes" card's outer div (the element starting
with class "bg-white dark:bg-gray-800 rounded-lg shadow-lg overflow-hidden
transition...") is missing the h-full utility, causing inconsistent heights with
the other cards; update that div's class list to include "h-full" so it
stretches to match sibling cards (same fix applied for the card elements on
lines where Cards 2 and 3 already use h-full).

ℹ️ Review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e53941c and 7ca53fd.

📒 Files selected for processing (1)
  • web/templates/web/quiz/quiz_list.html

Comment on lines +27 to +29
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-lg overflow-hidden
transition duration-300 hover:-translate-y-1 hover:shadow-2xl
focus-within:-translate-y-1 focus-within:shadow-2xl">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Translate animation is not gated on prefers-reduced-motion.

The hover:-translate-y-1 and focus-within:-translate-y-1 transforms are applied unconditionally. Users who have enabled the OS-level "reduce motion" preference will still see the lift animation. Tailwind's motion-safe: prefix gates these transforms only when the user has not requested reduced motion, keeping the shadow-only effect as the fallback.

♻️ Proposed fix (same pattern for all three cards)
-                    transition duration-300 hover:-translate-y-1 hover:shadow-2xl
-                    focus-within:-translate-y-1 focus-within:shadow-2xl">
+                    transition duration-300 motion-safe:hover:-translate-y-1 hover:shadow-2xl
+                    motion-safe:focus-within:-translate-y-1 focus-within:shadow-2xl">

Also applies to: 77-79, 120-122

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@web/templates/web/quiz/quiz_list.html` around lines 27 - 29, The card
transform classes (hover:-translate-y-1 and focus-within:-translate-y-1) are
applied unconditionally; update the card container class strings (the div with
classes starting "bg-white dark:bg-gray-800 rounded-lg shadow-lg overflow-hidden
...") to prefix those transform utilities with Tailwind's motion-safe: so use
motion-safe:hover:-translate-y-1 and motion-safe:focus-within:-translate-y-1
(apply the same change to the other two card blocks with the identical class
pattern).

⚠️ Potential issue | 🟡 Minor

Card 1 is missing h-full, causing potential height inconsistency with the other two cards.

Cards 2 (line 78) and 3 (line 121) both include h-full, but the My Quizzes card does not. In a CSS grid with align-items: stretch (the default), the inner card <div> needs h-full to fill the full row height when sibling cells are taller. Without it, this card may visually appear shorter when the other columns contain more quiz entries.

🐛 Proposed fix
-        <div class="bg-white dark:bg-gray-800 rounded-lg shadow-lg overflow-hidden 
-                    transition duration-300 hover:-translate-y-1 hover:shadow-2xl
-                    focus-within:-translate-y-1 focus-within:shadow-2xl">
+        <div class="bg-white dark:bg-gray-800 rounded-lg shadow-lg overflow-hidden
+                    h-full transition duration-300 hover:-translate-y-1 hover:shadow-2xl
+                    focus-within:-translate-y-1 focus-within:shadow-2xl">
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@web/templates/web/quiz/quiz_list.html` around lines 27 - 29, The "My Quizzes"
card's outer div (the element starting with class "bg-white dark:bg-gray-800
rounded-lg shadow-lg overflow-hidden transition...") is missing the h-full
utility, causing inconsistent heights with the other cards; update that div's
class list to include "h-full" so it stretches to match sibling cards (same fix
applied for the card elements on lines where Cards 2 and 3 already use h-full).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

files-changed: 1 PR changes 1 file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Quizzes list page cards lack hover interaction

1 participant