Closed DaelonSuzuka closed 1 year ago
I think this should be in the document outline but alas, guess the doc outline is an LSP thing.
I think this should be in the document outline but alas, guess the doc outline is an LSP thing.
I don't understand how the two are related at all.
I don't understand how the two are related at all.
I am talking about the outline section under the document tab. Sounds like a good place to put the scene tree preview in.
Oh, in the Explorer section in the Primary Sidebar? I interpreted it as the documentation pages that are provided by the LSP.
Yeah, this is basically a document outline for a scene file, so I can see the argument for putting it there. Personally, that's a useless location since if I want to see files, I only want to see files. I always hide Open Editors, Timeline, Outline, anything that's in that category except the file Explorer.
Luckily, you can just drag any sidebar containers to any section you want, so it would be one mouseclick to move it there if that's what you like.
In addition to "because I don't want it there" (which I will admit is not a great reason!), I also think the default location should be its own category to improve user discoverability. If the default location for this thing is minimized at the bottom of the Explorer tab, how many people will even notice that it was added? Adding a Godot category provides an immediately visible, obvious default location for this and other features that I hope I can work on soon.
By the way, screenshots of the new Godot category icon:
I figured the easiest way to explain the new features was with a series of short video clips:
Nodes in the Scene Preview now have several context menu options:
I will probably add a couple more settings, to let the user tweak some of these advanced behaviors.
In the same vein, it's probably appropriate to add some commands to allow manually invoking features.
I very desperately wanted to put icons on the far right of each tree item to indicate it's visibility, whether it has a script attached, if it's been marked unique, etc etc. For some blasted reason, this appears to be literally impossible with the current vscode TreeView API. It's possible to add buttons that are hidden until you move your mouse over them, but there's no way to get permanently visible icons like in the Godot Editor's Scene Tree.
Something like this is probably the best I'll be able to do:
I added a configuration that will let the user pick how aggressively the Scene Preview will search for a "related scene" when opening a script. The options are:
anyFolder
: Attempt to preview a related scene from anywhere in the workspace.sameFolder
: Attempt to preview a related scene from the same folder.off
: Do not attempt to preview a related scene.The default setting is sameFolder
, because I figure that will be helpful and relatively intuitive(aka, not magic), and has a limited chance of grabbing a totally unrelated scene.
I also figured out a relatively clean way to show more information about a given Node. Right now it's just whether there's a script attached and if the node is Unique, but I can add more later if something seems useful.
And, since it can show that there's a script attached, why not let you jump directly to that script?
I think I'm done with this for now.
I want it on the record that I did spend several hours trying to convince Prettier to format to our style, and all I accomplished was getting it to stop working entirely.
I want it on the record that I did spend several hours trying to convince Prettier to format to our style, and all I accomplished was getting it to stop working entirely.
I'm OK with changing the formatting to be more standard across what other popular VS Code extensions are doing. This should be done in a future PR though (and after all prominent PRs are merged to avoid conflicts).
I'm OK with changing the formatting to be more standard across what other popular VS Code extensions are doing. This should be done in a future PR though (and after all prominent PRs are merged to avoid conflicts).
Whatever style choice is fine with me, I just want the freaking tools to do what they're supposed to. I've used clang-format
on C code for like 8 years now, and haven't had 1/100th the issues that Prettier has given me.
I've used clang-format on C code for like 8 years now, and haven't had 1/100th the issues that Prettier has given me.
This is one of the reasons I prefer using just ESLint instead of ESLint + Prettier. Less tools means less moving parts that can potentially break :slightly_smiling_face:
The downside is that formatting is not as strict when using just ESLint.
Honestly, the entire type/javascript experience has been right in line with trying to make Prettier behave. There's some stuff that I like, but boy am I glad I'm not a web developer...
@Calinou Are there actually still changes requested? I'm pretty sure I resolved everything that I saw.
What is the current progress on this PR? This seems like a great feature for Godot vscode! Also does this PR also do the inspector, or is this just only for the scene?
What is the current progress on this PR? This seems like a great feature for Godot vscode!
@Nukiloco Sorry for the radio silence here. I think everybody's just busy, either with Godot 4 Beta activity or other life stuff. I really appreciate your interest here, and hope to get the active PRs cleaned up soon.
Also does this PR also do the inspector, or is this just only for the scene?
Can you rephrase the question here? I'm not sure what you mean by "inspector".
Can you rephrase the question here? I'm not sure what you mean by "inspector".
I think he meant node inspectors. You know, where you changer node properties like position, exported var, etc.?
I very desperately wanted to put icons on the far right of each tree item to indicate it's visibility, whether it has a script attached, if it's been marked unique, etc etc.
Have you tried using emoji? If text is supported, it might work. For example, you could use "📜 Node" instead of "S | Node". Some suggestions:
@AlfishSoftware
I did use emojis before in an earlier version, but I also need (some of) them to be clickable buttons. I may come back and revise this to split some tags into emojis and some into buttons.
This adds a panel to the activity bar that shows a tree preview of the currently selected scene file.
https://user-images.githubusercontent.com/18042232/186282657-50ba98f8-f8c1-49ae-80f3-4846aafd4fe2.mp4
Things that need fixing in this PR:
future improvements (not this PR):j/k these are all in this PR now: