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

Only underline hyperlinks on hover #8123

Closed
j4james opened this issue Nov 1, 2020 · 4 comments · Fixed by #8148
Closed

Only underline hyperlinks on hover #8123

j4james opened this issue Nov 1, 2020 · 4 comments · Fixed by #8148
Assignees
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Task It's a feature request, but it doesn't really need a major design. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@j4james
Copy link
Collaborator

j4james commented Nov 1, 2020

Description of the new feature/enhancement

I can understand that some people will feel differently about this, but could we at least have an option to underline the hyperlinks only when the mouse is hovered over them, instead of showing the underline all the time?

On explicit hyperlinks (via OSC 8) I feel it should really be up to the app generating the link to choose how it wants that rendered. For example, you might be trying to make a link look like a button, but then we add dashed underlines everywhere which totally mess up the effect.

In the case of the autodetected hyperlinks, it's already obvious when something is a link. And the annoying thing is the underline doesn't track very well when you scroll, so ends up lingering on areas of the page that don't even have a link. I don't know if that's something we can fix, but either way I'd rather it just didn't underline at all until you hovered.

And as a point of comparison, every terminal I've tried so far that autodetects links does so my showing the underline only when you hover over the link. This includes Gnome Terminal, Konsole, Alacritty, Kitty, Terminator, and Mintty - the latter only showing the underline when you're pressing Ctrl at the same time.

For OSC 8 links, Gnome Terminal displays a dotted underline without having to hover, but it's at least more subtle than our dashed underline. Mintty again only shows an underline when actually hovering over the link with the Ctrl key pressed.

@j4james j4james added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Nov 1, 2020
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Nov 1, 2020
@DHowett
Copy link
Member

DHowett commented Nov 2, 2020

Yeah, I’m actually totally in support of this. It hides a chosen deficiency (scanning for URLs on a delay) and makes the screen less cluttered.

How about:

  • we use a less obtrusive dotted line, eventually configurable, for OSC 8
  • that dotted line becomes a solid line on hover
  • for detected URLs, we use no treatment but offer a solid line on hover

Eventually, we can add configuration for different treatments for both types of link.

@zadjii-msft zadjii-msft added Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels Nov 2, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Nov 2, 2020
@zadjii-msft zadjii-msft added this to the Terminal v2.0 milestone Nov 2, 2020
@zadjii-msft zadjii-msft removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Nov 2, 2020
@DHowett DHowett self-assigned this Nov 3, 2020
@ghost ghost added the In-PR This issue has a related PR label Nov 3, 2020
@DHowett
Copy link
Member

DHowett commented Nov 3, 2020

This is now in PR in #8148.

@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Nov 3, 2020
DHowett added a commit that referenced this issue Nov 3, 2020
This pull request switches up the treatment we use for pattern-detected
links and OSC 8 hyperlinks:

* Links generated via OSC 8 have a sparse dotted underline instead of a
  thick dashed one
* Links generated by pattern detection _are not underlined until they've
  hovered_
   * This papers over a visual glitch that is a result of us updating
     the pattern matches every ~500ms (on change)

Closes #8123
@ghost ghost added Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed In-PR This issue has a related PR labels Nov 3, 2020
DHowett added a commit that referenced this issue Nov 3, 2020
This pull request switches up the treatment we use for pattern-detected
links and OSC 8 hyperlinks:

* Links generated via OSC 8 have a sparse dotted underline instead of a
  thick dashed one
* Links generated by pattern detection _are not underlined until they've
  hovered_
   * This papers over a visual glitch that is a result of us updating
     the pattern matches every ~500ms (on change)

Closes #8123

(cherry picked from commit 26ca73b)
@ghost
Copy link

ghost commented Nov 11, 2020

🎉This issue was addressed in #8148, which has now been successfully released as Windows Terminal v1.4.3141.0.:tada:

Handy links:

@ghost
Copy link

ghost commented Nov 11, 2020

🎉This issue was addressed in #8148, which has now been successfully released as Windows Terminal Preview v1.5.3142.0.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Task It's a feature request, but it doesn't really need a major design. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants