When entering file name or patch code there is no help text or explanation. Here is a patch which adds the following:

  1. In coder file list, add help text, explain about no leading \ and give example generated using drupal_get_path('module','coder') so that this will show the correct path on the specific site being used
  2. For patches files, increase size of text entry box from 60 (the default) to 150 chars
  3. Added help explaining about relative path and provide example
  4. For patch text area, added help below, and fixed bug in array key name which prevented the help text being shown

Help text:

and

Jonathan

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jonathan1055’s picture

Status: Active » Needs review
FileSize
685 bytes

Patch against 7.x-2.0-beta2+20-dev

jonathan1055’s picture

Just noticed one minor style issue in that patch. Here is one which passes.

jonathan1055’s picture

Also added an example when entering a patch file to review, and increased the textfield size to 150 - the default size of 60 was too short.

jonathan1055’s picture

Version: 7.x-2.0-beta2 » 7.x-2.x-dev
Issue summary: View changes
FileSize
36 KB

Patch in #2 still applies at 7.x-2.3 +dev 2014-12-30
Here is a screenshot of the patch file help.

klausi’s picture

Status: Needs review » Needs work
+++ coder_review/coder_review.module	2013-08-06 16:19:04.000000000 +0100
@@ -223,7 +223,7 @@ function _coder_review_settings_form(arr
+      '#description' => _t('List each relative file path on a separate line without a / at the start. For example: ' . drupal_get_path('module', 'coder') . '/coder.module'),

don't concatenate translatable strings into t() messages, use placeholders with t() instead. See https://api.drupal.org/api/drupal/includes!bootstrap.inc/function/t/7 . Same for the other description.

jonathan1055’s picture

Status: Needs work » Needs review
FileSize
1.7 KB

Yes, of course. I did those code changes a year and half ago - I've improved my practices since then :-)
I have now added a description for the text box and changed the array key for the 'or' to 'coder_patch_or'. It was previously re-using the same array key 'coder_patch_help' which meant that the help text was not shown.

New patch, against dev of 30th Dec.

jonathan1055’s picture

Title: Example when entering relative file path » Help and examples when entering relative file path or patch text
Issue summary: View changes
FileSize
46.41 KB

Patch still applies cleanly at 7.x-2.4
Updated the issue summary to list all the changes.

klausi’s picture

Category: Support request » Task
Status: Needs review » Fixed

Make sure to create your patches from the root folder of coder next time.

Committed, thanks!

  • klausi committed d7c9346 on 7.x-2.x authored by jonathan1055
    Issue #1997860 by jonathan1055: Improved help and examples in Coder...
jonathan1055’s picture

Thanks for committing this.

Make sure to create your patches from the root folder of coder next time.

So do you want a/ and b/ in front of the filepaths at the top of the patch file?

klausi’s picture

I want patches created with "git diff".

Status: Fixed » Closed (fixed)

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