Original report by @jenlampton

Problem/Motivation

On the image field settings form, the two field labels "Maximum image resolution" and "Minimum image resolution" should really be "Maximum image dimensions" and "Minimum image dimensions" .

Though wikipedia admits that the former is commonly used to mean 'dimensions', this tends to trip up people with print or graphic design backgrounds, who actually expect to limit an image's true resolution.

Proposed solution

In Drupal 10 and 11, We should update all the user interface text, and corresponding code to all these values dimensions instead of resolutions.

In Drupal 10 and 11 we may need to provide an update hook to move variables in the field config tables from the old D7 names to the new D10 and 11 names.

In Drupal 7, we should update only the user interface text.

Remaining tasks

- D10 and 11: Update user interface text
- D10 and 11: Update code to match UI
- D7: Update user interface text only.

User interface changes

- "Maximum image resolution" should become "Maximum image dimensions"
- "Minimum image resolution" should become "Minimum image dimensions"

API changes

- function rename (in file.module):
function file_validate_image_resolution(FileInterface $file, $maximum_dimensions = 0, $minimum_dimensions = 0) is renamed to "file_validate_image_dimensions"
- method rename (in class ImageItem):
public static function validateResolution($element, &$form_state) is renamed to "validateDimensions"

Related issues

#1134022: Update "Maximum image resolution" to read "Maximum image dimensions"
#1215730: Terminology update: don't say "Resolution" when we mean "Dimensions"

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Task because it is rewriting a user interface string for clarity
Prioritized changes The main goal of this issue is usability.
Disruption This is not disruptive, because it renames two little-used APIs and leaves a BC layer in place.
CommentFileSizeAuthor
#117 after_applying_patch.png101.22 KBShivam Agarwal
#117 before_applying_patch.png86.87 KBShivam Agarwal
#115 patch.png101.22 KBShivam Agarwal
#113 1215784-dimensions-113.patch28.49 KBSaphyel
#111 interdiff-108-111.txt1.09 KBSaphyel
#111 1215784-dimensions-111.patch28.49 KBSaphyel
#108 interdiff.txt954 bytesSaphyel
#108 1215784-dimensions-108.patch28.91 KBSaphyel
#106 interdiff.txt1.84 KBSaphyel
#104 1215784-dimensions-104.patch27.97 KBSaphyel
#102 interdiff.txt3.58 KBSaphyel
#102 1215784-dimensions-102.patch28.91 KBSaphyel
#94 interdiff.txt1.58 KBSaphyel
#94 1215784-dimensions-94.patch30.75 KBSaphyel
#90 interdiff.txt734 bytesSaphyel
#90 1215784-dimensions-90.patch30.5 KBSaphyel
#86 interdiff.txt632 bytesSaphyel
#86 1215784-dimensions-86.patch30.3 KBSaphyel
#80 1215784-dimensions-80.patch29.86 KBSaphyel
#71 interdiff-1215784-66-71.patch1.37 KBsanjusci
#84 1215784-dimensions-84.patch30.3 KBSaphyel
#85 interdiff.txt642 bytesSaphyel
#85 1215784-dimensions-85.patch30.31 KBSaphyel
#84 interdiff.txt635 bytesSaphyel
#71 1215784-71.patch28.07 KBsanjusci
#66 1215784-dimensions-66.patch28.08 KBpenyaskito
#66 1215784-dimensions.interdiff.65-66.txt4.44 KBpenyaskito
#65 1215784-dimensions-65.patch28.06 KBpenyaskito
#65 1215784-dimensions.interdiff.64-65.txt4.44 KBpenyaskito
#64 1215784-dimensions-64.patch24.09 KBpenyaskito
#64 1215784-dimensions.interdiff.63-64.txt1.57 KBpenyaskito
#63 1215784-dimensions-63.patch23.18 KBpenyaskito
#53 interdiff-1215784-48-53.txt696 bytesstephaneq
#53 1215784-53.patch23.2 KBstephaneq
#48 terminology_update-1215784-48.patch22.69 KBjayelless
#41 terminology_update-1215784-41.patch18.9 KBjayelless
#38 interdiff-1215784-30-38.txt13.34 KBjayelless
#38 terminology_update-1215784-38.patch18.76 KBjayelless
#34 interdiff-1215784-30-33.txt11.43 KBjayelless
#33 interdiff-1215784-30-33.txt12.78 KBjayelless
#33 terminology_update-1215784-33.patch19.14 KBjayelless
#30 interdiff.txt23.95 KBalansaviolobo
#30 terminology_update-1215784-1.patch9.58 KBalansaviolobo
#27 core-dimensions_not_resolution-1215784-27.patch18.24 KBjeffschuler
#16 core-dimensions_not_resolution-1215784-16.patch18.31 KBscresante
#13 core-dimensions_not_resolution-1215784-13.patch18.83 KBjenlampton
#13 core-dimensions_not_resolution-1215784-13-do-not-test.patch3.54 KBjenlampton
#11 dimensions_not_resolution-1215784-11.patch14.65 KBjenlampton
#9 dimensions_not_resolution-1215784-9.patch11.02 KBjenlampton
#7 dimensions_not_resolution-1215784-7.patch13.77 KBjenlampton
#5 dimensions_not_resolution-1215784-5.patch9.43 KBjenlampton
#5 dimensions_not_resolution-1215784-5-D7.patch3.54 KBjenlampton
#1 dimensions.patch6.4 KBdroplet

Issue fork drupal-1215784

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

droplet’s picture

Version: 7.x-dev » 8.x-dev
Status: Active » Needs review
StatusFileSize
new6.4 KB

Agreed

Tor Arne Thune’s picture

Issue tags: +String freeze

Tagging.

lambic’s picture

Status: Needs review » Reviewed & tested by the community

looks good

tr’s picture

Status: Reviewed & tested by the community » Needs work

Function names should be changed too, to agree with the terminology. For example, testResolution() should be renamed testDimensions(), now that the function comments all say dimensions instead of resolution.

These are the functions I found referenced in the patch:

testResolution()
testFileValidateImageResolution()
file_validate_image_resolution()
_image_field_resolution_validate()

jenlampton’s picture

Status: Needs work » Needs review
StatusFileSize
new3.54 KB
new9.43 KB

updated everything in D8, only UI in D7.

Status: Needs review » Needs work

The last submitted patch, dimensions_not_resolution-1215784-5.patch, failed testing.

jenlampton’s picture

Status: Needs work » Needs review
StatusFileSize
new13.77 KB

This time with changes to file module too.

Status: Needs review » Needs work

The last submitted patch, dimensions_not_resolution-1215784-7.patch, failed testing.

jenlampton’s picture

Status: Needs work » Needs review
StatusFileSize
new11.02 KB

This time without my other work in it :)

Status: Needs review » Needs work

The last submitted patch, dimensions_not_resolution-1215784-9.patch, failed testing.

jenlampton’s picture

Status: Needs work » Needs review
StatusFileSize
new14.65 KB

This time updating simple test and user module too.

kgoel’s picture

Tested the patch in Drupal 8 and it is looking good in user interface and code.

There is user.module.orig file in the patch which needs to be removed from the patch as per http://drupal.org/node/1268890.

Druapl 7 user interface is looking good too but this makes some changes in the code. Does it mean that patch needs to backport to Drupal 7 also?

jenlampton’s picture

I couldn't find any .orig files in the patch, perhaps git added them to your codebase when you applied the patch?

rerolling anyway since we are out of date.
D8 version changes all incorrect instances of 'resolution'
D7 version only updates the UI.

scresante’s picture

Status: Needs review » Needs work
Issue tags: +Novice, +String freeze

The last submitted patch, core-dimensions_not_resolution-1215784-13.patch, failed testing.

scresante’s picture

Changes made to user.install , reroll

scresante’s picture

Status: Needs work » Needs review
jeffschuler’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +SprintWeekend2013

D8 patch looks good!
Tested with image fields on content types and default user picture field.

webchick’s picture

Status: Reviewed & tested by the community » Needs work

I would've expected to see an upgrade path here from D7 sites using the old name? There are hunks that touch update functions, but they look like find/replace.

jbrown’s picture

Status: Needs work » Reviewed & tested by the community

D8 currently migrates user pictures into image fields.

The patch in #16 updates the migration code so it still works:

@@ -731,8 +731,8 @@ function user_update_8011() {
       'max_filesize' => update_variable_get('user_picture_file_size', '30') . ' KB',
       'alt_field' => 0,
       'title_field' => 0,
-      'max_resolution' => update_variable_get('user_picture_dimensions', '85x85'),
-      'min_resolution' => '',
+      'max_dimensions' => update_variable_get('user_picture_dimensions', '85x85'),
+      'min_dimensions' => '',
jbrown’s picture

bleen’s picture

Status: Reviewed & tested by the community » Needs work

I think you are missing webchick's point here ... if the variable was named "foo_resolution" in D7, then I would expect that an upgrade to D8 would create a new variable called "foo_dimensions" and that it would get its initial value from "foo_resolution". That is not what is happening here.

At some point i would expect to see something that looks like this:

'foo_dimensions' = update_variable_get('foo_resolution', '');
quicksketch’s picture

And additionally, we'd need to go through all the fields and update the widget settings for all fields to rename resolution to dimensions. I'd love to see this fixed too.

jbrown’s picture

The variable is called "user_picture_dimensions" so it already has the correct terminology. It gets deleted in user_update_8011() because it is migrated into field config. The patch in #16 is correct in this regard because it changes user_update_8011() so the field config that is being created uses the new config item names.

quicksketch’s picture

The patch in #16 is correct in this regard because it changes user_update_8011() so the field config that is being created uses the new config item names.

Ah, clever. Well that means a definite breakage of existing 8.x sites. I'm not sure where this fits in our policies. I think it's basically, "make 8.x-to-8.x upgrades work if it's easy, but breaks are okay if upgrades are hard". That seems to describe this situation, so maybe no new updates are needed.

jeffschuler’s picture

Status: Needs work » Needs review

Rerolled.
Changes in core/profiles/standard/standard.install got moved into core/profiles/standard/config/field.instance.node.article.field_image.yml.

jeffschuler’s picture

the patch...

jeffschuler’s picture

I am seeing, (as quicksketch suggests in #23) that on D7 => D8 upgrade, the field instance settings haven't been changed.

Notice: Undefined index: max_dimensions in image_field_instance_settings_form() (line 100 of core/modules/image/image.field.inc).
Notice: Undefined index: min_dimensions in image_field_instance_settings_form() (line 127 of core/modules/image/image.field.inc).

I'm not yet sure where this should get updated.

jeffschuler’s picture

Status: Needs review » Needs work
jeffschuler’s picture

Issue summary: View changes

Issue summary stuff, better.

alansaviolobo’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new9.58 KB
new23.95 KB

rerolled the patch.

Status: Needs review » Needs work

The last submitted patch, 30: terminology_update-1215784-1.patch, failed testing.

jayelless’s picture

Assigned: Unassigned » jayelless
Issue tags: -SprintWeekend2013 +#SprintWeekend #drupal8NZ
jayelless’s picture

StatusFileSize
new19.14 KB
new12.78 KB

I have completed the terminology changes and rolled a new patch.

Two API changes to note:
1. The function "file_validate_image_resolution" has become "file_validate_image_dimensions"
2. The method "validateResolution" in class imageItem has changed to "validateDimensions"

The Interdiff file is also attached.

jayelless’s picture

StatusFileSize
new11.43 KB

I realised that I did not create the interdiff for patch #33 correctly, so have re-done it properly.

jayelless’s picture

Issue summary: View changes
jayelless’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 33: terminology_update-1215784-33.patch, failed testing.

jayelless’s picture

Status: Needs work » Needs review
Issue tags: -#SprintWeekend #drupal8NZ +SprintWeekend2013, +Drupal8NZ
StatusFileSize
new18.76 KB
new13.34 KB

Patch re-rolled against latest 8.0.x HEAD.

Status: Needs review » Needs work

The last submitted patch, 38: terminology_update-1215784-38.patch, failed testing.

jayelless’s picture

Status: Needs work » Needs review
StatusFileSize
new18.9 KB

Patch re-rolled against latest drupal-8.0.x.

jayelless’s picture

Issue tags: +beta deadline

Is this a "beta deadline" issue?

catch’s picture

Issue tags: -beta deadline +beta target, +D8 upgrade path, +minor version targt

No not really, there's one API change in the patch:

-function file_validate_image_resolution(FileInterface $file, $maximum_dimensions = 0, $minimum_dimensions = 0) {
+function file_validate_image_dimensions(FileInterface $file, $maximum_dimensions = 0, $minimum_dimensions = 0) {

That's not going to affect much, so I'd allow it during early beta. We could leave the old function as a wrapper and mark it @deprecated past that if we need to.

However it changes configuration, so it does need to be 'beta target'/'D8 upgrade path'. If it doesn't get committed before we start the upgrade path, then either:

1. We'd have to skip the bits touching configuration.

2. We'd have to write an upgrade path. Depending on what the upgrade path looks like, that could also mean the issue being delayed until 8.1.x or 9.x if it might be disruptive.

anavarre’s picture

Issue tags: -minor version targt +minor version target
linl’s picture

Status: Needs review » Needs work

Looks like this needs a reroll now that #657166: use × instead of x is in.

jayelless’s picture

Status: Needs work » Needs review
StatusFileSize
new22.69 KB

Patch has been rerolled against the latest 8.0.x HEAD.

nishruu’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Amsterdam2014

I checked the patch for D8 :
- in code every reference to "resolution" has been replaced.
- in UI, everything looks OK now.

Anonymous’s picture

Reviewed and did not find any problems

nishruu’s picture

Status: Reviewed & tested by the community » Needs work

To develop what catch said in #45, we should make the old function a wrapper containing the new function (marked as deprecated), so it will up to everybody which one they want to use. We won't break anything doing this.

Anonymous’s picture

I will create the (deprecated) wrapper function to provide this

stephaneq’s picture

Status: Needs work » Needs review
StatusFileSize
new23.2 KB
new696 bytes

Here is the patch

@leonrenkema sorry I forgot to assign the issue to myself

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community

@StephaneQ No problem, I've reviewed the patch and it is the same as I created.

mauzeh’s picture

Status: Reviewed & tested by the community » Needs review

This issue will be reviewed after the test comes back.

nishruu’s picture

Status: Needs review » Reviewed & tested by the community

The wrapper works and the old function is now indicated as deprecated. RTBC.

jayelless’s picture

Should the other API change:

- method rename (in class ImageItem):
public static function validateResolution($element, &$form_state) is renamed to "validateDimensions"

also be made into a wrapper and marked as deprecated?

My bad! This API change has disappeared in one of the recent core changes. Just ignore this comment :)

jayelless’s picture

Issue summary: View changes

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 53: 1215784-53.patch, failed testing.

Gábor Hojtsy queued 53: 1215784-53.patch for re-testing.

gábor hojtsy’s picture

Looks like a random/unrelated fail. Only one remark on the patch:

+++ b/core/modules/file/file.module
@@ -426,6 +426,13 @@ function file_validate_is_image(FileInterface $file) {
+ * @deprecated file_validate_image_dimensions()

Our docs standards at https://www.drupal.org/coding-standards/docs#deprecated suggests a one line explanation and @see to point to the one to use instead.

rpayanm queued 53: 1215784-53.patch for re-testing.

penyaskito’s picture

Assigned: jayelless » Unassigned
Status: Needs work » Needs review
StatusFileSize
new23.18 KB

Rerolled, conflicted with #2363077: Max and min resolution not working. Removed assigned field as it has been a long time without work here.

penyaskito’s picture

Fixed #61 and fixed phpdocs in file_validate_image_dimensions().

penyaskito’s picture

Found more occurrences. This should be good to go. Take into account that there are some references, but they are in migration sources so they must not be modified.

penyaskito’s picture

Oops! s/dimension/dimensions/g

The last submitted patch, 63: 1215784-dimensions-63.patch, failed testing.

The last submitted patch, 64: 1215784-dimensions-64.patch, failed testing.

The last submitted patch, 65: 1215784-dimensions-65.patch, failed testing.

ianthomas_uk’s picture

Issue summary: View changes
Status: Needs review » Needs work
  1. +++ b/core/modules/file/file.module
    @@ -399,6 +399,16 @@ function file_validate_is_image(FileInterface $file) {
     /**
    + * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.
    + *   Use file_validate_image_dimensions() instead.
    + *
    + * @see file_validate_image_dimensions()
    + */
    

    Docs standard is that the first line should be a brief explanation of the function, followed by more detailed information. I'd suggest:

    /**
    * Backwards compatibility wrapper for file_validate_image_dimensions().
    *
    * @deprecated in Drupal 8.0.0, will be removed for Drupal 9.0.0.
    *
    * @see file_validate_image_dimensions()
    */

    I've also tweaked the @deprecated line, as discussed in #2158871: [Policy, no patch] Clearly denote when @deprecated code is slated to be removed.

  2. +++ b/core/modules/file/file.module
    @@ -406,22 +416,22 @@ function file_validate_is_image(FileInterface $file) {
    - * @param $maximum_dimensions
    + * @param int $maximum_dimensions
      *   An optional string in the form WIDTHxHEIGHT e.g. '640x480' or '85x85'. If
      *   an image toolkit is installed the image will be resized down to these
      *   dimensions. A value of 0 indicates no restriction on size, so resizing
      *   will be attempted.
    - * @param $minimum_dimensions
    + * @param int $minimum_dimensions
      *   An optional string in the form WIDTHxHEIGHT. This will check that the
      *   image meets a minimum size. A value of 0 indicates no restriction.
    

    Doesn't seem necessary to add the parameter types here, but if we're going to then they should be string (see the descriptions).

  3. +++ b/core/modules/file/file.module
    @@ -406,22 +416,22 @@ function file_validate_is_image(FileInterface $file) {
    - * @return
    + * @return array
      *   An array. If the file is an image and did not meet the requirements, it
      *   will contain an error message.
    

    This should be mixed, because it might return an error string.

  4. +++ b/core/modules/file/src/Tests/ValidatorTest.php
    @@ -63,24 +63,24 @@ function testFileValidateIsImage() {
    +   *  This ensures the dimensions of a specific file is within bounds.
    

    ARE within bounds, not is.

  5. I've restored the validateResolution > validateDimensions line that @jlscott marked as deleted in the issue summary, as the patch is changing that API (as it should). As we've got a BC wrapper for the function, we should have a wrapper for the method too.
sanjusci’s picture

Issue tags: +#SprintWeekend2015
StatusFileSize
new28.07 KB
new1.37 KB

Here is my first patch, please review.

gábor hojtsy’s picture

Issue tags: -#SprintWeekend2015 +SprintWeekend2015

Fix tag. Please announce at your sprint that the right tag does not include a #.

zaporylie’s picture

Status: Needs work » Needs review

The last submitted patch, 71: 1215784-71.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 71: interdiff-1215784-66-71.patch, failed testing.

ianthomas_uk’s picture

Great to see a new contributor - thanks for your patch. Unfortunately looking at your interdiff, you've broken the backwards compatibility wrapper and undone one of the previous changes from resolution to dimensions, neither of which are changes we want. There are no other changes, and #70 has not been addressed. If you give your interdiff a .txt extension, then that will stop it being picked up by the testbot.

Any further patches should be based off #66.

The last submitted patch, 66: 1215784-dimensions-66.patch, failed testing.

Saphyel’s picture

Assigned: Unassigned » Saphyel
Saphyel’s picture

StatusFileSize
new29.86 KB

I tried to use @penyaskito patch but it doesn't apply... :(
I think I didn't forget change any image resolution...

Saphyel’s picture

Assigned: Saphyel » Unassigned
Status: Needs work » Needs review
penyaskito’s picture

Status: Needs review » Needs work

Thanks for your patch!
Unfortunately you've broken the backwards compatibility wrapper. We need to maintain that.

See this from #66:

  /**
+ * @deprecated file_validate_image_dimensions()
+ */
+function file_validate_image_resolution(FileInterface $file, $maximum_dimensions = 0, $minimum_dimensions = 0) {
+  return file_validate_image_dimensions($file, $maximum_dimensions, $minimum_dimensions);
+}
+
+/**
Saphyel’s picture

Assigned: Unassigned » Saphyel
Issue tags: +Needs reroll
Saphyel’s picture

Assigned: Saphyel » Unassigned
Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new635 bytes
new30.3 KB

Bad patch!

Saphyel’s picture

StatusFileSize
new30.31 KB
new642 bytes

test patch 2

Saphyel’s picture

StatusFileSize
new30.3 KB
new632 bytes

This is the correct second patch. I apologize for my noob uploads before...

Saphyel’s picture

Saphyel’s picture

penyaskito’s picture

Status: Needs review » Needs work

Thanks for your perseverance! See the docblock documentation at #70 for the deprecation notice and use it, please.

Saphyel’s picture

Status: Needs work » Needs review
StatusFileSize
new30.5 KB
new734 bytes

Done! and thank you for your time, I appreciate it ^^

penyaskito’s picture

+++ b/core/modules/file/src/Tests/ValidatorTest.php
@@ -63,24 +63,24 @@ function testFileValidateIsImage() {
+  function testFileValidateImageiDimensions() {

Extra i.

+++ b/core/modules/file/src/Tests/ValidatorTest.php
@@ -63,24 +63,24 @@ function testFileValidateIsImage() {
+   *  This ensures the dimensions of a specific file is within bounds.

*are* within bounds.

See extra comments at #70, I think we are missing some of those again.

Status: Needs review » Needs work

The last submitted patch, 90: 1215784-dimensions-90.patch, failed testing.

Saphyel’s picture

Assigned: Unassigned » Saphyel
Saphyel’s picture

StatusFileSize
new30.75 KB
new1.58 KB

Fixed extra "i", documentation and added backward compatibility

penyaskito’s picture

Status: Needs work » Needs review

Go, testbot!

penyaskito’s picture

Status: Needs review » Reviewed & tested by the community

I think this is ready if green.

Saphyel’s picture

Assigned: Saphyel » Unassigned
alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs change record

We need a change record for the schema changes and I think it would be good to inform everyone of the change in terminology.

penyaskito’s picture

  1. +++ b/core/modules/migrate_drupal/config/install/migrate.migration.d6_user_picture_field_instance.yml
    @@ -22,7 +22,7 @@ process:
    -  'settings/max_resolution': max_resolution
    +  'settings/max_dimensions': max_dimensions
    
    +++ b/core/modules/migrate_drupal/src/Plugin/migrate/process/d6/FieldInstanceSettings.php
    @@ -56,8 +56,8 @@ public function transform($value, MigrateExecutable $migrate_executable, Row $ro
    -        $settings['max_resolution'] = $widget_settings['max_resolution'];
    -        $settings['min_resolution'] = $widget_settings['min_resolution'];
    +        $settings['max_dimensions'] = $widget_settings['max_dimensions'];
    

    Source shouldn't have changed, these represents the D6 stored data.

  2. +++ b/core/modules/migrate_drupal/src/Tests/Table/ContentNodeFieldInstance.php
    @@ -257,7 +257,7 @@ public function load() {
    -      'widget_settings' => 'a:14:{s:15:"file_extensions";s:16:"png gif jpg jpeg";s:9:"file_path";s:0:"";s:18:"progress_indicator";s:3:"bar";s:21:"max_filesize_per_file";s:0:"";s:21:"max_filesize_per_node";s:0:"";s:14:"max_resolution";s:1:"0";s:14:"min_resolution";s:1:"0";s:3:"alt";s:8:"Test alt";s:10:"custom_alt";i:0;s:5:"title";s:10:"Test title";s:12:"custom_title";i:0;s:10:"title_type";s:9:"textfield";s:13:"default_image";N;s:17:"use_default_image";i:0;}',
    +      'widget_settings' => 'a:14:{s:15:"file_extensions";s:16:"png gif jpg jpeg";s:9:"file_path";s:0:"";s:18:"progress_indicator";s:3:"bar";s:21:"max_filesize_per_file";s:0:"";s:21:"max_filesize_per_node";s:0:"";s:14:"max_dimensions";s:1:"0";s:14:"min_dimensions";s:1:"0";s:3:"alt";s:8:"Test alt";s:10:"custom_alt";i:0;s:5:"title";s:10:"Test title";s:12:"custom_title";i:0;s:10:"title_type";s:9:"textfield";s:13:"default_image";N;s:17:"use_default_image";i:0;}',
    

    This shouldn't have changed because it's the D6 db dump.

penyaskito’s picture

Created change record draft: https://www.drupal.org/node/2423061.

Saphyel’s picture

Assigned: Unassigned » Saphyel
Saphyel’s picture

Assigned: Saphyel » Unassigned
Status: Needs work » Needs review
StatusFileSize
new28.91 KB
new3.58 KB

Status: Needs review » Needs work

The last submitted patch, 102: 1215784-dimensions-102.patch, failed testing.

Saphyel’s picture

Status: Needs work » Needs review
StatusFileSize
new27.97 KB

Fix test

webchick’s picture

OMG your avatar is AMAZING. :D Steampunk Druplicon? :)

Saphyel’s picture

StatusFileSize
new1.84 KB

I forgot interdiff :(
@webchick yes!! it's http://suntog.deviantart.com work. I fall in love when I saw it <3

Status: Needs review » Needs work

The last submitted patch, 104: 1215784-dimensions-104.patch, failed testing.

Saphyel’s picture

Status: Needs work » Needs review
StatusFileSize
new28.91 KB
new954 bytes

Hidden fail test found.

Status: Needs review » Needs work

The last submitted patch, 108: 1215784-dimensions-108.patch, failed testing.

Saphyel’s picture

Assigned: Unassigned » Saphyel
Saphyel’s picture

Assigned: Saphyel » Unassigned
Status: Needs work » Needs review
StatusFileSize
new28.49 KB
new1.09 KB

Fix source d6

Status: Needs review » Needs work

The last submitted patch, 111: 1215784-dimensions-111.patch, failed testing.

Saphyel’s picture

Status: Needs work » Needs review
StatusFileSize
new28.49 KB

I remake the patch

Shivam Agarwal’s picture

StatusFileSize
new101.22 KB

Great work of patch #113 by Saphyel. Patch worked perfectly on D8 and on PHP 5.6.3 with UI updated. Screenshot of UI after applying patch is attached with comment.

Shivam Agarwal’s picture

Status: Needs review » Reviewed & tested by the community
Shivam Agarwal’s picture

StatusFileSize
new86.87 KB
new101.22 KB

Altered comment #115 by adding two files as attachment. One image named as before_applying_patch.png is the screenshot of D8 UI before applying patch mentioned in comment #113 and another image named as after_applying_patch.png is the screenshot of D8 UI after applying patch.

alexpott’s picture

Status: Reviewed & tested by the community » Needs review

The disruption part of the beta evaluation is incorrect - existing image fields need to be updated and whilst we are not yet support head to head upgrades we should at least be honest about this. Actually I think the configuration key renames are not worth it at this point. We break existing sites for little reason. I think this issue should be postponed to 9.x.

Shivam Agarwal’s picture

#alexpott but why this is so? why it shouldn't be included in Drupal 8 version inspite that patch is working completely fine?

Patrick Storey’s picture

Issue tags: -Novice

I am removing the Novice tag from this issue because it is uncertain if this should be postponed or not.

I’m using this documentation as a source: https://www.drupal.org/core-mentoring/novice-tasks#avoid

nlisgo’s picture

@Shivam, the main issue here appears to be that the beta evaluation does not accurately reflect the disruption caused by the patch.

See: https://www.drupal.org/contribute/core/beta-changes#disruption (the last 2 points are particularly relevant)

@alexpott is challenging the value of the fix against the disruption that it will cause particularly to those currently hosting D8 beta sites.

It is our responsibility to put a case forward for the value of this patch.

xjm’s picture

Version: 8.0.x-dev » 8.2.x-dev
Component: user interface text » file.module
Issue tags: -beta target

This issue was marked as a beta target for the 8.0.x beta, but is not applicable as an 8.1.x beta target, so untagging.

This change includes some disruption, so moving to 8.2.x. It's also way more than just interface text in the current patch. One could split the UI changes from a followup for the variable and machine name changes to address this.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Trupti Bhosale’s picture

Getting error on applying the patch '1215784-dimensions-113.patch' in #113 on Drupal 8.4.x site.
This needs to be reworked.

Trupti Bhosale’s picture

Status: Needs review » Needs work

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Updating tag.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

simohell’s picture

This issue is still very much valid and came up in the last Usability meeting #3395398: Drupal Usability Meeting 2023-10-27 as we reviewed an issue on resizing image. This should be done everywhere: replace incorrect "resolution" with the correct "dimensions" especially for all user facing texts.

I wonder of this could be split to 2 issues to provide the first easier fix faster?

  1. Fix the user facing text
  2. Change the variable names and other related code

I removed some of the tags that listed old events.

lauriii’s picture

Issue tags: +Needs followup

Splitting the variable / API changes to a separate issue was recommended by @xjm in #122 so that seems like a good way to proceed here.

simohell’s picture

Status: Needs work » Needs review

I made updates to comments and user interface changing the word resolution to dimensions where relevant.
This does not change wording where referencing Drupal 6 terms (migration).
Does not update any variables and that would be a follow-up issue.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Upgrade path, -Needs change record, -Needs followup
Related issues: +#3399094: Update variable/API terminology to not use "Resolution"

Opened #3399094: Update variable/API terminology to not use "Resolution" so removing "Needs follow up" tag
Since API changes were moved to follow up removing upgrade path and change record tag. Believe the attach CR on this issue could probably be deleted.

String freeze and minor version target I don't recognize but don't think they fully apply.

Looking at MR 5227 I only see label and comment changes so seems in scope of this issue.

xjm’s picture

Assuming the MR is canonical here since the patch files are very old. Please remember to hide patch files when converting a patch to an MR. Thanks!

xjm’s picture

Title: terminology update: don't say "Resolution" when we mean "Dimensions" » Terminology update: don't say "Resolution" when we mean "Dimensions"
xjm’s picture

Saving issue credits. (That took awhile.)

xjm’s picture

Status: Reviewed & tested by the community » Needs work
  • I reviewed locally with git diff --color-words and verified that all the changes are updating code comments or UI strings where "resolution" is incorrectly used for image dimensions.
     

  • I grepped for:

    grep -ri "resolution" * | grep "//" | grep -v "vendor" | grep -v "node_modules"
    

    I verified that there were no other inline comments incorrectly referring to image dimensions as "resolution".
     

  • I grepped for:

    grep -ri "resolution" * | grep -v "vendor" | grep -v "node_modules" | grep '\*'
    

    ...to check for the same thing in docblocks. Doing so, I found the following files where the word "resolution" is used to mean "dimensions" in the docblock summaries for several test methods:

    core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileImageDimensionsConstraintValidatorTest.php
    core/modules/file/tests/src/Kernel/LegacyValidatorTest.php
    core/modules/image/tests/src/Kernel/ImageItemTest.php
    

    Renaming the parameters or test methods themselves is scoped to the followup, but the docblocks should be updated now.
     

  • I grepped for:

    grep -ri "resolution" * | grep -v "vendor" | grep -v "node_modules" | grep "\bt("
    

    ...to check for obvious translatable strings containing the word. Image resolutions are mentioned in image_help(), but in that case it's maybe correct? Please evaluate whether you think this should be changed or not:

    As an example, you might upload a high-resolution image with a 4:3 aspect ratio, and display it scaled down, square cropped, or black-and-white (or any combination of these effects).

    Do they simply mean a large image, or do they mean a high-resolution image?

NW to at least fix the three test docblocks. Thanks!

simohell’s picture

I updated the 3 tests for word "dimensions".

I had deliberately left out changing the "high-resolution" part since it makes sense if read according to for instance Adobe's definition
"High resolution images are pictures or photos where the media has higher concentrations of pixels or dots, resulting in better quality and clarity of the image – as it contains more detail."

A number of end users deal with high-resolution photographs and the help-text would make sense to them. In the past the industry used terms like "press quality", "print quality" or "web quality" and here press & print would be high-resolution and web quality low-resolution. The help text communicates that Drupal handles original high-resolution photos just fine.

simohell’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Appears feedback for the 3 dockblocks has been addressed.

  • xjm committed df6c4b70 on 11.x
    Issue #1215784 by Saphyel, jenlampton, penyaskito, jlscott, simohell,...

  • xjm committed f7a7eba4 on 10.2.x
    Issue #1215784 by Saphyel, jenlampton, penyaskito, jlscott, simohell,...
xjm’s picture

Status: Reviewed & tested by the community » Fixed

Thanks @simohell; that explanation works for me.

Committed to 11.x and 10.2.x as it includes minor-only updates to UI strings. Thanks!

xjm’s picture

I went to publish the CR, but then realized it should actually be about the API and data model changes, not the simple string changes. So I removed it from this issue and reattached it to the followup instead.

Status: Fixed » Closed (fixed)

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