Skip to content

fix: add missing @keyframes shake animation referenced in popup.ts#857

Open
Siddh2024 wants to merge 1 commit into
shouri123:mainfrom
Siddh2024:fix/529-clean-shake-keyframes
Open

fix: add missing @keyframes shake animation referenced in popup.ts#857
Siddh2024 wants to merge 1 commit into
shouri123:mainfrom
Siddh2024:fix/529-clean-shake-keyframes

Conversation

@Siddh2024

@Siddh2024 Siddh2024 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

fixes #529

Adds the missing @Keyframes shake rule in popup.css and refactors shakeElement() to use CSS classes.

Summary by CodeRabbit

  • Bug Fixes
    • Improved error feedback with a clearer red border and shake animation when an input or element needs attention.
    • Switched visual alerts to use reusable styles, making the effect more consistent and reliable.

@Siddh2024 Siddh2024 requested a review from shouri123 as a code owner July 5, 2026 15:41
@github-actions github-actions Bot added gssoc Official GSSoC contribution issue gssoc:approved GSSoC: PR approved and scored labels Jul 5, 2026
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

🚀 Thank You for Contributing to Late-Meet

Please ensure that:

  • the issue was assigned to you before opening this PR
  • the PR references the related issue
  • your changes follow repository contribution guidelines
  • the project builds successfully before submission

Unassigned, duplicate, or low-quality PRs may be closed.

Thank you for contributing 💙

@github-actions github-actions Bot added bug Something isn't working size/S labels Jul 5, 2026
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

👋 Thank you @Siddh2024 for your contribution to Late-Meet!

✅ Verified: You are assigned to the linked issue #529.

Please review any automated suggestions or code review comments that may appear below! We will review your PR as soon as possible!


Please consider starring the repository ⭐ to show your support!

@github-actions github-actions Bot added type:code Type: Code change type:style Type: CSS/Styling change labels Jul 5, 2026
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a .border-danger CSS class and a .shake class with new @keyframes shake animation to popup.css. Updates shakeElement in popup.ts to toggle these CSS classes instead of directly mutating inline borderColor and animation styles.

Changes

Shake animation fix

Layer / File(s) Summary
Shake animation and error border styles
src/popup.css
Adds a .border-danger class for a red border and a .shake class tied to a new @keyframes shake horizontal shake animation.
Class-based error feedback in shakeElement
src/popup.ts
Changes shakeElement to add "shake" and "border-danger" classes and remove them after the timeout, replacing direct inline style mutation of borderColor/animation.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Sequence Diagram(s)

Not applicable — changes are limited to CSS class definitions and a small class-toggling adjustment without multi-component interaction flow.

Related Issues: #529

Suggested labels: bug, css, frontend

Suggested reviewers: shouri123


🐰 A shake was promised, none appeared,
Till keyframes danced as engineered,
Now borders flash and inputs quake,
Classes swap for feedback's sake,
No more inline styles to fear! 🎬

🚥 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 clearly matches the main change: adding the missing shake keyframes for popup feedback.
Linked Issues check ✅ Passed The PR adds the missing shake animation and keeps the invalid-input feedback behavior aligned with issue #529.
Out of Scope Changes check ✅ Passed The changes stay focused on the popup shake/error feedback fix and do not introduce unrelated scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

@sonarqubecloud

sonarqubecloud Bot commented Jul 5, 2026

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/popup.ts (1)

537-543: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Animation won't restart on rapid repeated calls.

If shakeElement is invoked again while "shake" is already applied (e.g. two quick invalid submissions within 400ms), classList.add is a no-op since the class is already present, so the CSS animation does not restart. A DOM reflow is needed between removing and re-adding the class for the animation to reliably retrigger.

🔧 Proposed fix to force animation restart
   function shakeElement(el: HTMLElement | null) {
     if (!el) return;
-    el.classList.add("shake", "border-danger");
+    el.classList.remove("shake");
+    void el.offsetWidth; // force reflow to restart animation
+    el.classList.add("shake", "border-danger");
     setTimeout(() => {
       el.classList.remove("shake", "border-danger");
     }, 400);
   }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/popup.ts` around lines 537 - 543, The shake animation in shakeElement
can’t reliably restart on rapid repeated calls because the "shake" class stays
applied, so re-adding it is a no-op. Update shakeElement to force a restart by
removing the animation classes, triggering a DOM reflow on the same HTMLElement,
and then re-adding "shake" and "border-danger"; keep the fix localized to
shakeElement so repeated invalid submissions retrigger the animation
consistently.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/popup.ts`:
- Around line 537-543: The shake animation in shakeElement can’t reliably
restart on rapid repeated calls because the "shake" class stays applied, so
re-adding it is a no-op. Update shakeElement to force a restart by removing the
animation classes, triggering a DOM reflow on the same HTMLElement, and then
re-adding "shake" and "border-danger"; keep the fix localized to shakeElement so
repeated invalid submissions retrigger the animation consistently.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 57857528-7630-4314-8d60-2668397b01ba

📥 Commits

Reviewing files that changed from the base of the PR and between d216444 and b97e483.

📒 Files selected for processing (2)
  • src/popup.css
  • src/popup.ts

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

Labels

bug Something isn't working gssoc:approved GSSoC: PR approved and scored gssoc Official GSSoC contribution issue size/S type:code Type: Code change type:style Type: CSS/Styling change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] @keyframes shake animation referenced in popup.ts but never defined anywhere

1 participant