Open "Learn more" action from detail page in new tab

Created on 2 October 2024, 2 months ago

Problem/Motivation

The "learn more" link on the project detail page (which, for the Drupal.org JSON API backend takes you to Drupal.org, for example) is meant to be an off-site link, so should open in a new tab.

We merged dgo.to/3477232 but this is a follow-up on that.

Steps to reproduce

Load project browser. Open the detail page by clicking the name of the project from the card for a Drupal.org JSON API tab item. Click "learn more" at the bottom right of the page / right-hand column.

Proposed resolution

Add some JS that will open in a new browser tab/window. This may mean converting to a link instead of a button - not sure the ramifications of that decision, but we can debate their merits here.

Feature request
Status

Active

Version

2.0

Component

User experience

Created by

🇺🇸United States chrisfromredfin Portland, Maine

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @chrisfromredfin
  • 🇮🇪Ireland lostcarpark

    I think the problem with the current button is there is no way to interact other than to press it, which loads the drupal.org page, in the current tab.

    If it's possible to convert it to a link, that would have the advantage that in addition to clicking it, you can hover over it to see the destination, and you can right-click to get options, including copy the URL, open in new window, open in incognito window.

    It would also make it less essential to open the link in a new tab, since this could be achieved by ctrl-click or a right-click menu option.

    That said, it seems unlikely that someone would want to navigate away from the site they are building to look at a module page, so I feel the default action should be to open in a new tab.

  • First commit to issue fork.
  • 🇮🇳India omkar-pd

    Converted button to Link.

  • Pipeline finished with Success
    2 months ago
    Total: 1619s
    #299538
  • 🇮🇪Ireland lostcarpark

    I've tested in DrupalPod.

    The change looks good. The link behaves better, and is styled as a button, and the default action opens in a new tab.

    The one thing I'm not completely happy about is the hardcoding of #fff in the :hover style. However, I see this is based off the Claro theme style project__action_button, so I'm not sure there's much we can do about it at present.

    Moving to RTBC.

  • 🇺🇸United States chrisfromredfin Portland, Maine

    just needs a rel="noopener noreferer" on the link since it's opening in _blank.

    As much as I normally would want to put an external link icon on it, I think that's best left to the site owner/theme to configure extlink or something.

    So just that attribute!

  • 🇮🇳India atul_ghate

    atul_ghate changed the visibility of the branch 3478295-open-learn-more to hidden.

  • 🇮🇳India atul_ghate

    atul_ghate changed the visibility of the branch 3478295-open-learn-more to active.

  • Pipeline finished with Failed
    about 2 months ago
    Total: 499s
    #304838
  • Pipeline finished with Failed
    about 2 months ago
    Total: 429s
    #304860
  • Pipeline finished with Success
    about 2 months ago
    Total: 510s
    #304919
  • Pipeline finished with Skipped
    about 2 months ago
    #305192
  • Pipeline finished with Skipped
    about 2 months ago
    #305193
  • 🇺🇸United States chrisfromredfin Portland, Maine

    Thanks!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024