Skip to content

Conversation

@creativerezz
Copy link

Changes

  • Enhanced Chrome extension popup with error handling, loading states, and toast notifications
  • Added visual previews (screenshots, thumbnails & fullscreen mode)
  • Improved UX with validation and better user feedback
  • Added comprehensive documentation for LLM-specific project overview and architecture
  • Updated Chrome extension manifest
  • Added Chrome extension demo GIF to README

Testing

  • Tested Chrome extension functionality
  • All features working as expected

Introduce a new @react-grab/chrome-extension package that implements a Chrome
extension to capture DOM elements and send them to the React Grab adapter.

Highlights:
- Add manifest.json (MV3) with content script, service worker, permissions,
  action popup and web_accessible_resources.
- Add package.json with build/dev scripts and dependencies.
- Add scripts/generate-icons.sh to generate extension icons from favicon.ico
  (requires ImageMagick).
- Implement chrome adapter (src/adapters/chrome.ts) to send captured elements
  to the extension background.
- Implement background service worker (src/background.ts) to persist captured
  elements, show notifications and update action badge; handle runtime messages
  (capture, list, clear, delete).
- Add content script (src/content.ts) that initializes react-grab using stored
  settings, listens for storage changes and registers the chrome adapter.
- Add popup UI: popup.html and popup.ts to view/copy/delete captured elements
  and manage extension settings (enabled, hotkey, hold duration); live updates
  via chrome.storage changes.
- Add TypeScript tooling: tsconfig.json and tsup.config.ts to bundle content,
  background and popup into dist; copy manifest/popup on build.
- Bundle output targets and build helpers configured; icons directory created in
  dist but icon files are expected to be generated/copied during build.

This commit scaffolds the full Chrome extension integration for React Grab,
including message flows, storage, UI and build pipeline.
…& fullscreen)

- add html2canvas dependency and update pnpm-lock
- implement captureElementScreenshot & generateElementSelector utils
- add chrome-enhanced adapter with trackHoveredElement to capture screenshots & selectors
- update content/background to use enhanced adapter and clean up tracker
- add thumbnails, placeholder, and fullscreen modal to popup (UI + handlers)
- persist screenshot and elementSelector in captured elements
- add VISUAL_PREVIEWS.md documenting feature and implementation
…ates, toasts, validation & UX improvements; add docs

- Add robust try/catch handling for settings/elements loading and init recovery
- Return result types for loadSettings/loadCapturedElements and add DEFAULT_SETTINGS
- Implement loading state, inline error UI with retry, and fatal init recovery (reload)
- Add toast notifications (success/error/info) and button state feedback (disabled text)
- Add input validation for hotkey and duration, with user feedback and persistence
- Escape HTML content and lazy-load thumbnails to mitigate XSS and improve perf
- Improve element actions: copy feedback, delete confirmation/feedback, "Clear All" confirmation
- Minor DOM/query null-safety and UX tweaks (titles, placeholders, timestamps)
- Add POPUP_IMPROVEMENTS.md documenting changes and testing notes
@vercel
Copy link

vercel bot commented Nov 28, 2025

@creativerezz is attempting to deploy a commit to the Million Team on Vercel.

A member of the Team first needs to authorize it.

@creativerezz
Copy link
Author

Hey @aidenybai! 👋

I've added a complete Chrome extension implementation for React Grab with some exciting features:

Key Features

  • 🎨 Visual Previews: Screenshots, thumbnails, and fullscreen mode for grabbed elements
  • 🔔 Enhanced UX: Error handling, loading states, and toast notifications
  • Validation: Better user feedback and input validation
  • 📚 Documentation: Comprehensive docs for LLM integration and architecture

Check out the demo GIF in the README to see it in action! Would love to hear your thoughts on this contribution. 🚀

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.

1 participant