Skip to content

feat: Add GlassyFileUpload component with drag-and-drop zone - #773

Open
sonusharma6-dsa wants to merge 2 commits into
Jaishree2310:mainfrom
sonusharma6-dsa:feat/file-upload-component
Open

feat: Add GlassyFileUpload component with drag-and-drop zone#773
sonusharma6-dsa wants to merge 2 commits into
Jaishree2310:mainfrom
sonusharma6-dsa:feat/file-upload-component

Conversation

@sonusharma6-dsa

Copy link
Copy Markdown

Closes #771. Introduces the new GlassyFileUpload component featuring drag-and-drop support, visual active drag states, multi-file selection, simulated file uploads, and standard glassmorphic aesthetics.

Copilot AI review requested due to automatic review settings July 2, 2026 16:31
@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

@sonusharma6-dsa is attempting to deploy a commit to the jaishree2310's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a new “File Upload” component demo/detail page to the GlassyUI components gallery, wiring it into navigation and routing, and introduces a global code-block copy-button behavior via PageShell.

Changes:

  • Add FileUploadDetailsPage (with an embedded GlassyFileUpload demo) and route it under /file-upload-details.
  • Add a “File Upload” card entry to the components gallery page.
  • Inject a global “copy to clipboard” button into <pre> blocks within PageShell.

Reviewed changes

Copilot reviewed 4 out of 7 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/components/PageShell.tsx Adds DOM-based injection of copy-to-clipboard buttons for code blocks.
src/components/GlassyUIComponentsPage.tsx Adds a “File Upload” card that navigates to the new details route.
src/components/GlassyFileUpload.tsx Introduces the file upload demo UI and the new details page content.
src/App.tsx Registers the new /file-upload-details route.
build/static/css/main.73cc8df5.css Removes a built CSS artifact from the repository.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +36 to +39
// Exclude the button text itself if it was copied
const textToCopy = (preEl.innerText || '')
.replace(/Copy|Copied!/g, '')
.trim();
Comment on lines +14 to +19
// Avoid duplicate buttons
if (
pre.querySelector('.global-copy-btn') ||
pre.parentElement?.querySelector('button')
)
return;
Comment on lines +25 to +28
const btn = document.createElement('button');
btn.className =
'global-copy-btn absolute top-2 right-2 backdrop-filter backdrop-blur-xl bg-white/10 border border-white/20 p-2 hover:bg-white/30 rounded-md transition-all duration-300 z-10 text-white flex items-center justify-center';
btn.title = 'Copy to clipboard';
Comment on lines +185 to +189
<GlassyFileUpload
onUpload={(files) => console.log('Uploading files:', files)}
/>
);
}`;
Comment on lines +88 to +93
<div
onDragEnter={handleDrag}
onDragOver={handleDrag}
onDragLeave={handleDrag}
onDrop={handleDrop}
onClick={onButtonClick}
Comment on lines +151 to +157
<button
onClick={e => {
e.stopPropagation();
removeFile(idx);
}}
className='p-1 hover:bg-white/10 rounded-full text-white/50 hover:text-white'
>
Comment on lines +100 to +104
<input
ref={fileInputRef}
type='file'
multiple
onChange={handleChange}

{/* Uploading Status */}
{uploading && (
<div className='w-full mt-4 flex items-center justify-center p-3 bg-white/5 rounded-lg border border-white/10'>

{/* Success Status */}
{uploaded && (
<div className='w-full mt-4 flex items-center justify-center p-3 bg-green-500/20 rounded-lg border border-green-500/30 text-green-300'>
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.

[Feature] Add GlassyFileUpload component with drag-and-drop zone

2 participants