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

Document file path String methods in File paths in Godot projects #9908

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Sep 5, 2024

@Calinou Calinou added enhancement area:manual Issues and PRs related to the Manual/Tutorials section of the documentation cherrypick:4.3 labels Sep 5, 2024
Copy link
Member

@mhilbrunner mhilbrunner left a comment

Choose a reason for hiding this comment

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

Mild approval, because I wonder if just that sentence (and maybe one example) is enough, with a link to the class ref.

I'm not a big fan of reproducing the class ref like this, because it tends to produce lots of additional effort with the list getting outdated, people creating issues and PRs, us reviewing + merging + cherrypicking etc. If we can, we should have information once and link to it, instead of duplicating. That said, it can be worth it if its especially important, I'm just not sure thats the case here?

Copy link
Contributor

@skyace65 skyace65 left a comment

Choose a reason for hiding this comment

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

I agree with mhilbrunner that this isn't ideal. I think it would be better to just say something like "The string class offers several methods to work with strings that represent file paths, you can find a list of it's class reference page here" and link to the class reference page.

@Calinou
Copy link
Member Author

Calinou commented Sep 15, 2024

I think it would be better to just say something like "The string class offers several methods to work with strings that represent file paths, you can find a list of it's class reference page here" and link to the class reference page.

The String class has a lot of methods unrelated to path manipulation, which is why I opted to explicitly list all relevant methods. Otherwise, you'd need to slowly comb through the class to find them all.

@mhilbrunner
Copy link
Member

@Calinou That makes sense. Do we maybe want to maintain the list in the class reference for String then, and link to it here? That at least increases the chance that we remember to update it when changing String.

@tetrapod00
Copy link
Contributor

As a user of the engine, a list in the File Paths page is clearly the right place for this information. Whether the maintenance burden is worth it is up to you.

Putting the list in the class reference page (presumably in the intro section?) and linking also seems fine, but is there any real precedent for listing a subset of methods like that in the class reference? It means that there is a redundant list of the same methods twice (once as a subset, and once in the main methods list), and it clutters the class reference for String if you're looking at it for other reasons.

Copy link
Contributor

@skyace65 skyace65 left a comment

Choose a reason for hiding this comment

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

Given the discussion I'm in favor of merging this as is. I'd also recommend that instead of copying this list in the class reference we should link to this page in the "tutorials" section of the string class.

@mhilbrunner mhilbrunner merged commit be73f38 into godotengine:master Oct 4, 2024
1 check passed
@mhilbrunner
Copy link
Member

Merging as per the above. Thank you!

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 cherrypick:4.3 enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants