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 parentheses to method links in online class reference #102567

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

tetrapod00
Copy link
Contributor

Closes godotengine/godot-docs#10641.

Currently we use parentheses when linking to methods within the editor class reference, but not the online class reference. This PR unifies the look of both by using parentheses for method links in the online class reference.
Editor:
Screenshot 2025-02-07 150315

Online, master:
Screenshot 2025-02-07 150326

Online, after this PR:
image

Testing:

.\doc\tools\make_rst.py --color -o ../classes -l en ./doc/classes ./modules ./platform
  • Clone the docs repo if you don't have it. Copy the generated classes to the classes folder of the docs repo, overwriting existing files. I did this by hand 🙂
  • Build the manual.

@tetrapod00 tetrapod00 requested a review from a team February 8, 2025 00:43
@tetrapod00 tetrapod00 requested a review from a team as a code owner February 8, 2025 00:43
@tetrapod00 tetrapod00 added this to the 4.x milestone Feb 8, 2025
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

In the long run, I wonder if methods that accept at least one parameter (even if optional) should be denoted as something(...) instead, like we do in the script editor autocompletion tooltip since 4.4. We'd need to carry this change both in the editor help and class reference generation though, and it's better discussed in its own proposal.

@tetrapod00
Copy link
Contributor Author

We'd need to carry this change both in the editor help and class reference generation though, and it's better discussed in its own proposal.

If we want to keep everything lined up, we would also want to update the manual and its guidelines too, which requires a good bit more manual work.

Copy link
Contributor

@Repiteo Repiteo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lining up everything would likely require some unification of the online/editor sources, which is a mammoth of a bridge to cross when we come to it

This isolated change is harmless at worst & helps readability on top of unifying the styles; let's ship it!

@Repiteo Repiteo modified the milestones: 4.x, 4.4 Feb 14, 2025
@Repiteo Repiteo merged commit 3c8bf62 into godotengine:master Feb 14, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Feb 14, 2025

Thanks!

@tetrapod00 tetrapod00 deleted the add-parentheses branch February 14, 2025 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use parentheses in links to functions within class reference
3 participants