aidenybai / aidenybai/react-grab

Clicking component tag doesn't open file in local editor

オープン
#50 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
7.6k
フォーク
340
平均マージ
5時間 12分
マージ済み PR(30日)
6

説明

Hey! I've been using react-grab and noticed that clicking the component tag/label in the floating selection box doesn't actually open the file in my editor.

After digging into the code, I found that `buildOpenFileUrl` redirects to `react-grab.com/open-file` instead of opening the file directly in the local editor. The file path is also relative (like `/src/App.tsx`) rather than absolute, which editors need.

I've put together a fix in #49 that:
- Uses editor URL schemes directly (supports VS Code, Cursor, WebStorm, etc.)
- Builds absolute paths using `__PROJECT_ROOT__` from Vite config
- Opens the file at the component's location
- Falls back to the original behavior if not configured

Would love to hear your thoughts!

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。