Problem/Motivation
The Diff module can display differences in the rendered display of an entity, and/or the differences in individual fields on the split/unified fields layouts (as configured at /admin/config/content/diff/fields
).
The only current diff option for weight fields is "Don't compare" because there's no diff builder plugin that supports weight fields. Since it's often likely that weight fields would not appear in the rendered entity display, there's no easy way to know when/how a weight field has changed.
Steps to reproduce
Visit /admin/config/content/diff/fields
and note that the only option for weight fields is "Don't compare."
Proposed resolution
Diff's CoreFieldBuilder
plugin already supports integers, so it should work well for weight fields. Implement hook_field_diff_builder_info_alter()
to add the weight
field type id to core_field_diff_builder
's field_types
.
Comment | File | Size | Author |
---|---|---|---|
#7 | Selection_144.png | 10.09 KB | sumit-k |
Issue fork weight-3356615
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 #2
justcaldwellComment #4
justcaldwellComment #5
justcaldwellComment #6
justcaldwellComment #7
sumit-k CreditAttribution: sumit-k as a volunteer and at Material for Drupal India Association commentedThe raised merge request is functioning smoothly. It successfully introduces the 'core field diff' option for the weight field. To provide visual clarity, I have attached a screenshot for your reference.