Skip to content

Commit 200c91b

Browse files
committed
GDScript: Update deprecated/experimental docs
1 parent ec3e094 commit 200c91b

File tree

3 files changed

+23
-18
lines changed

3 files changed

+23
-18
lines changed

tutorials/scripting/gdscript/gdscript_documentation_comments.rst

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ Tags
3535
| Description | No tag. Use one blank line to separate the description |
3636
| | from the brief. |
3737
+-------------------+--------------------------------------------------------+
38-
| Tutorial | | ``@tutorial:`` |
39-
| | | ``@tutorial(The Title Here):`` |
38+
| Tutorial | | ``@tutorial: https://example.com`` |
39+
| | | ``@tutorial(The Title Here): https://example.com`` |
4040
+-------------------+--------------------------------------------------------+
41-
| Deprecated | ``@deprecated`` |
41+
| Deprecated | | ``@deprecated`` |
42+
| | | ``@deprecated: Use [AnotherClass] instead.`` |
4243
+-------------------+--------------------------------------------------------+
43-
| Experimental | ``@experimental`` |
44+
| Experimental | | ``@experimental`` |
45+
| | | ``@experimental: This class is unstable.`` |
4446
+-------------------+--------------------------------------------------------+
4547

4648
For example::
@@ -51,8 +53,8 @@ For example::
5153
## The description of the script, what it can do,
5254
## and any further detail.
5355
##
54-
## @tutorial: https://the/tutorial1/url.com
55-
## @tutorial(Tutorial2): https://the/tutorial2/url.com
56+
## @tutorial: https://example.com/tutorial_1
57+
## @tutorial(Tutorial 2): https://example.com/tutorial_2
5658
## @experimental
5759

5860
.. warning::
@@ -86,18 +88,20 @@ the double hash symbol ``##`` to be considered as part of the documentation.
8688
Tags
8789
~~~~
8890

89-
+--------------+-------------------+
90-
| Description | No tag. |
91-
+--------------+-------------------+
92-
| Deprecated | ``@deprecated`` |
93-
+--------------+-------------------+
94-
| Experimental | ``@experimental`` |
95-
+--------------+-------------------+
91+
+--------------+--------------------------------------------------+
92+
| Description | No tag. |
93+
+--------------+--------------------------------------------------+
94+
| Deprecated | | ``@deprecated`` |
95+
| | | ``@deprecated: Use [member another] instead.`` |
96+
+--------------+--------------------------------------------------+
97+
| Experimental | | ``@experimental`` |
98+
| | | ``@experimental: This method is incomplete.`` |
99+
+--------------+--------------------------------------------------+
96100

97101
For example::
98102

99103
## The description of the variable.
100-
## @deprecated
104+
## @deprecated: Use [member other_var] instead.
101105
var my_var
102106

103107
Alternatively, you can use inline documentation comments::
@@ -134,8 +138,8 @@ Complete script example
134138
## The description of the script, what it can do,
135139
## and any further detail.
136140
##
137-
## @tutorial: https://the/tutorial1/url.com
138-
## @tutorial(Tutorial2): https://the/tutorial2/url.com
141+
## @tutorial: https://example.com/tutorial_1
142+
## @tutorial(Tutorial 2): https://example.com/tutorial_2
139143
## @experimental
140144

141145
## The description of a constant.
@@ -186,7 +190,7 @@ Complete script example
186190
## The same rules apply here. The documentation must
187191
## immediately precede the class definition.
188192
##
189-
## @tutorial: https://the/tutorial/url.com
193+
## @tutorial: https://example.com/tutorial
190194
## @experimental
191195
class Inner:
192196

@@ -202,9 +206,10 @@ Complete script example
202206

203207
You can mark a class or any of its members as deprecated or experimental.
204208
This will add the corresponding indicator in the built-in documentation viewer.
209+
Optionally, you can provide a short message explaining why the API is not recommended.
205210
This can be especially useful for plugin and library creators.
206211

207-
.. image:: img/deprecated_and_experimental_marks.webp
212+
.. image:: img/deprecated_and_experimental_tags.webp
208213

209214
- **Deprecated** marks a non-recommended API that is subject to removal or incompatible change
210215
in a future major release. Usually the API is kept for backwards compatibility.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)