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.
Issue fork project_browser-3477232
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
Comment #4
phenaproximaThat 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.
Comment #5
omkar-pd commented@phenaproxima,
Added a comment.
Comment #6
phenaproximaComment #7
fjgarlin commentedEverything 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.
Comment #8
phenaproximaComment #9
fjgarlin commentedBecause it's JS, it needs compiling for the svelte changes to be visible.
Comment #10
phenaproximaComment #11
lostcarpark commentedI'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.
Comment #12
phenaproximaThat's a fair point. Removed.
Comment #13
fjgarlin commentedReviewed 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.
Comment #15
chrisfromredfinWorks 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.
Comment #16
fjgarlin commentedYeah, I thought the "convert to link and open on a new tab" should probably be a follow-up.