-
-
Notifications
You must be signed in to change notification settings - Fork 22.5k
Create docs button for FileSystem resources #33143
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
base: master
Are you sure you want to change the base?
Create docs button for FileSystem resources #33143
Conversation
@thiagoamendola Is this still desired? If so, it needs to be rebased on the latest master branch. While there are no conflicts, rebasing is important so that reviewers can easily test the PR. |
Thanks for the ping. Just rebased the branch. |
8725094
to
e16b4cd
Compare
I think the feature might be desired, but I see two problems with the implementation:
|
@groud about those 2 issues:
|
I had a look to the code. Apparently there is no checks done for the documentation page to exist anywhere else in the code. So I think keeping it like that is ok. Custom types without a documentation will likely trigger an error and do nothing, but I am not sure.
I think it should be enough, but I think we should mention the class name in the text line then. Something like "Open documentation for <class name>". |
By testing the button on a file type with no available documentation, the following empty page is displayed: It doesn't break but it doesn't tell much either. Do you think it's ok showing it? Also, about the "Open documentation for " suggestion, won't the option string become too big, making the popup cluttered? |
I am not sure, I think it would be better to have something implemented to avoid this, as we're going to have issue report about this. I guess we should summon @akien-mga here to give us his opinion. |
Yeah that would need to be prevented. The code should only query opening the docs if it's a file type that matches a builtin Node.
Yeah that's a bit too verbose I think. Some translations might make it even worse. |
f8cd7ab
to
29e99ad
Compare
Like the node's context menu from the Scene tab, the context menu from resources in the FileSystem tab should contain an "Open Documentation" button. The "Open Documentation" button for resources can open the documentation for given resource's type. It works with multiple file selections and avoid opening an empty documentation tab for folders or non built-in types.
29e99ad
to
65bd155
Compare
Would be good to get this re-reviewed / tested, @godotengine/docks. I think it's fine to add this kind of option but we should make sure it also works e.g. for going to the generated documentation for GDScript classes. |
I tested with scripts and it opens GDScript resource documentation instead of the custom class documentation. Seems to work fine in other cases. So this needs a rebase and fixing the GDScript issue. |
Are you still around to rebase? |
Like the node's context menu from the Scene tab, the context menu for
resources in the FileSystem tab should contain an "Open Documentation" button.
The "Open Documentation" button for resources can open the documentation for
given resource's type. It works with multiple file selections and avoids
opening an empty documentation tab for folders.