Skip to content

fix identity waves link click#1835

Merged
simo6529 merged 2 commits intomainfrom
identity-waves-links-fix
Jan 27, 2026
Merged

fix identity waves link click#1835
simo6529 merged 2 commits intomainfrom
identity-waves-links-fix

Conversation

@simo6529
Copy link
Copy Markdown
Collaborator

@simo6529 simo6529 commented Jan 27, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • Added wave selection functionality with custom click handling in preview items.
    • Integrated navigation support when selecting waves from the preview.
  • Bug Fixes

    • Fixed modal closing unexpectedly when clicking on the overlay.

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: Simo <simo@6529.io>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 27, 2026

📝 Walkthrough

Walkthrough

These changes introduce an optional onSelect callback mechanism to the Wave Creator preview item component, enabling parent components to handle wave selection through a custom callback. Simultaneously, the modal's close behavior is modified to prevent outside interactions from closing it, and internal click propagation is reinforced.

Changes

Cohort / File(s) Summary
Wave Preview Selection Callback
components/waves/drops/WaveCreatorPreviewItem.tsx
Added optional onSelect prop that intercepts link clicks, prevents default navigation, stops propagation, and invokes the callback with wave data, href, and event.
Wave Preview Modal Interaction
components/waves/drops/WaveCreatorPreviewModal.tsx
Disabled dialog close via overlay/outside clicks by replacing onClose handler with no-op function; strengthened click propagation prevention on both desktop and mobile DialogPanel variants.
Modal Content Navigation Handler
components/waves/drops/WaveCreatorPreviewModalContent.tsx
Integrated Next.js router and implemented handleWaveSelect callback that navigates to provided href; wired onSelect to each WaveCreatorPreviewItem instance using memoized callback.

Sequence Diagram

sequenceDiagram
    participant User
    participant PreviewItem as WaveCreatorPreviewItem
    participant Content as WaveCreatorPreviewModalContent
    participant Router as Next.js Router

    User->>PreviewItem: Click wave link
    PreviewItem->>PreviewItem: onClick triggered
    PreviewItem->>PreviewItem: preventDefault() + stopPropagation()
    PreviewItem->>Content: onSelect(wave, href, event)
    Content->>Content: handleWaveSelect(href)
    Content->>Router: push(href)
    Router->>Router: Navigate to destination
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • boosted 3cols #1784: Directly related — this PR reintroduces a similar onSelect navigation callback pattern to WaveCreatorPreviewItem/WaveCreatorPreviewModalContent that was previously removed.

Suggested reviewers

  • prxt6529
  • ragnep

Poem

🐰 A wave is selected with graceful care,
No more default nav to despair,
Callbacks cascade through the stack,
Router guides travelers back,
Modal holds firm, won't disappear! 🌊

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix identity waves link click' directly relates to the changes made: it addresses link click behavior in wave creator components by adding an onSelect callback mechanism and adjusting modal interaction patterns.
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 docstrings

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.

@sonarqubecloud
Copy link
Copy Markdown

@simo6529 simo6529 merged commit 6f65e5f into main Jan 27, 2026
7 checks passed
@simo6529 simo6529 deleted the identity-waves-links-fix branch January 27, 2026 09:05
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