Problem/Motivation
The Content Moderation module adds \Drupal\content_moderation\Plugin\Menu\EditTab which changes the "Edit" tab to "New draft" or "Edit draft" depending on the state of the entity. The problem is that "New draft" assumes you are editing the entity in order to create a new draft. You might be archiving it or doing a quick fix on a published piece of content.
Proposed resolution
Remove the plugin and leave the tab as "Edit" because that is what the user is doing. What state the edit will be is a later concern. I.e. the moment you press save - or select the state prior to saving.
Remaining tasks
User interface changes
Remove plugin from content moderation.
API changes
None, a plugin is not an API.
Data model changes
None
Comment | File | Size | Author |
---|---|---|---|
#3 | 2866656-3.patch | 8.07 KB | alexpott |
Comments
Comment #2
alexpottThis issue struck me most whilst testing #2753717: Add select field to choose moderation state on entity forms
Comment #3
alexpottComment #4
yoroy CreditAttribution: yoroy at Roy Scholten commentedWe discussed this a bit in IRC: I noticed the same, mentally stumbling over the "Edit draft" label. I think it's ok to just keep this "Edit" at all times. Edit is what you come to do. Deciding on what state to save those changes to is a later concern.
Comment #5
timmillwoodAs long as testbot agrees I'm fine with this.
Comment #8
Gábor HojtsyWe ran into the same problem on the UX meeting where the new draft screen allowed to delete content (and not just the draft but the whole content). So this was indeed a mistake and should be removed. Thanks all!