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

Enables links for blips. Makes link target configurable. #103

Merged
merged 3 commits into from
Dec 21, 2022

Conversation

bocytko
Copy link
Member

@bocytko bocytko commented Dec 21, 2022

Includes changes from #73.

  1. Links are now always enabled for blips
    Previously, it was only enabled for blips if there is
    no legend (config.print_layout = true)
  2. Use xlink:href everywhere
    Previously, blips used xlink:href, but text still used href.
    xlink:href has actually been deprecated, but currently still
    has better cross-platform support.
  3. Links can now open in new tabs
    Previously, links always opened in the existing tab. This adds
    a new config: links_in_new_tabs. Setting that to true will
    add a target="_blank" for all hrefs, causing the link to be
    opened in a new tab. Setting config.links_in_new_tabs to false
    or not including it at all retains the old behavior.

cmreigrut and others added 3 commits August 5, 2022 22:58
This changes a few things about links:
1. Links are now always enabled for blips
   Previously, it was only enabled for blips if there is
   no legend (config.print_layout = true)
2. hrefs are only added if there is actually a link
   Previously, there were always href created--if there was no
   link, the href was #.  This caused a page refresh and a blink
   of the tech radar.
3. Use xlink:href everywhere
   Previously, blips used xlink:href, but text still used href.
   xlink:href has actually been deprecated, but currently still
   has better cross-platform support.
4. Links can now open in new tabs
   Previously, links always opened in the existing tab.  This adds
   a new config: links_in_new_tabs.  Setting that to true will
   add a target="_blank" for all hrefs, causing the link to be
   opened in a new tab.  Setting config.links_in_new_tabs to false
   or not including it at all retains the old behavior.
Empty <a> tags negatively affect the SEO score (as measured by Chrome's Lighthouse plugin).
@bocytko bocytko merged commit 61c710e into zalando:master Dec 21, 2022
@bocytko bocytko deleted the adjust-link-behavior branch December 21, 2022 18:34
@bocytko bocytko mentioned this pull request Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants