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

Class reference: Add self-links to methods, properties, etc. #91537

Merged
merged 1 commit into from
May 28, 2024

Conversation

rburing
Copy link
Member

@rburing rburing commented May 3, 2024

Have you ever wanted to link someone to a specific place in the class reference? You can find the links to specific methods, properties, etc. in the tables at the top of the page. But what if you find the right place by Ctrl+F or by scrolling? Are you going to scroll all the way back up just to get the link? No! No more of this 🙂

Get what you want directly from where you are: the little 🔗 has the link that can be clicked and/or copied.

godot-classref-selflinks

Ideally, as a follow-up someone would update the CSS on godot-docs to make the 🔗 appear only when the parent element is hovered, to reduce visual clutter (as is standard).

The feature is inspired by the SageMath documentation.

@JoNax97
Copy link
Contributor

JoNax97 commented May 3, 2024

Nice improvement!

I'd like if a link icon 🔗 could be used instead, I think it's more commonly understood nowadays

@Calinou
Copy link
Member

Calinou commented May 3, 2024

I'd like if a link icon 🔗 could be used instead, I think it's more commonly understood nowadays

I would also make the text/icon a bit larger so it's easier to click/tap, or at least give it some padding to its clickable area with a custom CSS class.

@rburing rburing force-pushed the doc_classref_self_links branch from 477f5b9 to 1f85213 Compare May 3, 2024 22:27
@rburing
Copy link
Member Author

rburing commented May 3, 2024

The CSS part needs to be done on the godot-docs repo.

Edit: Done.

@rburing rburing force-pushed the doc_classref_self_links branch from 40becfc to b27c7ec Compare May 26, 2024 07:49
@rburing rburing force-pushed the doc_classref_self_links branch from b27c7ec to b280bc0 Compare May 26, 2024 07:55
Copy link
Member

@AThousandShips AThousandShips left a comment

Choose a reason for hiding this comment

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

Can't confirm the exact functionality but I approve of this feature

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.

Tested locally (together with godotengine/godot-docs#9324), it works as expected.

simplescreenrecorder-2024-05-26_20.08.03.mp4

@akien-mga akien-mga modified the milestones: 4.x, 4.3 May 28, 2024
@akien-mga akien-mga merged commit 5a13bb5 into godotengine:master May 28, 2024
16 checks passed
@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.

5 participants