Skip to content
This repository has been archived by the owner on Dec 10, 2019. It is now read-only.

Removing a project path when updating behaves weirdly #60

Closed
DamnedScholar opened this issue Jun 24, 2016 · 7 comments
Closed

Removing a project path when updating behaves weirdly #60

DamnedScholar opened this issue Jun 24, 2016 · 7 comments

Comments

@DamnedScholar
Copy link
Contributor

DamnedScholar commented Jun 24, 2016

This issue is regarding multiple quirks or bugs with the removePath method in modal-update-component.js.

Removal not working

Steps: Update an existing project and add a path, then immediately remove the path and save it. The path is still there even though it appeared to be removed.

This also means that you can't remove a path and then re-add it until you have saved and reopened the project.

Removing a path that has been saved works just fine, but has unexpected behavior (see below).

Removing a project path removes the folder from Atom's project

Steps: Add a path that exists in the current tree view, save the project, open the Update panel and remove that path. The folder in your tree view will disappear.

This one could have been intentional, but I didn't expect it to happen. I tested and found that it occurs even if the project in question is not listed as the currently active project. I don't think this package should mess with what people have open in their tree views unless the user explicitly asks it to.

@jccguimaraes
Copy link
Owner

jccguimaraes commented Jun 24, 2016

that's weird. a while ago i found issues like you described and made some changes. do you have my latest commits in your fork/branch?

@DamnedScholar
Copy link
Contributor Author

Yeah. I found it as I was submitting my latest PR, and I was all up to date at that point.

@jccguimaraes
Copy link
Owner

first point i have identified in the code and is an easy fix (so tomorrow will apply the patch).

the second point is intentional to add to tree or remove from it if you do the action in the update. So the only alternative i see is to make it as an option in config. what you think? i prefer to make it "syncable" between PV/TV.

@jccguimaraes
Copy link
Owner

i need to investigate what you said regarding "even if it's not the active project". that sounds bad :D

@DamnedScholar
Copy link
Contributor Author

DamnedScholar commented Jun 24, 2016

When I noticed it, the status bar said that I had no active project selected. I've made my whole tree view disappear by clicking my button, saving it, and then removing those paths.

Say you have two projects that both use the same external library, so you have it added as a path on each. You're working in project A and decide to remove the library from project B. It will disappear from your current tree view (though not from the PV entry for project A). It seems like it shouldn't do that unless you're removing the path while project B is active.

@jccguimaraes
Copy link
Owner

Yeah, you are right, this was really wrong! damn...
Fixed everything, now it will only add / remove in tree-view if the active project is the same as the updated one

@jccguimaraes
Copy link
Owner

please validate this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants