Needs work
Project:
Drupal core
Version:
main
Component:
extension system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
4 Sep 2017 at 09:41 UTC
Updated:
6 Sep 2023 at 08:31 UTC
Jump to comment: Most recent, Most recent file





Comments
Comment #2
ifrik+1
Adding link to the project page on d.o would be a very simple way of alerting users that there are additional resources and an issue queue.
However I would only add one link to the project page, using the default wording that we also use for the link on the help page. That way users can find documentation, modules that work together as well as the issues
Linking directly to the issue queue however would probably result into users flooding the issue queue with support requests, so for now I would rather leave the issue queue that one step removed.
Comment #3
heddnWe'd have to figure out how to direct folks to the project page, even for sub-modules of a project. This is not inherently obvious, but a lot of modules are nested inside of a project as a sub-module. The link would need to be do the project page, not the module's page.
Re-titling.
Comment #4
tarekdj commented@heddn good point. I started working on a patch that relies on regex to get the module name. Should be ready by tomorrow.
Comment #5
tarekdj commentedComment #6
rachel_norfolkAlso remember not all modules are necessarily on d.o. They may have come from github etc or be completely custom or internal.
Probably worth mentioning my tweet about this has created quite some interest. There’s clearly need.
Comment #7
tarekdj commentedAs a starting point, the patch supports only contrib modules from D.O by using the key "project" from .info.yml file. For other modules, maybe we can add extra data to .info.yml file but this should be discussed first, I guess.
Comment #8
tarekdj commentedHere is a first shot.
Comment #9
tarekdj commentedComment #10
andrewmacpherson commented@tarekdj - Thanks for the patch in #8. Remember to set the issue status to "Needs Review".
The patch changes files in the Stable theme (adds an icon, updates a template and CSS). However changes to Stable (and Classy) theme are not normally allowed. To make this work, I think we need to make the template changes in System module and in the Seven theme. Something like this:
core/misc/icons.Tagging for Stable and Classy theme maintainers in case they want to make an exception. :-)
Note: I haven't reviewed the logic in
ModulesLIstForm.php- I'm working on a mobile phone, so that's a bit tedious. I just skim read the changes and looked at which files are affected. Someone else please review theModulesListFormlogic?Comment #11
ifrikThanks for this.
I think we can get around having to change the theme files, because there is an issue to get rid of those icons anyway and rather have a dropdown list for the links because on a small screen there is no way what so ever to get to the links: #2574721: Provide access to action links in the modules page on small screens
About the wording: This should be "online documentation" instead of "Module's homepage" because that is the default wording we use for the same link in the help texts.
"For more information, see the online documentation for the Foo module."Comment #12
loparev commentedHi @ifrik
Here is a patch with changed wording
Comment #13
hussainwebIMHO, I find "Module's homepage" better than "Online documentation". I'd actually prefer "Project page" over the first two. Of course, it would be nice to include "online documentation" in
titleattribute for the link.The reason I think online documentation is not the best way to word it is because it does not link to the online documentation. Clicking on "online documentation" and landing on project page would be annoying (for me, at least). If we say "online documentation", we should link to the documentation that's available for some modules (accessible from sidebar on project page). Of course, we can't get that link without an API call, and I don't want the scope of this issue to expand to that.
I understand the reasoning in #11 but I'd point out that in the help text where it is written as "online documentation", it actually points to the documentation. Also, there is no such text for contrib modules help entries out of the box.
Comment #14
ifrikHi,
looks like there's lots of bike shedding potential on the wording here :-)
Let's keep it simple and consistent.
Project: We don't use "project" in the UI, even though it is in the path on d.o., but so are themes etc there. Using "project" here would introduce a new term without need for it, so that's not such a good idea.
Module: The UI text on the Extend page still refers to "modules" but the page itself got renamed, based on the assumption that users wouldn't know what they are. So we can use that, but "home page" sounds a bit weird since in most cases this will link to a page within d.o.
"Online documentation": That should include any kind of documentation that exist about a module: Dependencies, changes between versions, known issues, and explanations on how to use the module (the part that sometimes, but not always is also called "documentation". This all can usually be found from the project page on d.o.
The help text standard, is supposed to link to this page with the "online documentation" link, and the related test test for this specific wording. This standard also applies for contrib modules.
For core modules we also use this wording - but then we ran into the problem that core modules don't have their own module pages, so we had to resort to finding an other page to link to. (In some cases like Views UI, that really only a stub unfortunately).
So, if we use "online documentation" we can bring people to the same page with the same wording that should ideally be used on the help page, and from there they will find anything else.
Comment #15
ivan berezhnov commentedComment #16
jrockowitz commentedWhat about using composer.json's "support" section which allows for custom URLs for issues and docs. This would solve the issue of supporting sub-module and different documentation versions.
Also by allowing modules and themes to specify the desired homepage and documentation, we are taking into account that some projects are not being hosted on Drupal.org.
Personally, I think we should use composer.json's homepage and support settings to create dropdown menu that allows for a project maintainer to specify any of the following...
I am willing to bet in D9, we will be replacing module.info.yml with composer.json files.
Comment #18
mlncn commentedAgree with using composer.json's support section, with one caveat: can we make it work for Drupal core modules also? This feature is just as needed for core modules (if not more needed, since core modules are already there so people can't even remember/ask where it came from and look for documentation there), and core modules should set a good, follow-able example.
Comment #21
uditrawatComment #26
quietone commentedClosing #857090: D8 Modules' page: Add links to module help, project page + merge operations links to one cell. and #1191084: UX: Link Module Names to Drupal.org as duplicates of this. Adding credit from those issues here.
Comment #27
ressaThis is a great idea. Do the points you make in #10 still stand @andrewmacpherson?
Comment #31
dwwWhoops. I've been working on #3012004: Add a link to the module's drupal.org project page in the module admin page, and just found this issue, instead. Since this is older and has more participants, moving progress here. For starters, here's the latest patch from 3012004, which only deals with the project page link. I'm not convinced a direct link to the issue queue is the right approach here. No interdiff, since it's a brand new patch. Supports Claro, too.
Crediting @joachim, too (author of the original patch in the duplicate issue).
Comment #32
dwwBased on an enlightening Slack chat with @andrewmacpherson about the now duplicate #3012004: Add a link to the module's drupal.org project page in the module admin page, I opened #3245622: Module name context missing for 'help' and 'permissions' links on admin/modules about adding some more context to these links for folks using screen readers.
Meanwhile, I'd like to carefully review what's already in here and see if the two patches should be more thoughtfully merged. ;)
Also, the suggestion from @andrewmacpherson was to make the non-visual context a bit less verbose here. Working on that now.
Comment #33
dwwHere's the less verbose link context.
Comment #34
dwwDone reading through this issue more closely...
Definitely don't need/want to touch classy or stable* for this, per the current patches. Removing those tags.
Re: composer.json - as appropriate as all that would be, even #3005229: Provide optional support for using composer.json for dependency metadata still isn't done, much less are we requiring a composer.json. Probably D10 material at this point. So I don't think we should be relying on that here.
Re: "project" - yeah. 😉 It's a loaded term. However, as @andrewmacpherson pointed out in Slack:
This echos the sentiments in #13 that calling this a link to "online documentation" would be misleading at best.
The proposal in #3228567: Decide on consistent naming for future core modules that implement Automatic Updates and Project Browser functionality is to call these things "packages" not "projects", but that's not decided or done. I think "Drupal.org package page" would be even more confusing and weird. I'd think that'd be a release node or something with release notes. Naming Is Hard(tm).
Re: Core - I don't see any reason to try to hide these links for core modules, or to worry about doing anything fancy with submodules. In each case, if the .info.yml file defines the right
projectkey, each (sub)module will get a link to the right project page. If the project was installed from d.o, the packaging script inserts the rightproject. If you're using Git clones or composer to checkout -dev releases, you need another solution for this problem already if you want the Update manager to work (which also depends on aprojectkey), and you're using something like git_deploy or the fancy composer plugin that rewrites your .info.yml files for you (whatever that's called).Yes, It'd Be Nice(tm) to support things that don't live on d.o. But I think to do that properly, we'd need to either finish #3005229 and switch to composer.json for all this stuff, or we'd have to introduce new .info.yml keys. The former is a good idea for lots of reasons, but in progress, and not going to be done anytime soon. I believe the later isn't wise in the short term, since "no one" would be defining this key properly, and this feature wouldn't immediately start working for the vast majority of projects (like it does now).
That said, maybe tying this so tightly to Drupal.org (with the icon and link title, as we were doing in #3012004: Add a link to the module's drupal.org project page in the module admin page and now in the latest patches here) isn't wise, either. So, maybe we should keep using the house icon (per #8 / #12) and call the link "Package home page". Although that still sounds more like a link to releases notes or something (IMHO).
Anyway, I don't think there's anything else from patch #12 that should be merged in here (unless we return to using house.svg for the icon). I'm definitely not sure on the right wording here, so I'm tagging for usability review and moving back to NR.
Comment #35
dwwSorry, forgot to fix the title. Per my previous comments:
Comment #36
dwwPer #3228567-13: Decide on consistent naming for future core modules that implement Automatic Updates and Project Browser functionality, maybe the link text here should be:
?
Comment #37
aaronmchaleLet's stick with the word "project" ("Drupal.org project page"), the term "project" refers to everything that makes up a module (D.o project page, issue queue, download bundle, etc), whereas the "packages" is specifically the code that is "packaged up" and shipped through Composer. So sticking with "project" in this context makes sense.
Comment #38
chrisfromredfinAbsolutely. Hard +1 on "Project home page for [...]"
Comment #39
dww"Project home page [for @module_name]" sounds good. And then we can use the house icon instead of drupal-logo (which is probably safer/better, anyway). I'll work on all that now, stay tuned.
Comment #40
dww- Change link text to "Project home page [for @module_name]" (the part in [] is visually-hidden).
- Change icon from drupal-logo.svg to house.svg
- Update screenshots in the summary (both Seven and Claro)
Comment #41
aaronmchaleI like it! "Project home page" is also good as a more generic term for custom distros that maybe want to modify where that goes for their modules.
Comment #42
dwwAdded test coverage for the new link. No "Needs tests" tag needed. 😉
Comment #43
dwwGrrr, I was afraid that might happen:
There's a work-around. I'll deal with it later today.
Comment #44
dwwSorry, got really busy at $day_job yesterday. Here's the test fix.
Also, cleaning up a few distractions in the issue summary in anticipation of the UX review.
Comment #46
dwwFixing typo in the summary. Hoping to get this reviewed as part of #3265255: Drupal Usability Meeting 2022-02-25.
Comment #47
aaronmchaleWe reviewed this issue at #3265255: Drupal Usability Meeting 2022-02-25.
There was general agreement that this is a positive change.
A few minor tweaks were suggested and agreed by the group:
Since the three other links that sit next to this one (Help, Configure and Permissions) go to internal pages in the site, we felt it was important to distinguish that this link goes to an external site, we are happy that the recommendations above achieve this.
Comment #48
aaronmchaleWhile setting up for the UX meeting, I also noticed that the patch does not apply to 9.4, it does apply to 9.3 though.
Comment #49
andregp commentedI'll do a reroll for 9.4 and work on #47
Comment #50
andregp commentedSorry, I changed the status unintentionally.
Comment #51
andregp commentedHere is the reroll patch.
Regarding #47
1. Done
3. Done
Points 2. and 4. need follow-up issues.
Comment #52
andregp commentedSorry, I sent the wrong files. Here are the right ones.
Comment #53
andregp commentedI didn't see an extra space 🤦
New patch...
Comment #55
benjifisherFor the record, the attendees at today's usability meeting were andregp, Antoniya, AaronMcHale, ckrina, bnjmnm, kimberlly_amaral, worldlinemine, victoria-marina, tmaiochi, rkoller, shaal, and me.
The issue for the meeting (link in #47) will have a link to the recording and a transcript.
Comment #56
aaronmchaleQuick patch review:
module-link-homepageshould probably be something likemodule-link-project-page.$row['links']['homepage']to$row['links']['project_page'].From a closer look at the patch, I notice that it is actually introducing the "house" icon, during the UX meeting we assumed that the house icon was already present. In that case it might make sense to actually introduce the "external link" icon as described in #47.2. I will ping Cristina in Slack.
Comment #57
ckrinaThanks @AaronMcHale! I think we shouldn't introduce an icon for later switching it. I'm attaching the external icon we discussed during the call: I've adapted it to 16px from a free of license icon.
The reason behind using this one and not the house is because the house can be misleading to whoever is running a Drupal site: we know drupal.org is the "house" for Drupal, but the house is usually understood as the homepage for the current site. A drop as an alternative might not make sense for a lot of people too. The external icon, on the other side, is an industry standard and a bigger percentage of users will understand its meaning. To note too that the behavior won't rely on the icon only because it shouldn't be forcing an external link, so not understanding the icon meaning shouldn't be a big deal. It is better explained on the UX recording mentioned in #47.
Comment #58
dwwThanks so much for the UX review, suggestions and follow-up patches.
Re #56:
The 2 points on variable names: totally agree. I was gonna say the same. All those things where named when this was “home”-specific.
However, no, the patch is only introducing 1 more copy of the existing house icon in the right shade of blue for Claro’s hover state. The house icon is already in use in core.
But sure, I hear the points that an external link arrow would be a better icon.
If we’re going to do the external link icon, wouldn’t that icon’s alt text provide the non-visible clue that y’all proposed to include in the hidden link text? Would that not result in duplicate info? My understanding from previous accessibility reviews and discussions is that the best solution generally is to make the links the same for everyone. The hidden text thing is less evil than nothing, but silo’ing users is not ideal. Trying to channel my inner @andrewmacpherson. 😉 But I really don’t know. I think we should get the accessibility experts to weigh in on this point before we RTBC this. Tagging as such.
Thanks!
-Derek
Comment #59
dwwP.s. re #47.4:
Everything else made sense, but this does not. 😉 the only way these links appear on admin/modules is if you already installed them. Project browser is designed to help you find and install new stuff. this issue is about helping you find issues and docs for the stuff you already installed. I think it’d be a major UX wtf if I installed something, then was presented a link back to how to install it again. Furthermore, we’re going to want to keep the browser UI focused on helping you decide if you want to install it, not helping you navigate information once you’ve already decided and installed it.
Finally, if we changed these to point to PB, they’d no longer be external links and the whole discussion around icons is reopened.
Comment #60
aaronmchaleYep totally appreciate what you're saying there, the specific point on the PB was my suggestion, and it was based purely on the assumption that PB project page would be similar to the D.o project page, however until the UI has actually been signed off we won't know for sure, and who knows how having PB in core will change the D.o project experience in the long-run. So it sounds like there are just too many unknowns at the moment to even consider that, so let's not bother opening a follow-up for that one. I'm sure if it makes sense at some point in the future than we can revisit it.
Ah right okay that was a misunderstanding on my part then.
From looking at the patch, it looks like the icon is added as a background image and so it wouldn't have alt text, right?
Comment #61
andregp commentedOkay, I'm working on this. I'll add the new icon and improve the wording.
@AaronMcHale, yes, I checked by looking at the other icons for comparison and the icons don't have alt text.
Comment #62
andregp commentedHere is the patch :)
Comment #63
aaronmchaleI think this is almost ready, but it just occurred to me that we'll need an update hook to clear the cache, otherwise the icon won't show up initially.
Edit: not the entire site cache, just rebuild the CSS for the active admin theme.
Comment #64
ressaThis is a nice improvement, so thanks for working on it. It looks like the project link is only shown if the module is enabled. I would think that it would be quite useful to be able to research also non-enabled modules ...
Comment #65
yogeshmpawarComment #66
yogeshmpawarAddressed #63 & #64.
Added an interdiff as well.
Comment #67
yogeshmpawarComment #68
ressaPerfect @yogeshmpawar, modules which are not yet enabled now also have links. Thanks!
Comment #69
aaronmchaleThank you for the additional work on this.
Agree with showing the link for modules which are not installed.
It did occur to me that in addition to rebuilding the CSS the template cache will also need to be rebuilt, since we're making changes to template files.
I suspect we'll also need a change record to notify theme developers of the changes to the templates, maybe also for the new icon.
Comment #70
aaronmchaleOh and the update hook comment probably needs to be a bit more general, as that's what shows up in the UI. So something like "Add project page links to modules list."
Comment #71
yogeshmpawarThanks @AaronMcHale, addressed #70 & added an interdiff. keeping this issue in NW as it requires change record.
Comment #72
dww"Needs followup" was added in #51 for #47.2, but we now have the external link icon in here (since #62). Per #59 and #61, we don't need/want a follow-up for #47.4. So removing that tag.
I created the CR about the new icon, so removing that tag, too.
@ckrina re: #57: Thanks for the new icon! Looks good.
@AaronMcHale re: #60: Yeah, sorry, was livin' in the past. ;) No
<img>tag, only background via CSS, so no duplicate alt text. Removing the "Needs accessibility review" tag I added in #58. Thanks!@andregp re: #62: Thanks for reworking this. However, I don't think we want to add the new icon to stable. That's only for the state of front-end related assets from Drupal 8. If anything, we might want to add this to stable9, but I don't think we really want to do that, either. I'm not entirely sure anymore. But here's a patch to at least remove it from stable. If we need to add it to stable9, a committer will tell us. 😉
@ressa re: #64 Good catch, agreed!
@yogeshmpawar re: #66: Thanks for diving in to help, too.
Also refreshed the screenshots in the summary with the new icon, so no need for "Needs screenshots" tag.
Comment #73
aaronmchaleAfter discussing with @dww on Slack, we agreed that an additional change record should be created to address the changes to the Twig template and generally address this link being added.
Drupal modules list will now provide links to project pages on Drupal.org
Comment #74
aaronmchaleSetting this back to NW as there's an remaining action from comment #69:
Comment #76
gquisini commentedI'll work on it.
Comment #77
gquisini commentedWhat I did was more like a reroll of previous patches, but without changing any themes.
Comment #78
pooja saraah commentedFixed Failed commands on #77
Attached inderdiff
Comment #79
elberComment #80
elberHi, I revised the patch #79 but the issue wasn't fixed and then I will wait for someone else to review to confirm the status change
Comment #81
aarti zikre commentedComment #82
aarti zikre commentedVerified
https://www.drupal.org/files/issues/2022-07-06/2906547-78.patch
Testing Steps:
* Install a new Drupal instance
* Apply patch using composer
* Clear the all caches
* Go to /admin/modules
Test Results:
It not fix the issue. Link is not getting generated.
Refer SS

Comment #83
aarti zikre commentedComment #84
aarti zikre commentedCreated patch for the 9.5.x dev version.
Please review and verify.
https://www.drupal.org/files/issues/2022-07-12/project_link_9.5.x_dev_tested.patch
Tested locally and its result
Before patch:
After Patch:
On Hover:
Comment #85
aarti zikre commentedComment #86
aarti zikre commentedComment #87
aarti zikre commentedComment #88
aarti zikre commentedComment #90
aarti zikre commentedComment #91
aarti zikre commentedComment #92
aarti zikre commentedComment #93
aarti zikre commentedComment #94
aarti zikre commentedComment #95
aarti zikre commentedComment #96
aarti zikre commentedVerified for Drupal 9.5.x dev version
https://www.drupal.org/files/issues/2022-07-14/project_link_9.5.x_dev_94...
Testing Steps:
* Install a new Drupal instance
* Open '/admin/modules'
Test Result:
Verified that after applying patch each modules have project which redirect them to drupal.org respected module page. It also shows the project link to uninstall module and core modules too.
To maintain consistency for all module the modules which do not have their own project info link then it will have https://www.drupal.org/project/drupal/ link.
Refer SS
After Patch patch for core modules:
After Patch patch for contrib modules:

Test Result Pass
Someone please review this patch
Comment #97
aarti zikre commentedComment #99
rinku jacob 13 commentedI have tested and verified patch #94 for drupal version 10.1.x-dev .The patch was suitable for 10.1.x-dev . I think we can re-roll the patch for latest version if we not need to add any additional features. Adding screenshots for the reference of 10.1.x.
Comment #100
aaronmchaleThese two blocks are almost identical. We could simply have the
ifstatement set the value of the#url, then we would need to duplicate the whole array.Comment #102
anweshasinha commentedHi,
I have applied the patch from #94(project_link_9.5.x_dev_94.patch) in drupal 11.x version as the core version has changed to 11.x. So I made the necessary changes regarding the project link and attached the interdiff and the patch file. Please review it.
Comment #103
joachim commentedThanks for the patch.
Remember to set an issue to 'needs review' when you post a new patch :)
Variable names shouldn't use abbreviations.
'else' should not be coddled - should be on a new line.
Comments should be in sentence case with a full stop.
Drupal, if written in a human-readable text, should be 'Drupal' with a capital.
I don't see where this variable has been defined. Also, wrong case.
Comment needs to be a full sentence.
I don't understand what this code is for.
If we need this test module to have a 'project' key to test it, why not just put it in the info file?
Comment #104
anweshasinha commentedHi,
I have made some more changes in the code based on #103 and have regenerated the patch again. Please do review it once and let me know.
Comment #105
mlncn commentedCode looks good to me and the links work great for a bunch of contrib projects already!
I don't have joachim's eye but i think everything mentioned in 103 has been addressed.
A few notes however, most important first:
project_pageoption for *.info.yml files that can override building the link based onproject, say.) Honestly i think we should allow links to non-Drupal project pages or standalone project websites. (I am make public and contribute on d.o any potentially useful module myself, but we know this feature would be useful for university or large organization deployments with many in-house modules, and other not-on-d.o projects.) All that would be a follow-up issue and maybe should be a separate "More information" link or something. Actually even if we never ditch *.info.yml for composer.json, if we allow more links, we should use the same keys, as jrocowitz outlined, for the non-project page links— or d.o can start parsing the composer.json and including these links on the d.o project page! All that said as long is 1) is done i think we should get this patch in and then figure out the right solution for core and custom projects.Comment #106
mlncn commentedComment #107
mlncn commentedComment #108
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #109
anweshasinha commentedHi,
I have made some more changes in the code based on #108 and have regenerated the patch again. Please do review it once and let me know.
Comment #110
joachim commentedThis indentation shouldn't be changing.
Unrelated change?
Indentation being changed.
I'm going to stop there -- it looks like your IDE has let loose and changed lots of formatting.
Comment #111
anweshasinha commentedHi,
I have made the changes in my patch according to #111 and have regenerated the patch again. Please do review it once and let me know.
Comment #112
kostyashupenko