-
Notifications
You must be signed in to change notification settings - Fork 24
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @xhulz, thanks for taking care of this. Great improvement.
As a side effect, if the user has more than one Truffle workspace, the Contract Explorer shows a bunch of contracts
folders, making it difficult to distinguish between each other
Hey @acuarica, Thank you for your review. The issue #248 has asked to find the directory within the projects, which the developed patch solves. As for the other problems you mentioned, I will evaluate because I need to understand how this view was developed and has been working today, to see the possibility of making these corrections in the best possible way. Thank you again |
I think this is a good step forward and the provider code I was working on was thinking about this same problem in a different way. I think we need a more general solution to create the treeview recursively to mirror the structure of the folders/projects. Alongside this if this was tied into a provider searching feature it would then know if folderA was truffle or another type. Interrogate the config for that folder knowing where to look for the contracts folder etc and this would then use sensible defaults and also the config when overridden. I was working on this for the POC and it has a bit of overlap with this, I would hopefully be able to post something in the next day once I get it working a bit better. What do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we bring this feature into the POC for providers and use this style of directory traversal alongside it?
I think right now this will fix the issue with multiple contract folders but still has issues in terms of display or understanding what is where in the folders?
Hey @acuarica and @michaeljohnbennett I just made 2 new tweaks:
###########################################################################################
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @xhulz, looking good. I've made some comments that we can either address here or in another PR, since as you mentioned earlier they are not technically related to this PR.
Hey @acuarica, I just removed those extra lines in the Thank you |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
One last thing about error handling. Now that the file explorer combines multiple projects into a single view, it might make sense to catch errors individually. For example, if one of the Truffle config files has an error, we might still want to display the other projects
opbox-1667399970910.mp4
Hey @acuarica, Thank you, i'll do that |
yeah, this looks better 👍🏻 |
I can merge this code into the POC work I'm doing and move to the AbstractWorkspace code I have refactored. |
Hey @acuarica and @michaeljohnbennett! I've made some tweaks and put the error message inside the file explorer box. You can see some examples below. Thank you again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
PR description
Issue ref: #248
When more than one workspace is opened on Visual Studio Code, the Explorer View does not find the contract folder. This patch fixes this situation and displays the directory regardless of location
Documentation
doc-change-required
label to this PR if documentation updates are required.