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

GDScript documentation comments: description tooltips are omitted when applied to @export variables with multiline arguments, as well as @export_category #78934

Closed
Yerdun opened this issue Jul 2, 2023 · 5 comments · Fixed by #81699

Comments

@Yerdun
Copy link

Yerdun commented Jul 2, 2023

Godot version

4.1.rc2.mono.official

System information

Godot v4.1.rc2.mono - EndeavourOS #1 SMP PREEMPT_DYNAMIC Thu, 11 May 2023 16:40:42 +0000 - Vulkan (Forward+) - integrated Intel(R) HD Graphics 4400 (HSW GT2) () - Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz (4 Threads)

Issue description

When using GDScript documentation comments to create description tooltips for @export variables, they do not show up in the editor if:

To illustrate, here are some screenshots from the included minimal reproduction project.

working

nonworking_multiline

nonworking_category

Steps to reproduce

Copy-paste this code into a new node's script. A minimal reproduction project with all this prepared is included below for convenience.

extends Node


## This shows up in the editor.
@export_enum("example1", "example2",) var good_enum


## [i]This shows up in the editor, but goes against recommended practices.[/i]
@export_enum(
	"example1", "example2",) var poor_practice_multiline


## THIS DOES NOT SHOW UP IN THE EDITOR.
@export_enum(
	"example1",
	"example2",
) var bad_enum

## THIS DOES NOT SHOW UP IN THE EDITOR.
@export_category("Categories truncate comments")

## THIS DOES NOT SHOW UP IN THE EDITOR.
@export var bad: int

Minimal reproduction project

tooltip-bug.zip

@akien-mga
Copy link
Member

Confirmed reproducible with the MRP.

@LinqLover
Copy link

LinqLover commented Jul 18, 2023

Description tooltips are also missing when the variable is exported by overriding _get_property_list instead of using @export.

Edit: No, I was wrong. Seems like descriptions are only updated after reloading the project?

@louis-vinchon
Copy link

louis-vinchon commented Feb 11, 2024

While it apparently has been fixed when exactly one @export_category() is used, it is still broken when multiple are in use; all descriptions disappear as soon as you have two.

v4.2.1.stable.official [b09f793]

@TechnoLukas
Copy link

@louis-vinchon It also depends on placement of @export_category(). I described it here => #64432 (comment)

@dalexeev
Copy link
Member

@louis-vinchon See #88318. For the future, feel free to open a new issue instead of commenting on a closed old one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants