brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

[CLOSED] Added "Refresh" Menu Item #2641

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by heyvito Saturday Feb 02, 2013 at 21:06 GMT Originally opened as https://github.com/adobe/brackets/pull/2786


I was missing a Refresh button in order to refresh the project file tree, so... Here it is. :smiley:

By the way, Menus.js has not been validated by JSLint due some TODO comments and other errors unrelated to those changes.


heyvito included the following code: https://github.com/adobe/brackets/pull/2786/commits

core-ai-bot commented 3 years ago

Comment by redmunds Friday Feb 08, 2013 at 20:23 GMT


Thank you for the contribution. We are currently finishing up a sprint, so I won't get to this for a several more days.

core-ai-bot commented 3 years ago

Comment by heyvito Friday Feb 08, 2013 at 23:22 GMT


@redmunds It passed through Travis? GitHub used to show an info box below the pull request. :confused:

core-ai-bot commented 3 years ago

Comment by redmunds Friday Feb 08, 2013 at 23:25 GMT


That's a new thing we recently introduced. It runs JSHint (and maybe something else?) on every branch so we can catch mistakes sooner.

core-ai-bot commented 3 years ago

Comment by heyvito Friday Feb 08, 2013 at 23:36 GMT


Okie Dokie

core-ai-bot commented 3 years ago

Comment by peterflynn Friday Feb 08, 2013 at 23:42 GMT


@victorgama: Travis integration with GitHub has been fairly flaky for us. Some pull requests randomly don't get a Travis build automatically (or sometimes they don't at first, but do later when a new commit is pushed up). Looks like this is one of them.

core-ai-bot commented 3 years ago

Comment by heyvito Saturday Feb 09, 2013 at 01:29 GMT


What a shame, Travis. haha. Thank you, Peter!

core-ai-bot commented 3 years ago

Comment by peterflynn Tuesday Feb 19, 2013 at 18:42 GMT


I was just thinking about an edge case here... we should make sure nothing bad happens in this scenario:

  1. Open a file and make some unsaved changes
  2. Delete the file on disk
  3. Return to Brackets -- file sync dialog should appear. Choose to keep the file open instead of losing changes
  4. Refresh the project tree with this new Refresh button

Now the file will be open in an editor but no longer present in the project tree. I think this simply means that there will be no selection marker... which is ok since it will still be in the working set. But we might want to think about it a little more or test around this area a bit.

core-ai-bot commented 3 years ago

Comment by redmunds Tuesday Feb 19, 2013 at 21:49 GMT


This is a good start. This seems to update the project tree correctly.

On Windows 7, I am noticing some problems with restoring selection, though.

Recipe 1

  1. Single-click a file in the root of the project tree
  2. Contents are displayed in editor and file name is selected in project tree
  3. Right-click on file in tree and Refresh

Results File is no longer selected in project tree. Note that you can select it or any other file to restore file tree selection.

Recipe 2

  1. Single-click a file in a sub-folder of the project tree
  2. Contents are displayed in editor and file name is selected in project tree
  3. Right-click on file in tree and Refresh

Results File is no longer selected in project tree. Even worse, the project tree selection seems to be broken. If I select a file, the file name text color changes from light gray to white, but the dark gray selection background is not drawn. You have to reboot Brackets.

core-ai-bot commented 3 years ago

Comment by redmunds Tuesday Feb 19, 2013 at 21:51 GMT


I am also seeing that sometimes the state of the project tree folders is lost (i.e. they all collapse) after a Refresh. I have not yet nailed down a repeatable recipe, but I'll keep trying.

core-ai-bot commented 3 years ago

Comment by njx Thursday Mar 07, 2013 at 01:00 GMT


BTW, I just noticed that there's a merge conflict in Menus.js because we moved all the default commands to DefaultMenus.js--so you'll need to reinsert the new context menu entry into DefaultMenus.

core-ai-bot commented 3 years ago

Comment by njx Monday Mar 18, 2013 at 18:26 GMT


@victorgama - do you think you'll have a chance to address the comments from@redmunds any time soon? Thanks.

core-ai-bot commented 3 years ago

Comment by heyvito Tuesday Mar 19, 2013 at 19:22 GMT


I apologize for taking so long to answer, guys (More than a month, what a shame)

I'm working on it right now.

@redmunds: Thanks for the recipes, I could successfully reproduce the bugs here. I'm now checking JsTree docs and sources in order to fix that. @njx: Conflicts fixed and the entry was moved to DefaultMenus.

When I'd get any advance I'll update the branch.

core-ai-bot commented 3 years ago

Comment by heyvito Saturday Mar 23, 2013 at 20:45 GMT


Guys, I'm afraid I don't have enough time to fix these issues now.

BTW, this will be useless since@peterflynn said that a "Directory Watch feature" is coming as of https://github.com/adobe/brackets/issues/3124#issuecomment-14976401 and File / Directory Watching

core-ai-bot commented 3 years ago

Comment by redmunds Saturday Mar 23, 2013 at 21:25 GMT


Thanks for giving it a try. Closing.

core-ai-bot commented 3 years ago

Comment by peterflynn Monday Mar 25, 2013 at 23:40 GMT


@victorgama: fwiw, I don't think the pull request is useless. It may be quite some time before 'file watchers' are implemented in Brackets, so it wouldn't actually be a waste. Yes, the code would eventually be replaced... but in the meantime it would be delivering value to users.

core-ai-bot commented 3 years ago

Comment by njx Friday Apr 05, 2013 at 17:41 GMT


Reopening this...seems like it might be worth doing a little work to finish it and pull it in.

core-ai-bot commented 3 years ago

Comment by njx Friday Apr 05, 2013 at 17:42 GMT


Oh...looks like I can't reopen it--I guess the branch got deleted?

core-ai-bot commented 3 years ago

Comment by njx Friday Apr 05, 2013 at 23:19 GMT


Looks like@victorgama's fork is gone. I found the commit, rebased it, and pushed it up as nj/manual-refresh. If I have some time I'll look into finishing it up.

core-ai-bot commented 3 years ago

Comment by heyvito Friday Apr 05, 2013 at 23:22 GMT


Sorry about that@njx, I guess I deleted it while cleaning up my forks. Well, good luck. :)

core-ai-bot commented 3 years ago

Comment by njx Friday Apr 05, 2013 at 23:31 GMT


No prob, thanks for getting this started.