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.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

chrisfromredfin created an issue. See original summary.

phenaproxima made their first commit to this issue’s fork.

phenaproxima’s picture

Status: Active » Needs review

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.

omkar-pd’s picture

Status: Needs review » Needs work

@phenaproxima,

Added a comment.

phenaproxima’s picture

Status: Needs work » Needs review
fjgarlin’s picture

Status: Needs review » Needs work

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.

phenaproxima’s picture

Status: Needs work » Needs review
fjgarlin’s picture

Status: Needs review » Needs work

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

phenaproxima’s picture

Status: Needs work » Needs review
lostcarpark’s picture

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.

phenaproxima’s picture

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

That's a fair point. Removed.

fjgarlin’s picture

Status: Needs review » Reviewed & tested by the community

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.

chrisfromredfin’s picture

Status: Reviewed & tested by the community » Fixed

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.

fjgarlin’s picture

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

Status: Fixed » Closed (fixed)

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