Skip to content
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 export_range annotations to tutorial for GDScript Exports and also links to all export_ variants #9281

Open
hsandt opened this issue Apr 26, 2024 · 1 comment
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation enhancement

Comments

@hsandt
Copy link
Contributor

hsandt commented Apr 26, 2024

Your Godot version: v4.2

Issue description:

The GDScripts Export tutorial doesn't mention @export_range annotations such as radians_to_degrees. Searching "godot export range angle" on the net gave me this page as first result, instead of the exhaustive doc on annotations, so this seems important to explain there.

Maybe we can't put everything in the tutorial, but then we should at least link to the documentation for people who need more info, the same way as @export_group has a hyperlink.

In fact, I noticed that other @export_ also missed a hyperlink, so we should probably add one for all of them: @export_file, @export_dir, etc.

Before each snippet introducing a new @export_ we could add "See @export_... (link to corresponding export doc)" and also a big link to the annotation section at the top.

For the "(link to corresponding export doc)", I didn't know how to get the url hash tag for a given section. Unlike tutorial headers which have a small ¶ symbol near them on hover to get the URL tag, doc sections have no such thing... But looking at the code on this repo, I found out that the marker used is @export_group <class_@GDScript_annotation_@export_group> to generate a link to "https://docs.godotengine.org/en/stable/classes/class_%40gdscript.html#class-gdscript-annotation-export-group" so that should be feasible for other @export_ variants by adapting the marker.

URL to the documentation page (if already existing):
https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_exports.html#limiting-editor-input-ranges

@skyace65 skyace65 added the area:manual Issues and PRs related to the Manual/Tutorials section of the documentation label Apr 29, 2024
@Skyefre
Copy link
Contributor

Skyefre commented May 6, 2024

I've added hyperlinks to the annotation page for each export that needed one, just waiting for the changes to be looked at/merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation enhancement
Projects
None yet
Development

No branches or pull requests

3 participants