zthxxx / react-dev-inspector

jump to local IDE code directly from browser React component by just a simple click
https://react-dev-inspector.zthxxx.me
MIT License
1.15k stars 68 forks source link

visual indicator of dev-inspector is "active" #105

Closed murugaratham closed 2 years ago

murugaratham commented 2 years ago

First of all thanks for such an amazing project, i do have a suggestion that there should be a UI indicator or sorts, since currently, when i press the hotkey combination, if i don't move the mouse, i do not know that the inspector is active.

zthxxx commented 2 years ago

Thanks feedback, I have a plan to refactor the indicator of activity begin

murugaratham commented 2 years ago

I don’t mind working on this but how do you get started? When I run npm, there’s no web server listening

zthxxx commented 2 years ago
  1. record latest mouse moved point after inspector component mounted
  2. when press the hotkey, inspect and show tooltip of DOM at mouse point immediately
murugaratham commented 2 years ago

You mean I launch a separate react app and dev inspector concurrently?

murugaratham commented 2 years ago

Screenshot 2021-11-01 at 11 27 16 AM

I can run directly in examples/cra (in my case), but also noticed that it's from es folder, what's your dev workflow like?

zthxxx commented 2 years ago
  1. record latest mouse moved point after inspector component mounted
  2. when press the hotkey, inspect and show tooltip of DOM at mouse point immediately

will make sure show inspector tooltip immediately while press the hotkey

murugaratham commented 2 years ago

Alright, thanks @zthxx, I'll not try to fork n run while waiting for your next release

zthxxx commented 2 years ago

I can run directly in examples/cra (in my case), but also noticed that it's from es folder, what's your dev workflow like?

npm run site cra, if you want start dev with cra

murugaratham commented 2 years ago

I get the same nodemon looping indefinitely, is there any npm global tools needed?

zthxxx commented 2 years ago

npm version > v7 for dev

murugaratham commented 2 years ago

Managed to get it to work after npm i -g npm@7.12.1, although i had this

Screenshot 2021-11-01 at 11 56 58 AM

Overcame by setting NODE_OPTIONS export NODE_OPTIONS=--openssl-legacy-provider; npm run site cra

And for me to get latest Inspector.tsx, i need to npm run build everytime?

zthxxx commented 2 years ago

npm run dev for common dev (build lib & watch files & website)

npm run site cra for only start dev for cra site