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 option to remove underline in Editor Docs #64861

Closed
wants to merge 1 commit into from

Conversation

Mickeon
Copy link
Contributor

@Mickeon Mickeon commented Aug 25, 2022

The current Docs are certainly an improvement in style, but there's something that has always given me enough of a headache to instead look up the Docs online, and I can't help but feel like the problem I personally have is much more pronounced for users that have trouble reading in general (poor vision, dyslexia...).

This PR adds a new Editor Setting "text_editor/help/show_meta_underline". This is enabled by default.

On Off
TopOn TopOff
DescriptionOn DescriptionOff
MethodsOn MethodsOff

When disabled, it can definitely be said that the text becomes much cleaner to read. To further sell the deal, in this PR, meta words change cursor shape on hover, regardless of setting:

HoverCursorShapeChange
(In the future, this may actually be useful to show meaningful tooltips in the Editor Documentation, too)

Adds "text_editor/help/show_meta_underline" Editor Setting, enabled by default.
When disabled, all meta words will still change cursor shape on hover.
@Calinou
Copy link
Member

Calinou commented Aug 25, 2022

Could we improve the underline styling to make it less of a problem with regards to readability (e.g. by increasing the spacing or reducing its opacity)? I'd prefer doing this over adding an editor setting (so the solution benefits everyone automatically).

@Mickeon
Copy link
Contributor Author

Mickeon commented Aug 25, 2022

The underline is hardcoded to be drawn with draw_line() to be the same colour as the font. It would be possible to make the colour more transparent, but that is not always the desired result. The spacing as is currently is suitable, actually. The problem is the density of the underlines. Increasing the spacing downwards may only make the issue worse.

An addition to this that may suit everyone, however, is having the underline display only when hovered on. It may(?) be possible to do this without touching the Rich Text Label code. This is pretty much standard behaviour across browsers and applications, already, too.

@Calinou
Copy link
Member

Calinou commented Aug 25, 2022

An addition to this that may suit everyone, however, is having the underline display only when hovered on.

I don't like when websites do this – it makes it hard to know what's a link and what's not without having to point at everything with the mouse. I much prefer having a visible underline at all times, even if it's faint.

@Mickeon
Copy link
Contributor Author

Mickeon commented Aug 25, 2022

Unfortunately that sounds very much like a preference matter. Therefore it can still be argued whether or not this "underline" thing should still be an Editor Setting, or not.

@akien-mga
Copy link
Member

We discussed this in a PR meeting. This calls for digging a bit further to find the One True Style to rule them all. We should aim to harmonize the display in the editor help and in the online docs. Some examples of differences which impact this change:

  • All types are listed in blue in the editor help's table, but some of them (void) are not clickable. If we remove the underlines, we don't know which types are clickable unless they're hovered. The online docs don't have this problem as all links are blue, and non-links are black.
  • Similarly, the inline hyperlinks have a background box which is the same as non-clickable inline code. Removing the underline also makes it harder to know which "inline code" markup is a link or not.

@YuriSizov
Copy link
Contributor

YuriSizov commented Dec 2, 2022

  • All types are listed in blue in the editor help's table, but some of them (void) are not clickable. If we remove the underlines, we don't know which types are clickable unless they're hovered. The online docs don't have this problem as all links are blue, and non-links are black.

Seems like this has been (partially?) addressed by #68159.

Similarly, the inline hyperlinks have a background box which is the same as non-clickable inline code. Removing the underline also makes it harder to know which "inline code" markup is a link or not.

And this was changed in #68132.

@Mickeon
Copy link
Contributor Author

Mickeon commented Dec 2, 2022

I want to note one complication of adding underlines on hover would be requiring custom logic for it, because RichTextLabel does not support it, kind of similarly to what the Script Editor does when holding CTRL.

@akien-mga
Copy link
Member

Superseded by #89049.

@Mickeon
Copy link
Contributor Author

Mickeon commented Mar 9, 2024

Oh noes what a shame!

@AThousandShips AThousandShips removed this from the 4.x milestone Mar 10, 2024
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