Commit Graph

75 Commits

Author SHA1 Message Date
K. S. Ernest (iFire) Lee f9b488508c
Add PackedVector4Array Variant type
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-05-03 00:58:27 +02:00
A Thousand Ships 23782b898b
Add further details on properties returning `Packed*Array` 2024-04-08 11:35:27 +02:00
Danil Alexeev ca486985d5
Documentation: Fix RST generation for `[codeblock lang=text]` 2024-03-11 10:24:09 +03:00
Thaddeus Crews fb299d0fb1
SCons: Ensure `with` statement where applicable 2024-03-10 12:57:57 -05:00
Thaddeus Crews d9fa40f2df
Enforce `\n` eol for Python writes
• Ensure utf-8 encoding if previously unspecified
2024-03-09 14:29:24 -06:00
Danil Alexeev 87718d2a6e
Editor Help: Add syntax highlighting for code blocks 2024-03-09 00:02:31 +03:00
Abel Toy 882441a0ad
Support Array and PackedArray in @export_* 2024-03-06 16:17:54 +09:00
Danil Alexeev 8ed19d1a24
Make RST docs consistent with Editor Help docs 2024-02-19 20:03:27 +03:00
Danil Alexeev 12c86c6716
Documentation: Treat deprecated/experimental members as documented 2024-02-16 17:15:33 +03:00
Danil Alexeev af28f87791
Documentation: Add support for deprecated/experimental messages 2024-02-15 15:59:50 +03:00
RedMser db798b29b2 Add keywords to the class reference
Allows for finding methods, properties, signals, constants,
theme items and annotations more easily.

- Allow "keywords" attribute in aforementioned locations
  in the class reference XMLs
- Extends doctool, to preserve these attributes
- Update the XSD schema for the class reference
- Update the RST generator to include a meta tag for class keywords
- Update the editor help to support filtering by keywords
2024-02-09 18:13:23 +01:00
Micky 0b02b9571c Add "missing description" tag to constant documentation
Revives #85836

Co-Authored-By: krysperz2 <106302189+krysperz2@users.noreply.github.com>
2024-01-16 18:33:33 +01:00
Rémi Verschelde 079d58be9c
Merge pull request #86971 from YuriSizov/makerst-parity-check
Add code sample language parity check to `make_rst.py`
2024-01-16 15:07:40 +01:00
Hugo Locurcio cd3078e45b
makerst: Suggest using `[code skip-lint]` to skip warnings if intended 2024-01-15 15:09:21 +01:00
Yuri Sizov bba3c70722 Add code sample language parity check to make_rst.py 2024-01-15 14:38:04 +01:00
Micky 46b0f3e9d6 Fixing some reports to String's documentation
Closes https://github.com/godotengine/godot-docs/issues/8043
Closes https://github.com/godotengine/godot-docs/issues/8044
Mitigates https://github.com/godotengine/godot-docs/issues/8190
Closes https://github.com/godotengine/godot/issues/86734
2024-01-10 12:21:08 +01:00
Haoyu Qiu 9c83d3db5b Fix missing heading in translated online class reference 2023-12-07 11:35:06 +08:00
Mikael Klasson 4986d6d317 Fix invalid Python escape sequences 2023-12-06 11:51:41 +09:00
Hugo Locurcio c7f6504105
makerst: Disallow user-contributed notes on the class index page
User-contributed notes are still allowed on individual class pages.
2023-11-17 10:51:29 +01:00
Yuri Sizov 0924ae0167 Resolve collisions in reference anchors added for methods
While the anchors themselves were sufficiently unique,
when converted to HTML all underscore characters are
replaced. This created collisions between, say, Object._get and
Object.get, where the latter would get a generic unique
anchor identifier, e.g. id1.
2023-11-08 15:16:35 +01:00
Yuri Sizov cc0eebd9d8 Validate `code` tags for class and member references
This commit also adds means to manually disable warnings
in `code` tags where it's a false positive with the new
`skip-lint` attribute.

Warnings are now enabled on CI to prevent future errors.
2023-10-03 15:48:31 +02:00
Raul Santos a164e3e7b3
Add a note about C# differences in classref doc 2023-07-09 01:44:48 +02:00
Rémi Verschelde 81064cc239
Doctool: Remove version attribute from XML header
We don't use that info for anything, and it generates unnecessary diffs
every time we bump the minor version (and CI failures if we forget to
sync some files from opt-in modules (mono, text_server_fb).
2023-07-06 10:08:21 +02:00
Rémi Verschelde c9c941e339
CI: Update static checks to black 23.3.0
And apply it to the codebase, removing empty lines at the start of blocks.
2023-06-19 23:33:02 +02:00
Danil Alexeev eb391d3302
Display `BitField[Enum]` in docs to distinguish from `Enum` 2023-06-15 17:23:02 +03:00
Yuri Sizov 391eccca76 Validate code tags in documentation for potential params
Adds a check to make_rst to look for matches
between the text inside of the [code][/code] tag
and known param identifiers.
Fixes most of what was revealed.
2023-04-26 21:36:04 +02:00
Yuri Sizov 0562decf34 Unexpose AnimationTrackEditPlugin as not implemented 2023-04-25 11:38:17 +02:00
Yuri Sizov 3ae282b452 Create an "Editor-only" section in the online class reference
This helps to find such classes without digging
through the rest of the class reference.
Editor-only classes can still be found under
your normal "Node" and "Resource" types.

This also fixes a typo and a missed case from the recent platform docs PR.
2023-04-24 21:06:55 +02:00
bruvzg a5128e71bb
[Export docs] Move docs to platform folders. 2023-04-20 11:02:12 +03:00
Hana 026791027f fix conversion of csharp attributes in code blocks 2022-12-05 22:58:47 +01:00
Yuri Sizov 9e71cacd61 Improve layout of generated class references RST pages
- General improvements to the page layout
- Improved formatting for all class (properties, signals, annotations, theme properties, methods, operators, constructors, enumerations, constants)
- Added extra styling opportunities throughout the generated document
- Made generated tables more flexible to their content
- Changed highlighting for self-reference from code to strong
2022-12-05 15:30:09 +03:00
Yuri Sizov 0aba659891
Merge pull request #68848 from Piralein/fix-class-ref
Fix warnings in class ref
2022-11-22 20:27:15 +03:00
Hana a5e5f1aa50 fix warnings in classref 2022-11-20 19:25:13 +01:00
Yuri Sizov aac01fbaf8 Improve class reference split, list variant types separately 2022-11-18 15:47:53 +03:00
Yuri Sizov 4a5c179405 Split generated RST for class reference based on the base type 2022-11-18 00:36:09 +03:00
Yuri Sizov 270c810343 Add more call-to-action notes when documentation is missing 2022-11-17 22:33:55 +03:00
Jiri Suchan c5bd2f9dce ci: add Python static analysis check via mypy 2022-09-30 19:03:17 +07:00
Jason Yundt 7f30e81abe Fix invalid literals in generated rst docs
Before this change, API docs that look like this:

	…adding [param character]s to the right of the string.

would turn into rst files that look like this:

	…adding ``character``s to the right of the string.

That reStructuredText is invalid and causes warnings when the docs repo
is built.
2022-09-12 15:51:39 -04:00
Andy Maloney e430975b86 [doc] Use f-strings throughout make_rst.py
Based on discussion in #64230
2022-08-30 13:02:25 -04:00
Yuri Sizov a287276ef0 Make cross-link generation more reliable in RST documentation 2022-08-26 19:13:41 +03:00
Yuri Sizov d953d9590b Improve the `make_rst.py` parser for BBCode tags 2022-08-15 17:45:10 +03:00
Yuri Sizov c5d7115038 Rename the argument tag to param in XML documentation 2022-08-08 22:34:31 +03:00
Yuri Sizov 35c1eae8d7 Add support for [param foo] syntax in valid documentation contexts 2022-08-08 22:18:38 +03:00
Yuri Sizov beceba85da Add checks for empty/unnamed arguments to make_rst.py 2022-08-08 16:36:01 +03:00
Andy Maloney 2748220133 [make_rst] Remove (fake) return types on annotations
Based on discussion in #63561, Yuri mentioned that the return types are not necessary here, so remove the fake "void" return types on annotations.
2022-08-04 20:10:32 -04:00
Andy Maloney a1428ca3c8 Convert Python type hints in tools/make_rst.py
Since Python 3.5+ is required, we can use proper type hints based on PEP 484. Because we are working on contributor tooling we can assume 3.6+ and use PEP 526 for variable declarations as well.
2022-08-03 13:06:50 -04:00
Jcrespo d9b4ece093 Patch the make_rst.py utility to handle specially operators with '<'
When generating rst files from xml class reference, unknown references
to operators were generated, as something like:

:ref:`operator <<class_Vector2_operator_lt_bool>`

was rendered in html as:

operator ( Vector2 right )

-it just needed escaping.

The small addendum checks for operator names containing '<' and
substitutes it with '\<', escaping at rst level and generating
instead the right rendered html:

operator < ( Vector2 right )

This affected mostly the reference pages of the VectorX family of
classes. If in the future more types need escaping, a more
general solution will be needed.
2022-07-28 12:37:30 +02:00
Rémi Verschelde f66527ddc3 doc: Fix relative paths in `make_rst.py` generated comment
Follow-up to #63495.
2022-07-27 13:52:46 +02:00
Rémi Verschelde 1bb56d9298
Merge pull request #63495 from YuriSizov/docs-improve-autogen-note 2022-07-27 13:24:03 +02:00
Yuri Sizov f3561696da Improve the autogenerated note in RST docs for class reference 2022-07-27 13:43:06 +03:00