-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Replace built-in docs codeblock's leading spaces with tabs #87301
Replace built-in docs codeblock's leading spaces with tabs #87301
Conversation
9404070
to
737fbaa
Compare
Could you please rebase on the current master? We had an issue with macOS builds which failed your CI. |
a458548
to
3f9c0e4
Compare
Done just that. |
I don't like the increased indent but I think it's worth it. I'm just confused why we'd need an 8 tab size for what's supposed to be monospace. Also, I would expect the mono tabs to be as wide as my code editor theme, which isn't 4. This is still better than before, I don't think these nitpicks are more important than getting it merged. |
Honestly, I am not sure why RichTextLabel acts like this. I tried a value of It originally was also based on the "indent size" Editor Setting, but because it would've affected the entire RichTextLabel I was not sure about it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
3f9c0e4
to
9d3d805
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, there are issues with code samples that contain multiple tabs on the same line.
For instance, the HTTPRequest class description has a code sample where the push_error()
line has two leading tabs, but none are displayed and copied here:
If you select the block and paste it in a script, you get this:
9d3d805
to
a30f7f1
Compare
a30f7f1
to
4c3e5c0
Compare
Updated the PR to use StringBuilder. I tested and nothing really changed on the outside. |
Replace built-in docs codeblock's leading spaces with tabs
4c3e5c0
to
9d3768d
Compare
Thanks! |
And from here on out begins the built-in reference revolution |
This PR replaces the spaces used in the codeblocks of the class references with actual tabs.
If your Editor Setting's preference is using spaces, nothing changes.
With one GIF, this means the following (notice the tabs):
However, hm... It comes at a cost. For the tab to display in a way that actually looks good, the RichTextLabel's
tab_size
has to be set to8
, otherwise the tab's indent would be way, way too small, for some reason. Because of this, there's the side effect of increasing the indentation across the whole built-in documentation:Take a closer look:
Some may say this is a happy accident, some may absolutely not. So keep that in mind.