Problem/Motivation
Content types have a "Diff" tab where you can select a view mode for comparision.
The setting is currently used to filter field diff plugins additionally, confusing users.
Proposed resolution
We should simply remove it.
A generalised setting for default visual inline diff view mode can be introduced in follow-up if need is confirmed.
Remaining tasks
Implement
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | interdiff-2808993-23-24.txt | 2.86 KB | johnchque |
| #24 | remove_content_type-2808993-24.patch | 4.94 KB | johnchque |
| #23 | view_mode-2808993-23.patch | 3.85 KB | ModernMantra |
| #17 | interdiff-2808993-12-17.txt | 2.48 KB | ModernMantra |
| #17 | generalised-2808993-17.patch | 3.88 KB | ModernMantra |
Comments
Comment #2
ModernMantra commentedComment #4
johnchqueI think there is a '.' between the targetentitytypeid and the targebundle.
Comment #5
ModernMantra commentedAdded dot as suggested in previous comment.
Comment #7
miro_dietikerYou're lucky creating this key without a prefix at all. Entity type id could clash with other keys.
And i guess changing this key will need a change in the schema.
And if we get it, somewhere must be code that sets it... Tests must fail without updating a setter also.
Comment #8
ModernMantra commentedHad some discussion with @berdir, unfortunately tests fails and i am not sure how to fix it. ALso made some changes regarding comment #7.
Comment #10
johnchquedon't use the getTargetEntityTypeId() here, just use the target bundle.
Comment #11
berdir#10 is wrong. That is actually the only call that is correct, all the others and the schema is wrong.
Comment #12
ModernMantra commentedComment #13
johnchqueDon't change the indentation here please. :)
We might need an update function for this config change.
Comment #14
berdirtarget bundle and content type is the same thing. The first level is the *entity type*.
And yeah, we need to update the existing configuration. Another question is that we now change the structure to theoretically support other entity types. But we actually don't do that yet. Not sure if we should do that her or in another issue. another issue might be better as that won't be trivial (likely needs its own form that lists all relevant entity types and their bundles, similar to share message/like_and_dislike) as we can't reliably alter any bundle form out there.
Comment #15
miro_dietikerHm, this might sound strange, but...
What is this setting used for?
I can't see any effect.
The view mode can be selected when comparing with visual diff plugin.
And with the fields, we have field plugins.
I see that the dropdown on admin/structure/types/manage/TYPE offers all view modes while we limit view modes in our selection to the used ones and remove some technical ones.
So really no idea...
Comment #16
johnchqueSeems to be to have in diff a list of the view modes set for nodes. We can remove it as far as I can see. But this will make changes in getSelectedPluginForFieldDefinition, needs to be investigated.
Comment #17
ModernMantra commentedHad some discussion with @berdir, he suggested to create update config function and to create follow up (in revision section it should be loaded from settings view mode, as i understood :) ). Some small fies in patch and create update config function...
Comment #18
miro_dietikerNot sure about this all.
We should discuss and decide in the related issue #2810039: Diff for 'Sticky at top of lists' does not work
I want to test drive the system behavior if we drop all those view mode settings.
Comment #19
berdirEven if we do remove the check that we have now, using this setting for the default view view mode in the visual diff might be useful as some entity/node types are really only used certain view modes. Not strong feelings, though.
Comment #20
miro_dietikerYeah i was also thinking about this. But we only have a node UI now.
Where would you put the diff view mode settings for the entity types + bundles?
Comment #21
miro_dietikerOK then, we need to rescope this issue...
There are 3 remaining pieces to do:
- Generalise the setting for entity + bundle
-- Offering a UI for other entity types
- No more considering the view mode for field plugin determination
- Use the setting for default visual inline view mode selection: #2811815: use per-bundle view mode as default for visual inline view mode selection
Not sure if we should do all at the same in one issue or how to split.
Comment #22
miro_dietikerQuickly discussed and simplified the situation:
We will remove the setting in a first issue. A quick solution that is satisfyying and removes complexity.
Then we can cleanly add the thing in a feature issue (currently low priority) when it is really needed.
Comment #23
ModernMantra commentedRemoved view mode filed, created update config function and fixed some tests. Let see the test bot...
Comment #24
johnchqueRemoved the whole setting. Now using the default form display. :)
Comment #26
miro_dietikerCommitted, awesome! :-)