- Status changed to Needs work
almost 2 years ago 10:45am 18 January 2023 - ๐ฎ๐ณIndia anweshasinha
Hi,
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. - ๐ฌ๐งUnited Kingdom joachim
Thanks for the patch.
Remember to set an issue to 'needs review' when you post a new patch :)-
+++ b/core/modules/system/src/Form/ModulesListForm.php @@ -314,6 +314,28 @@ protected function buildRow(array $modules, Extension $module, $distribution) { + $proj_url = Url::fromUri('https://www.drupal.org/project/' . $module->info['project']);
Variable names shouldn't use abbreviations.
-
+++ b/core/modules/system/src/Form/ModulesListForm.php @@ -314,6 +314,28 @@ protected function buildRow(array $modules, Extension $module, $distribution) { + } else {
'else' should not be coddled - should be on a new line.
-
+++ b/core/modules/system/src/Form/ModulesListForm.php @@ -314,6 +314,28 @@ protected function buildRow(array $modules, Extension $module, $distribution) { + // for those module whose info['project'] value is NULL
Comments should be in sentence case with a full stop.
-
+++ b/core/modules/system/src/Form/ModulesListForm.php @@ -314,6 +314,28 @@ protected function buildRow(array $modules, Extension $module, $distribution) { + $module_name = "drupal";
Drupal, if written in a human-readable text, should be 'Drupal' with a capital.
-
+++ b/core/modules/system/src/Form/ModulesListForm.php @@ -314,6 +314,28 @@ protected function buildRow(array $modules, Extension $module, $distribution) { + $proj_url = Url::fromUri('https://www.drupal.org/project/' . $module_Drupal);
I don't see where this variable has been defined. Also, wrong case.
-
+++ b/core/modules/system/tests/modules/system_test/system_test.module @@ -79,6 +79,12 @@ function system_test_system_info_alter(&$info, Extension $file, $type) { + // prevent putting it directly into the .info.yml file.
Comment needs to be a full sentence.
-
+++ b/core/modules/system/tests/modules/system_test/system_test.module @@ -79,6 +79,12 @@ function system_test_system_info_alter(&$info, Extension $file, $type) { + $info['project'] = 'system_test';
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?
-
- ๐ฎ๐ณIndia anweshasinha
Hi,
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. - Status changed to Needs review
about 1 year ago 1:09am 1 September 2023 - ๐บ๐ธUnited States mlncn Minneapolis, MN, USA
Looks good to me and works great!
I don't have joachim's eye but i think everything mentioned in 103 has been addressed.
A few notes, most important first:
- Projects that do not have an explicit project defined should absolutely not have a project page link. I don't see it discussed anywhere but linking to https://www.drupal.org/docs/extending-drupal/installing-modules โ for dozens of core, custom, and laggard contrib modules adds visual clutter and will make people less likely to use and get any value out of the useful links. I do not see this discussed anywhere in this issue and consider the introduction a hard no from this reviewer. There simply should not be any Project link if none is available, same as there's no Help, Configure, or Permissions link if any of those are inapplicable.
- If there is no immediate short-term plan for d.o core modules to take over their namespaces at drupal.org/project/ then i think it is imperative to allow links to other locations, at least on drupal.org. (A
project_page
option 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 โจ Add links to Drupal.org project pages to module listings in /admin/modules Needs review , 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. - It's pretty notable the lack of icon for Project compared to the other links. I think this is supplied by Claro so not part of this patch, but noting this was discussed before in this issue thread and the usability group recommended an icon which indicates this is an external link (as well as adding the text " (external link)" to the end of the visually hidden span). Rather than making the icon before the word Project the "arrow out of box" icon that is usually used after a link to indicate it is external, i would advocate for the old-school globe website icon, ๐ available in UNICODE and as an SVG here. Also not reason to hold up this patch.
- last update
about 1 year ago Custom Commands Failed - Status changed to Needs work
about 1 year ago 3:33am 1 September 2023 The 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.
- ๐ฎ๐ณIndia anweshasinha
Hi,
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. - ๐ฌ๐งUnited Kingdom joachim
-
+++ b/core/modules/system/src/Form/ModulesListForm.php @@ -92,14 +92,14 @@ class ModulesListForm extends FormBase { + $container->get('module_handler'), + $container->get('module_installer'), + $container->get('keyvalue.expirable')->get('module_list'), + $container->get('access_manager'), + $container->get('current_user'), + $container->get('user.permissions'), + $container->get('extension.list.module') + ); }
This indentation shouldn't be changing.
-
+++ b/core/modules/system/src/Form/ModulesListForm.php @@ -141,7 +141,7 @@ public function getFormId() { - require_once DRUPAL_ROOT . '/core/includes/install.inc'; + include_once DRUPAL_ROOT . '/core/includes/install.inc';
Unrelated change?
-
+++ b/core/modules/system/src/Form/ModulesListForm.php @@ -175,9 +175,11 @@ public function buildForm(array $form, FormStateInterface $form_state) { + $modules = array_filter( + $modules, function ($module) { + return !$module->isObsolete(); + } + );
Indentation being changed.
I'm going to stop there -- it looks like your IDE has let loose and changed lots of formatting.
-
- ๐ฎ๐ณIndia anweshasinha
Hi,
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. - Status changed to Needs review
about 1 year ago 7:41am 6 September 2023 - last update
about 1 year ago Custom Commands Failed - last update
about 1 year ago Custom Commands Failed - last update
about 1 year ago 30,076 pass, 1 fail The last submitted patch, 111: project_link_11.x_111.patch, failed testing. View results โ