Skip to content

Adding preview image for 'My Votes', adding drop media type where app…#1872

Merged
prxt6529 merged 2 commits intomainfrom
my-votes-preview-media-type
Feb 3, 2026
Merged

Adding preview image for 'My Votes', adding drop media type where app…#1872
prxt6529 merged 2 commits intomainfrom
my-votes-preview-media-type

Conversation

@prxt6529
Copy link
Copy Markdown
Collaborator

@prxt6529 prxt6529 commented Feb 3, 2026

…licable

Summary by CodeRabbit

Release Notes

  • Style

    • Redesigned layouts for drop items, winner displays, and voting components with improved spacing and visual hierarchy
    • Added media type badges to identify content formats
    • Enhanced responsive design and alignment across components
  • New Features

    • Improved interaction handling for drops with better click and selection support

…licable

Signed-off-by: prxt6529 <prxt@6529.io>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

Enhanced multiple drop and wave UI components by introducing click handling (onDropClick), checkbox state management (isChecked, onToggleCheck), and media type badges across vote, chat, and winner drop displays. Added isMemesSubmission detection logic to SeizeSettingsContext and improved wave parameter handling in TitleContext.

Changes

Cohort / File(s) Summary
Drop & Vote Components
components/brain/my-stream/votes/MyStreamWaveMyVote.tsx, components/waves/drops/DropItemChat.tsx, components/waves/winners/drops/MemesWaveWinnerDrop.tsx
Added onDropClick and checkbox state props to enable external click and selection control; introduced MediaTypeBadge rendering in vote/winner drop titles; restructured author sections with UserProfileTooltipWrapper; updated voter/author avatar layouts and spacing.
Header Components
components/waves/winners/drops/header/WaveWinnersDropHeaderAuthorPfp.tsx
Added optional size prop ("sm" | "md") with dynamic height/width classes and improved avatar rendering structure with centered alignment.
Context Enhancements
contexts/SeizeSettingsContext.tsx, contexts/TitleContext.tsx
Added isMemesSubmission() method to SeizeSettingsContext for detecting memes wave drops; enhanced TitleContext pathname/query parameter tracking with explicit wave parameter removal logic on waves routes.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • #1731 — Introduces onDropClick handler API across multiple drop-related UI components for unified click-handling patterns.
  • #1644 — Modifies overlapping wave/drop components (winner drops, headers, author PFP) with UI restructuring changes.
  • #1759 — Alters DropListItemContentMedia component behavior which is used by DropItemChat in this PR.

Suggested reviewers

  • GelatoGenesis

Poem

🐰 A rabbit weaves through drops with glee,
Click handlers flow like honeybee,
Media badges shine so bright,
Memes detected left and right,
Context whispers wave secrets free! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes: adding preview images to 'My Votes' and displaying drop media types throughout the UI components.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch my-votes-preview-media-type

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

Failure to add the new IP will result in interrupted reviews.


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
Copy Markdown

@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: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
contexts/TitleContext.tsx (1)

91-121: ⚠️ Potential issue | 🟠 Major

Duplicate pathname effect makes the new pathname-change branch ineffective.

The first effect (lines 91-98) updates routeRef.current before the second effect runs, so line 101 always evaluates pathnameChanged as false when pathname actually changes. This makes the pathname-change handling in lines 105-112 unreachable, creating dead code that duplicates the first effect's logic.

Remove the first effect entirely; the second effect can handle both pathname and searchParams changes, updating routeRef.current, queryRef.current, title, and wave data as needed.

🛠️ Suggested fix
-  useEffect(() => {
-    if (routeRef.current === pathname) {
-      return;
-    }
-    routeRef.current = pathname;
-    const defaultTitle = getDefaultTitleForRoute(pathname);
-    setTitle(defaultTitle);
-  }, [pathname]);
-
   useEffect(() => {
     const pathnameChanged = routeRef.current !== pathname;
     const waveInUrl = searchParams?.get("wave") ?? null;
     const hadWaveInUrl = queryRef.current?.get("wave") ?? null;
components/brain/my-stream/votes/MyStreamWaveMyVote.tsx (1)

41-69: ⚠️ Potential issue | 🟡 Minor

Checkbox click always stops propagation even when handler is not provided.

While onToggleCheck is optional, handleCheckboxClick unconditionally calls e.stopPropagation() before checking if the handler exists. In practice, all current usages in MyStreamWaveMyVotes always provide this handler, so the dead zone does not manifest in actual code. However, to prevent future misuse, consider returning early if the handler is undefined:

🛠️ Suggested fix (defensive programming)
const handleCheckboxClick = (e: React.MouseEvent) => {
+  if (!onToggleCheck) return;
  e.stopPropagation();
-  if (onToggleCheck) {
-    onToggleCheck(drop.id);
-  }
+  onToggleCheck(drop.id);
};

Signed-off-by: prxt6529 <prxt@6529.io>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Feb 3, 2026

@prxt6529 prxt6529 merged commit 3691703 into main Feb 3, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants