atom-community / atom-ide-base

Atom IDE packages for Atom
https://atom.io/packages/atom-ide-base
Other
44 stars 10 forks source link

Use React in ViewContainer, HTMLView, SnippetView, and ReactView #23

Closed aminya closed 4 years ago

aminya commented 4 years ago

This now works for the data tips made by atom-typescript. I need to make SnippetView and HTMLView compatible with React so ide-css data tips can be shown as well.

I also might simplify the ViewContainer class so it uses functional components instead of a class.

Testing it is not that straight forward though (sorry about it)! You need to have Atom, pnpm, and some deps installed.

npm install -g pnpm

Then:

git clone https://github.com/atom-ide-community/atom-ide-base
cd atom-ide-base
git checkout float-pane
pnpm install
pnpm build.commons-ui

Now, link this to atom-ide-datatip

git clone https://github.com/atom-ide-community/atom-ide-datatip
cd atom-ide-datatip
pnpm install path_to_atom_ide_base_folder
pnpm install
pnpm debug
apm link .

For testing:

apm install atom-ide-javascript

Reload Atom (Ctrl+Shift+F5), and hover on some word in a JavaScript file. The datatip is made from ViewContainer!

I use two terminals to build projects:

pnpm build.commons-ui
pnpm debug

I use two instances of Atom for developing and testing. I edit in one and use the other one for seeing the result (by reloading)ading)