-
-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add scene preview panel #413
Conversation
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 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: Scene Preview PinningClicking the pushpin button locks the currently displayed scene. This makes it easier to use the Scene Preview as a reference while working on scripts. Code_2Yfuw5hw7M.mp4Switch between a scene and a related scriptIn C/C++, pressing Code_nmU19QHW56.mp4Display Scene Preview when viewing related scriptUsing the same mechanism as above, the Scene Preview will show you the scene file that matches the script you have open. Code_wMmez2YRHg.mp4Tooltips with syntax highlightingHovering over a node in the scene tree will now show you a tooltip of that node's entire definition. Code_I34p3MCo85.mp4Nodes in the Scene Preview now have several context menu options: Right Click > Copy Node PathThis menu option will copy the path of the selected node, relative to the root of the current scene. If the node has been marked as Unique, the unique node path will be copied instead ( Code_uwUA82vPpI.mp4Right Click > Go to DefinitionThis menu option will jump to and highlight the definition of the selected node. Code_3VBZ4qcNmy.mp4Right Click > Open SceneThis menu option is only available on PackedScene nodes, aka instances of other scenes. Selecting this will open the scene file that the selected node is an instance of. Code_SORO1iHtSx.mp4 |
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:
The default setting is 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? Code_6poGA69OIO.mp4 |
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'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 |
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 🙂 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! |
@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.
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.? |
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.
Thanks!
Have you tried using emoji? If text is supported, it might work.
|
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.
Code_qnnZVaqaQS.mp4
Things that need fixing in this PR:
future improvements (not this PR):j/k these are all in this PR now: