projectGenerator icon indicating copy to clipboard operation
projectGenerator copied to clipboard

Suggestion: A button for refreshing addons (directory listing)

Open dimitre opened this issue 10 years ago • 10 comments

Suggestion: A button for refreshing addons (directory listing) without reopening projectGenerator Thanks!

dimitre avatar Dec 02 '15 14:12 dimitre

Hey, thanks for the suggestion. This feature used to be there but it seems like it got stripped out. (see #60 ) We've also some discussions about a folder watcher which would automatically refresh it, maybe that's why it got stripped out.

edit: it's still there but the CSS is set to display:none;. I guess we left it out so the GUI is simpler, later on we'll watch the addons folder.

Daandelange avatar Dec 07 '15 15:12 Daandelange

As a workaround for now, you can click the gear for the settings tab, click inside the text input for the OF path, and then click back to the create/update tab. Kind of cumbersome, but slightly less so than restarting the app :sweat_smile:

mattfelsen avatar Dec 09 '15 03:12 mattfelsen

Indeed it works thank you :)

dimitre avatar Dec 09 '15 11:12 dimitre

Hey @dimitre, I actually ran into this myself today. It looks like the fix @Daandelange mentioned actually has been incorporated. Are you using the pg from 0.9.0 or github? My guess would be the fix happened after 0.9.0 was released?

Here's what I see after cloning an addon:

screen shot 2015-12-13 at 3 24 54 pm

And then after clicking the rescan button, it picks it up correctly:

screen shot 2015-12-13 at 3 25 17 pm

mattfelsen avatar Dec 13 '15 20:12 mattfelsen

Thanks for pointing that out! We worked on so many alternatives, it's hard to remind what we kept.

So this dialog pops up when you have a missing addon for an existing project (imported), but it only appears when a project contains an addon you don't have.
You cannot enter an empty addon to make the rescan dialog appear, so this issue is about improving this:

  • either the folder watch solution
  • or allow entering a missing addon so the rescan message appears

I remember Kyle or Zach saying the watchfolder solution is better for keeping the gui simple & clean.

Daandelange avatar Dec 14 '15 11:12 Daandelange

For the reference, here's the original discussion about this: https://github.com/ofZach/pgElectron/issues/12

Daandelange avatar Dec 23 '15 17:12 Daandelange

I've been working on the addons folder watcher. Finally, if it works, no external module is needed.

It would be nice if somebody could test this on Linux and Windows because the documentation states: The fs.watch API is not 100% consistent across platforms, and is unavailable in some situations.

Shall I PR anyways ?

Daandelange avatar Dec 23 '15 18:12 Daandelange

Hey @Daandelange, this looks nice! I'm seeing a bit of weird behavior though. The file watcher is logging updates to the console immediately, but I only see the gui contents change under specific situations:

  1. I have to click into either the project name or project path fields. If I click a different field, or click on the background so no field has focus, nothing happens
  2. With the cursor in the project name or path field, the update only happens once I defocus the window (which means I have bring the pg to the front first, then switch to a different app).

So the watcher part looks like it's working fine, but maybe some other call needs to happen? I tested this on OS X 10.11.2 with node 0.10, 0.12, and 5.3

addonswatcher (sorry for the crappy 8 bit gif color..trying to figure out a better work flow for screencast gifs!)

mattfelsen avatar Dec 26 '15 01:12 mattfelsen

Hey Matt, thanks for your feedback and your gifs are awesome! :) It indeed needed an extra callback, it should work fine now. https://github.com/Daandelange/projectGenerator/commit/b72126e72f01f8a3f50a4c1a2b0f07764f5b402d

Daandelange avatar Jan 02 '16 16:01 Daandelange

This is solved in v67 - Refresh button in Settings -

  • Click ofPath (Refresh) rmaybe better name but this will refresh the addon list
  • It will auto refresh ofPath retrieved from the CMD C++
image

danoli3 avatar Aug 02 '24 12:08 danoli3