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

Improve shortcut formatting in docs #36960

Merged
merged 1 commit into from
Apr 29, 2020

Conversation

YuriSizov
Copy link
Contributor

Followup to godotengine/godot-docs#3257.

Added a new [kbd] tag for docs, similar to <kbd> tag here on GitHub. It translates into :kbd:`` when generating RST-files. For built-in docs a style similar to [code] was chosen, but the font is one point smaller and has a different color. I think, if #35608 is merged, the [kbd] tag should be then made more visible with a darker background color.

Here is the worst example for built-in help:
image

I've decided not to add this tag in some cases, like the KEY_ constants in @GlobalScope. I don't think that it would help readability there and some of the key names are very descriptive or specific. Can be easily corrected though, now that we have a tag.


If I'm understanding the purpose of the modules/mono/editor/bindings_generator.cpp file correctly, this new tag is also excluded from XML docs in C# API bindings as unsupported.

@YuriSizov YuriSizov force-pushed the docs-improve-shortcuts branch from f85a2a1 to 1ea7295 Compare April 10, 2020 15:42
@YuriSizov
Copy link
Contributor Author

Just in case anybody was wondering: the build was fine, the information here did not update for some reason.

@neikeq
Copy link
Contributor

neikeq commented Apr 15, 2020

If I'm understanding the purpose of the modules/mono/editor/bindings_generator.cpp file correctly, this new tag is also excluded from XML docs in C# API bindings as unsupported.

Yes, changes look good. It will add the tag content as normal text.

@akien-mga akien-mga added this to the 4.0 milestone Apr 29, 2020
@akien-mga akien-mga merged commit 41af228 into godotengine:master Apr 29, 2020
@akien-mga
Copy link
Member

Thanks!

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.

4 participants