Problem/Motivation

The node comparison currently hides any fields that are not visible in NodeRevisionController::compareNodeRevisions(). Certain use-cases may prefer to compare even hidden fields that have changed.

Proposed resolution

Make this behavior configurable.

Remaining tasks

Review patch, discuss.

User interface changes

API changes

Data model changes

Config schema addition to diff.settings.

Comments

jhedstrom created an issue. See original summary.

jhedstrom’s picture

Status: Active » Needs review
StatusFileSize
new3.25 KB
lhangea’s picture

StatusFileSize
new4.38 KB

I agree, this can be useful in certain situations. I have also added a check-box for that setting in the diff settings page.
This can also be ported in the issue with the generic entity comparison controller.

mikemiles86’s picture

HezzieB’s picture

The description of the test case here needs more details before it can be adequately reviewed.

phenaproxima’s picture

This looks pretty good to me, but it would benefit from tests.

juampynr’s picture

StatusFileSize
new71.43 KB
new74.34 KB
new31.84 KB
new3.33 KB

I think that this patch blocks part of the functionality of the module and may confuse site builders. Here is why:

1. The site builder opens the General Settings page and disables the option "Only compare visible fields":

Disable 'Only compare visible fields'

2. Then, when viewing the Article content type settings, this field, which now is useless, is still there:

View mode field at Content type settings

The site builder could get confused because the action in step 1 should hide the option in step 2. However, I see that the point of using view modes for Diff module is there to let site builders to decide which view mode and which fields they want to show. They can do this at Manage Display.

Based on the above findings, I created a patch that makes the field name at the content type settings more meaningful (see the following screenshot) and adds testing coverage for field visibility when using the Diff view mode.

Improve view mode field wording

Status: Needs review » Needs work

The last submitted patch, 7: make_the_visible-2635852-7.patch, failed testing.

juampynr’s picture

Status: Needs work » Needs review

The test fails because there is a missing schema. A fix for this has been added to the patch at #2424233: Add more tests for configurable functionality.

juampynr’s picture

StatusFileSize
new3.33 KB

Re-testing. Tests should pass now.

  • juampynr committed 68a7bad on 8.x-1.x
    Issue #2635852 by juampynr, jhedstrom, lhangea: Make the 'visible fields...
juampynr’s picture

Status: Needs review » Fixed

Tests pass now. Committing.

Status: Fixed » Closed (fixed)

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