I mean hidden fields in the type>manage display should not appear in the diffs

Cheers,
Nabil Kadimi

Comments

kadimi’s picture

Title: Honnor display settings » Honor display settings
Taxoman’s picture

Title: Honor display settings » Honour the display settings
Category: bug » feature

Hm, I'd say that this should be a configurable setting, showing all fields by default (as is the current behaviour), as long as the user has permissions to see them according to the role memberships. I agree that this option is desirable on some sites, though.

Taxoman’s picture

Title: Honour the display settings » Optional setting to honour the display settings
alan d.’s picture

Any thoughts on the implementation of this? I'm going to look at this for the field formatters if I get time.

I think that the cleanest and most configurable way would be to add field instance settings, but would like to know your thoughts before attempting this myself.

i.e. A fieldset with:

> --- Diff -----------------
[ ] Exclude from diff comparisons
....
For the text fields
Select components to compare:
[ ] Summary (if applicable)
[ ] Content
[ ] Text format (if applicable)

Select rendering options for the text
(*) Raw HTML
( ) Raw text
( ) Rendered HTML (if applicable)
( ) Rendered text (if applicable)

Taxoman’s picture

My initial thought was a customizeable setting tick mark for "[Tick] Enforce display of all fields regardless of their display settings (hidden/visible on node view)".
A tick mark should default to "on/enabled", as is the situation now, and then users could choose to remove it to get the effect that kadimi is suggesting in the initial post here.

I am not sure if we are talking about the same thing here, but perhaps I just dont understand the example in #4.

alan d.’s picture

OK, to paraphrase.

kadimi was referring to the view modes (i.e. admin/structure/types/manage/page/display)

I think that you may be referring to a global level diff configuration or maybe content type configuration?

I'm referring to a field instance setting (admin/structure/types/manage/page/fields/body)

Trying to summarize the options (in 10min without much thought):

Method Implementation Cons Pros
custom view mode Define new view mode, enabled by default. Generate a formatted field to compare against.
Or ignore the formatter settings and just use the visible / hidden values saved.
No generic raw formatters
Since raw values are required, improper use of the view mode would be a security concern
Easy
Generic (decoupled from specific entities)
Use default (full) view mode Use the default view mode to decide how to handle the display Couples the diff display with default display. Complex sites rarely show all fields and this would ignore those fields set to hidden As above, zero new code for settings
Global Custom menu callback and handling of fields & entities.
Best to restrict at least per entity type.
More code
Implementation is coupled to the module
No fine grain settings per instance
Singular edit page - both a pro and con
Per bundle Form alter the content type edit page As above, but far less code Easy
Config encapsulated per type
Per Instance Implementing the field hooks to append the new settings More complex Minimal code
Generic (decoupled from specific entities)
Per Field As above As above As above

I'm going to try and look at finishing off the diff support for all core types tonight, and this is a fundamental decision on how to handle these. (Though it doesn't really hold anything other than testing up)

alan d.’s picture

Actually #1 appears to be a good option, notes in #1347316: Selectable view mode for inline diffs and "Current revision" display view mode.

Some time this weekend I'll clone diff into a sandbox project with the working prototype.

alan d.’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
Status: Active » Fixed

This should be resolved with the new branch, 7.x-3.0-alpha1 or 7.x-3.0-dev.

This is still alpha, so test carefully before use on a production site and report any issues back to the queues.

Status: Fixed » Closed (fixed)

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