Skip to content

Feat: Add paper preview modal on eye icon click#488

Open
Rithish-2914 wants to merge 5 commits intoCodeChefVIT:stagingfrom
Rithish-2914:feat/paper-preview-modal
Open

Feat: Add paper preview modal on eye icon click#488
Rithish-2914 wants to merge 5 commits intoCodeChefVIT:stagingfrom
Rithish-2914:feat/paper-preview-modal

Conversation

@Rithish-2914
Copy link
Copy Markdown

What does this PR do?

Adds a popup preview feature when clicking the eye icon on a paper card.

Features

  • Clicking the eye icon opens a modal preview
  • Displays paper using embedded viewer
  • Close functionality (outside click + button)

Note

Direct PDF embedding was blocked due to CORS restrictions from the storage server.
Used Google Docs viewer to enable preview functionality.

Testing

  • Verified modal opens correctly
  • Verified preview loads successfully
  • Existing features (download, navigation) unaffected

Linked Issue

Closes #479

@YOGESH-08 YOGESH-08 self-requested a review April 12, 2026 05:55
Comment thread src/components/Card.tsx
isSelected && "bg-white",
)}
>
<Link href={paperLink} target="_blank" rel="noopener noreferrer">
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

pls add this back

Comment thread src/components/Card.tsx
className="absolute right-3 top-3 z-10 text-xl"
onClick={() => setPreviewOpen(false)}
>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

use react lucide icon

const paperPath = origin + pathname;
return (
<Dialog>
<DialogTrigger asChild>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why tho ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

idt the sidebar needs this change, this affects ux , pls check this once and revert it, if it's not needed.

Screen.Recording.2026-04-15.101415.mp4

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.

Need the eye icon to work.

2 participants