Project detail page: "link to drupal.org" should be provided by the backend plugin

Created on 27 September 2024, 3 months ago

Problem/Motivation

Right now on the detail page, the link to drupal.org is somewhat hardcoded and not getting the URL from the backend directly. This may be because our source plugin(s) are not providing "url" as a field.

Proposed resolution

We need to be able to use the URL provided by the backend source plugin, and we should probably change the link to text to something generic, like "Learn More [=>]" - also, these should always open in a new tab.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇺🇸United States chrisfromredfin Portland, Maine

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

Comments & Activities

  • Issue created by @chrisfromredfin
  • First commit to issue fork.
  • @phenaproxima opened merge request.
  • 🇺🇸United States phenaproxima Massachusetts

    That was pretty simple.

    I think it makes sense to completely adopt core's Url objects when passing URLs around, so that's what I did. The Project constructor now requires either a Url object, or NULL, for the URL.

  • 🇮🇳India omkar-pd

    @phenaproxima,

    Added a comment.

  • 🇺🇸United States phenaproxima Massachusetts
  • 🇪🇸Spain fjgarlin

    Everything looks good here, I was going to RTBC but there is a really small change that I think it's needed as not all Project Browser's plugins might come from Drupal.org, so the message should be more generic.

    Back to needs work based on that.

  • 🇺🇸United States phenaproxima Massachusetts
  • 🇪🇸Spain fjgarlin

    Because it's JS, it needs compiling for the svelte changes to be visible.

  • 🇺🇸United States phenaproxima Massachusetts
  • 🇮🇪Ireland lostcarpark

    I've tested on DrupalPod (vs D11).

    For module projects, it goes to the project page, which makes sense.

    For core recipes, it takes you to the Drupal Core project page, which seems less helpful.

    I'm not sure about the change of label to "Learn more". It's okay where it takes you to the main page of the module, but for core recipes, it makes no sense to the user to be taken to the core project page. I think the only time someone using a recipe would want to go there from a core recipe would be to open an issue, and the "Learn more" label is not intuitive to that.

    I also think using a button for this is not ideal. It means you can't see the target before clicking, and you can't right-click to open in a new window. However, since that's not changed by this issue, a new issue should be opened for that.

  • 🇺🇸United States phenaproxima Massachusetts

    For core recipes, it takes you to the Drupal Core project page, which seems less helpful.

    That's a fair point. Removed.

  • 🇪🇸Spain fjgarlin

    Reviewed on Drupalpod:
    - Enabled core recipes and left the two default recipes included.
    - Checked projects and there is a "Learn more" button that takes you to the page of the project.
    - Checked recipes and there is no "Learn more" button, which makes sense at the moment.

    The code looks good too. RTBC.

  • 🇺🇸United States chrisfromredfin Portland, Maine

    Works great but still doesn't open in a new tab. But that's good enough for a follow-up cuz this is forward progress. Confirmed re-testing that test fails are sporadic and not the same ones even from try-to-try.

  • 🇪🇸Spain fjgarlin

    Yeah, I thought the "convert to link and open on a new tab" should probably be a follow-up.

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

Production build 0.71.5 2024