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

Make the link underline less obtrusive; don't use it for pattern #8148

Merged
merged 1 commit into from
Nov 3, 2020

Conversation

DHowett
Copy link
Member

@DHowett DHowett commented 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
    • BEFORE
      • image
    • AFTER
      • image
  • 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)
    • BEFORE
      • image
    • AFTER
      • image
      • image

Closes #8123

@ghost ghost 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. labels Nov 3, 2020
Copy link
Contributor

@PankajBhojwani PankajBhojwani left a comment

Choose a reason for hiding this comment

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

Looks good to me! Should we file a follow up for a setting to underline auto detected links?

@zadjii-msft
Copy link
Member

file a follow up for a setting to underline auto detected links?

Probably yea. Maybe we should consider allowing people to customize how auto-detected hyperlinks are highlighted? Like, they could be underlined, or they could be underlined and blue, or they could be bold, or...

@DHowett
Copy link
Member Author

DHowett commented Nov 3, 2020

If we solve it like that, we must solve bold and italic too. 😄

Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

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

I like it

@zadjii-msft
Copy link
Member

okay yes, I was mostly just listing off a list of possible attributes. Could be reversed. Double underline. Of course, I picked the two we don't implement 😆

@DHowett
Copy link
Member Author

DHowett commented Nov 3, 2020

Oh yeah. What I mean is more like, "I as a user want to set the font for [this attribute]". 😄

@DHowett DHowett changed the title Make the hyperlink underline less obtrusive; don't use it for patterns Make the link underline less obtrusive; don't use it for pattern Nov 3, 2020
@DHowett DHowett merged commit 26ca73b into main Nov 3, 2020
@DHowett DHowett deleted the dev/duhowett/prettier_patternier branch November 3, 2020 23:23
DHowett added a commit that referenced this pull request 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

🎉Windows Terminal v1.4.3141.0 has been released which incorporates this pull request.:tada:

Handy links:

@ghost
Copy link

ghost commented Nov 11, 2020

🎉Windows Terminal Preview v1.5.3142.0 has been released which incorporates this pull request.:tada:

Handy links:

DHowett added a commit that referenced this pull request Nov 16, 2020
* Run all images through ImgBot (CC-8169)
* Fix potential over/underflow as noted by "TODO:" comment (CC-8081)
* Fix garbling when copying multibyte text via OSC 52 (CC-7870)
* UIA: throw E_FAIL for out-of-bounds text (CC-8052)
* Consider the GlyphWidth when calculate the postion of matched word in URL detecting (CC-8124)
* Make the link underline less obtrusive; don't use it for pattern (GH-8148)
* Fully regenerate CodepointWidthDetector from Unicode 13.0 (GH-8035)
* Prepare for the primary branch name to change to main (GH-7985)
* Hash the URI as part of the hyperlink ID (GH-7940)
* Introduce til::presorted_static_map (GH-7640)
* Prevent leftover cursor fragments when scrolling in PowerShell (CC-8173)
* Add support for the DECREQTPARM report (CC-7939)
* Refactor VT parameter handling (CC-7799)
* Add support for the "blink" graphic rendition attribute (CC-7490)
* Combine the parsing & dispatch blocks for OSC actions (CC-8202)
* Add support for autodetecting URLs and making hyperlinks (CC-7691)
* Copy _currentHyperlinkId when copying the buffer (CC-8074)
* Fix the "visual representation" optimization for hyperlinks (CC-7738)
* Optimize the binary size of the XOrg color table (CC-7929)
* Add support for more OSC color formats (CC-7578)

Related work items: MSFT-30259074
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. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only underline hyperlinks on hover
3 participants