threepointone / ratpack

ready. set. go!
197 stars 10 forks source link

File... Open menu #20

Open threepointone opened 7 years ago

threepointone commented 7 years ago

~

yatharthx commented 7 years ago

I would love to pick this one as a first-good-start, maybe! Could you please guide me on what behaviour are we expecting here?

threepointone commented 7 years ago
file open

like this, but with a single option. New File. should do the same as dragging a file into the window.

I don't think this is as simple as you'd imagine, mostly because it involves communicating between the main and renderer process, and also my code is a bit shit right now. Feel free to try!

yatharthx commented 7 years ago

True. I was reading the src yesterday and found it little intimidating. :D Sure, I'll try this and maybe come back with a PR. Thanks for the clarification, anyway :)

yatharthx commented 7 years ago

Hey, I got a couple of things over here:

  1. Do we need the Menu to be supporting Win and Linux, too? Because there is some little tweaking involved to make that work. Or just MacOS would be fine as for now?
  2. Shall we apply a file type filter? So that users are able to pick just the .js files.
  3. A little help over here on the approach - Shall we recreate the window on file select (from Menu) passing the file path to the renderer process? Or shall we re-render the React component (if we use IPC)? Or I'm not sure if I'm getting it completely wrong.