#309 | save-button.png | 21.87 KB | fdverwoerd |
#299 | publishing_status.png | 8.05 KB | gillesv |
#296 | 2017-09-06-151835_7680x2160_scrot.png | 17.21 KB | pfrenssen |
#295 | 2068063-295.patch | 64.76 KB | flocondetoile |
|
#293 | 2068063_292.patch | 109.3 KB | kbasarab |
|
#291 | 2068063_291.patch | 66.34 KB | slashrsm |
|
#285 | 2068063-285.patch | 64.49 KB | Manuel Garcia |
|
#285 | interdiff.txt | 571 bytes | Manuel Garcia |
#285 | node-add-smallscreen-285.png | 16.86 KB | Manuel Garcia |
#285 | node-add-widescreen-285.png | 26.59 KB | Manuel Garcia |
#284 | node-add-smallscreen.png | 14.06 KB | Manuel Garcia |
#284 | node-add-widescreen.png | 16.88 KB | Manuel Garcia |
#284 | 2068063-284.patch | 64.47 KB | Manuel Garcia |
|
#284 | interdiff.txt | 544 bytes | Manuel Garcia |
#283 | spacing-on-small-screens.png | 90.56 KB | yoroy |
#279 | 2068063-279.patch | 64.35 KB | Manuel Garcia |
|
#279 | interdiff.txt | 6.62 KB | Manuel Garcia |
#275 | 2068063-275.patch | 70.97 KB | Manuel Garcia |
|
#275 | interdiff.txt | 1.65 KB | Manuel Garcia |
#274 | 2068063-274.patch | 70.44 KB | Manuel Garcia |
|
#273 | 2068063-273.patch | 70.31 KB | Manuel Garcia |
|
#273 | interdiff.txt | 7.27 KB | Manuel Garcia |
#269 | 2068063-269.patch | 63.23 KB | jonathan1055 |
|
#265 | 2068063-bartik-mobile.png | 66.18 KB | vijaycs85 |
#265 | 2068063-bartik-desktop.png | 91.96 KB | vijaycs85 |
#265 | 2068063-iphone6.png | 44.8 KB | vijaycs85 |
#265 | 2068063-default.png | 63.92 KB | vijaycs85 |
#265 | 2068063-update-start.png | 52.37 KB | vijaycs85 |
#265 | 2068063-update-in-progress.png | 41.3 KB | vijaycs85 |
#264 | after-bartik.png | 18.15 KB | Manuel Garcia |
#264 | before-bartik.png | 16.79 KB | Manuel Garcia |
#264 | interdiff.txt | 1.01 KB | Manuel Garcia |
#264 | 2068063-264.patch | 63.59 KB | Manuel Garcia |
|
#263 | 2068063-263.patch | 62.99 KB | Manuel Garcia |
|
#260 | stark.png | 3.13 KB | timmillwood |
#260 | bartik.png | 3.97 KB | timmillwood |
#260 | seven.png | 5.38 KB | timmillwood |
#251 | 2068063-251.patch | 63.24 KB | Berdir |
|
#247 | 2068063-247.patch | 63.15 KB | timmillwood |
|
#247 | interdiff-2068063-247.txt | 1.17 KB | timmillwood |
#246 | published-tickbox-with-workflow.png | 9.58 KB | ifrik |
#241 | after-article.png | 27.32 KB | Manuel Garcia |
#240 | after.png | 10.46 KB | Manuel Garcia |
#240 | before-article.png | 27.59 KB | Manuel Garcia |
#240 | after.png | 10.46 KB | Manuel Garcia |
#240 | before.png | 10.84 KB | Manuel Garcia |
#239 | interdiff.txt | 1.47 KB | lauriii |
#239 | change_save_and_keep-2068063-239.patch | 63.12 KB | lauriii |
|
#238 | 2068063238.patch | 62.71 KB | timmillwood |
|
#238 | interdiff-2068063-238.txt | 3.84 KB | timmillwood |
#237 | Screenshot from 2017-04-25 11-28-17.png | 19.34 KB | lauriii |
#235 | published-tickbox-with-translation.png | 7.46 KB | ifrik |
#234 | 2068063-234.patch | 63.29 KB | timmillwood |
|
#234 | interdiff-2068063-234.txt | 566 bytes | timmillwood |
#230 | 2068063-230-after.png | 21.9 KB | amit.drupal |
#230 | 2068063-230-before.png | 28.99 KB | amit.drupal |
#228 | 2068063-228.png | 24.35 KB | amit.drupal |
#227 | after.png | 22.86 KB | Manuel Garcia |
#227 | before.png | 23.06 KB | Manuel Garcia |
#225 | 2068063-225.patch | 63.04 KB | timmillwood |
|
#225 | interdiff-2068063-225.txt | 1.39 KB | timmillwood |
#206 | 2068063-205.patch | 62.9 KB | timmillwood |
|
#206 | interdiff-2068063.txt | 2.38 KB | timmillwood |
#198 | publish-buttons-options.png | 33.31 KB | yoroy |
#198 | silverstripe-publish-buttons.jpg | 20.26 KB | yoroy |
#189 | 2068063-189.patch | 62.28 KB | timmillwood |
|
#189 | interdiff-2068063-189.txt | 2.13 KB | timmillwood |
#189 | Screenshot from 2017-03-15 14-08-38.png | 20.72 KB | timmillwood |
#186 | Screenshot from 2017-03-15 12-02-48.png | 22.5 KB | timmillwood |
#186 | 2068063-186.patch | 62.03 KB | timmillwood |
|
#186 | interdiff-2068063-186.patch | 1.13 KB | timmillwood |
|
#185 | interdiff184_185.txt | 2.6 KB | Munavijayalakshmi |
#185 | 2068063-185.patch | 61.99 KB | Munavijayalakshmi |
|
#184 | 2068063-184-interdiff.txt | 1.9 KB | Berdir |
#184 | 2068063-184.patch | 62.02 KB | Berdir |
|
#182 | 2068063-182.patch | 61.33 KB | timmillwood |
|
#182 | interdiff-2068063-182.txt | 1.99 KB | timmillwood |
#180 | 2068063-180.patch | 61.5 KB | Berdir |
|
#167 | seven-with-content-moderation.png | 79.04 KB | timmillwood |
#167 | seven.png | 48.58 KB | timmillwood |
#167 | bartik-unpublished.png | 28.15 KB | timmillwood |
#167 | bartik-published.png | 27.96 KB | timmillwood |
#167 | 2068063-167.patch | 63.76 KB | timmillwood |
|
#167 | interdiff.txt | 2.93 KB | timmillwood |
#164 | 2068063-164-interdiff.txt | 4.91 KB | Berdir |
#164 | 2068063-164.patch | 61.74 KB | Berdir |
|
#161 | save-publish-button.png | 27.78 KB | yoroy |
#154 | AfterPatch_Edit_Node.PNG | 9.42 KB | Truptti |
#154 | AfterPatch_New_Node.PNG | 9.18 KB | Truptti |
#152 | 2068063-151.patch | 57.38 KB | Berdir |
|
#151 | 2068063-151.patch | 353.18 KB | Berdir |
|
#145 | interdiff-142-145.txt | 575 bytes | jofitz |
#145 | 2068063-145.patch | 57.09 KB | jofitz |
|
#143 | Selection_116.png | 14.62 KB | Berdir |
#143 | Selection_115.png | 19.86 KB | Berdir |
#142 | 2068063-142-interdiff.txt | 1.45 KB | Berdir |
#142 | 2068063-142.patch | 57.1 KB | Berdir |
|
#140 | 2068063-140.patch | 56.57 KB | Berdir |
|
#135 | 2068063-135.patch | 56.5 KB | timmillwood |
|
#135 | interdiff.txt | 2 KB | timmillwood |
#132 | 2068063-132.patch | 55.16 KB | timmillwood |
|
#132 | interdiff.txt | 1.16 KB | timmillwood |
#130 | change_save_and_keep-2068063-130-interdiff.txt | 7.4 KB | Berdir |
#130 | change_save_and_keep-2068063-130.patch | 56.03 KB | Berdir |
|
#128 | change_save_and_keep-2068063-128.patch | 50.09 KB | chr.fritsch |
|
#124 | change_save_and_keep-2068063-124-8.2.patch | 50.45 KB | Berdir |
|
#123 | change_save_and_keep-2068063-123.patch | 50.24 KB | Berdir |
|
#119 | change_save_and_keep-2068063-119.patch | 50.36 KB | johnchque |
|
#117 | change_save_and_keep-2068063-117.patch | 50.33 KB | johnchque |
|
#115 | Screenshot from 2016-10-11 10-34-52.png | 26.73 KB | johnchque |
#115 | change_save_and_keep-2068063-115.patch | 46.9 KB | johnchque |
|
#94 | save-published.png | 18 KB | yoroy |
#82 | node-save-published-2068063-82.patch | 47.16 KB | tduong |
|
#82 | interdiff-2068063-80-82.txt | 226 bytes | tduong |
#80 | node-save-published-2068063-80.patch | 47.16 KB | tduong |
|
#80 | interdiff-2068063-78-80.txt | 486 bytes | tduong |
#78 | node-save-published-2068063-78.patch | 47.11 KB | tduong |
|
#78 | interdiff-2068063-76-78.txt | 949 bytes | tduong |
#76 | node-save-published-2068063-76.patch | 47.19 KB | tduong |
|
#76 | interdiff-2068063-74-76.txt | 1.75 KB | tduong |
#74 | interdiff-2068063-71-74.txt | 1.07 KB | tduong |
#74 | node-save-published-2068063-74.patch | 46.04 KB | tduong |
|
#71 | node-save-published-2068063-71.patch | 44.89 KB | tduong |
|
#71 | interdiff-2068063-69-71.txt | 3.7 KB | tduong |
#69 | node-save-published-2068063-69.patch | 45.05 KB | tduong |
|
#69 | interdiff-2068063-67-69.txt | 22.63 KB | tduong |
#67 | node-save-published-2068063-67.patch | 47.14 KB | tduong |
|
#67 | interdiff-2068063-64-67.txt | 15.96 KB | tduong |
#64 | node-save-published-2068063-64.patch | 44.31 KB | tduong |
|
#64 | interdiff-2068063-62-64.txt | 7.11 KB | tduong |
#62 | node-save-published-2068063-62.patch | 41.06 KB | tduong |
|
#62 | interdiff-2068063-58-62.txt | 33.88 KB | tduong |
#58 | node-save-published-2068063-58.patch | 4.24 KB | Berdir |
|
#58 | node_save_published.png | 17.27 KB | Berdir |
#45 | new_save_pattern.png | 167.35 KB | tkoleary |
#44 | new_save_pattern.png | 167.95 KB | tkoleary |
#35 | node_edit_draft.png | 39.12 KB | esod |
#35 | node_edit.png | 37.06 KB | esod |
#35 | node_add.png | 41.42 KB | esod |
#24 | change_save_and_keep-2068063-24.patch | 20.44 KB | nlisgo |
|
#24 | interdiff-2068063-19-24.txt | 805 bytes | nlisgo |
#11 | change-save-and-keep-published-to-update-2068063-11.patch | 20.37 KB | esod |
|
#11 | before.node_add.png | 42.91 KB | esod |
#11 | before.node_edit.png | 46.46 KB | esod |
#11 | after.node_add.png | 41.66 KB | esod |
#11 | after.node_edit.png | 40.98 KB | esod |
#11 | before.node_edit_draft.png | 42.13 KB | esod |
#11 | after.node_edit_draft.png | 39.4 KB | esod |
#13 | change-save-and-keep-published-to-update-2068063-13.patch | 2.55 KB | esod |
|
#19 | interdiff-2068063-11-19.txt | 3.14 KB | nlisgo |
#19 | change_save_and_keep-2068063-19.patch | 20.65 KB | nlisgo |
|
#26 | interdiff-2068063-24-26.txt | 6.1 KB | nlisgo |
#26 | change_save_and_keep-2068063-26.patch | 20.48 KB | nlisgo |
|
Comments
Comment #1
dawehnerDoes that mean that we have either:
and in the case of unpublished
There seems to be no context anymore that a post is published or unpublished.
Comment #2
tkoleary CreditAttribution: tkoleary commentedThat's a good point. We need to deal with drafts as well. The common practice is this:
and in the case of unpublished
We have shied away from using "draft" I think because of worries about confusion with workflow, however I think that's the tail wagging the dog. Draft is the common nomenclature for a post that is not published.
The other issue with this is that we are overloading the submit with when we have "save as unpublished" which both saves and unpublishes the node. Unpublish is available in the content list which I suspect is where users commonly use it. Removing unpublish from the submit makes "save as draft" what most users expect "Save a revision that I can work on without unpublishing the current published version". This is possible in core now and I'm not sure why we're not using it.
Comment #3
tkoleary CreditAttribution: tkoleary commentedJust noticed that we now have "save and keep unpublished". Oh my god.
How many verbal knots are we going to tie ourselves in before we realize that this is wrong?
Comment #4
tkoleary CreditAttribution: tkoleary commentedComment #5
Bojhan CreditAttribution: Bojhan commentedWe fix this in dev. Its indeed a bit weird, what we are doing with that. A patch for this should be easy.
Comment #6
tkoleary CreditAttribution: tkoleary commented@bojhan
What's your preferred nomenclature?
Comment #7
Bojhan CreditAttribution: Bojhan commented@tkoleary I would favour the terminology that you use.
Comment #8
tkoleary CreditAttribution: tkoleary commented@Bojhan
Cool, so just to update since #2 did not encompass the whole interaction it would be:
New node:
Save and publish | Save draft
On saving draft the DSM could say "Draft has been saved. [Content title] is no longer published. Click "save and publish" to make this draft live.
Draft (unpublished)
Update draft | Save and publish
On updating draft the DSM could say "Draft has been updated. Click "save and publish" to make this draft live.
Published node
Update | Save draft
On updating draft the DSM could say "[content title] has been updated. Click "save draft" to unpublish while editing"
The only changes here from #2 are that this covers the new node, which does not follow "update" since it has never been saved, and that I changed "save as draft" to "Save draft" since commonly "save as" operations imply a copy has been created which is not the case here.
Comment #9
Bojhan CreditAttribution: Bojhan commentedGood point about the "save as". It probably makes sense to split of the DSM changes, although connected I imagine it needs a bit more thinking than the labels because we don't do that now.
Patches please!
Comment #10
tkoleary CreditAttribution: tkoleary commented@dawehner
Since Bojhan and I are both non-coding designers would you mind rolling a patch of this? :)
Comment #11
esod CreditAttribution: esod commentedThese show up in quite a few tests. Let's see what happens during testing.
The DSMs for Draft messages are probably be a bit more involving. The isNew() function helps to create a distinction between the "... has been created." message and "... has been updated." message. I don't see an isDraft() function which would make it easy to set conditions for the "... has been updated." message. I'll keep looking.
BEFORE node_add.png
AFTER node_add.png
BEFORE node_edit.png
AFTER node_edit.png
BEFORE node_edit_draft.png
AFTER node_edit_draft.png
Comment #13
esod CreditAttribution: esod commentedWell, maybe I'm not supposed to change the test scripts. Let's try the patch with just the changes on NodeForm.php.
Comment #15
Bojhan CreditAttribution: Bojhan commentedI am just wondering - doesn't "save as draft" actually more accurately describe it. Because you are actually having two different "versions" of the same thing here. The "live" one and the "future revision" one. It is special to the other ones, were you just have the one version.
@tkoleary what do you think?
Comment #16
yoroy CreditAttribution: yoroy commentedNice labelling improvements me thinks. I do wonder about this one though (I think this is what bojhan means as well):
AFTER node_edit.png
Wouldn't it have to be Save *as* in this case because we're indeed splitting off a draft version from an existing, published node?
Comment #17
esod CreditAttribution: esod commentedSure. We can change that one or any other other one that @tkoleary likes.
I'd like to know why my patch fails testing. It works on my local and it works on SimplyTest.me.
Comment #18
nlisgo CreditAttribution: nlisgo commented@esod, let me take a look.
Comment #19
nlisgo CreditAttribution: nlisgo commentedWell I'm of no use. I seem to be getting the error when testing FileFieldDisplayTest locally on 8.0.x HEAD locally!!
Is it possible that a bug has crept into core and this in unrelated?
I am going to upload a new patch because I think you mixed up some of the changes in text.
See attached interdiff.
Comment #20
nlisgo CreditAttribution: nlisgo commentedComment #22
yoroy CreditAttribution: yoroy commentedGetting closer though, only 3 test fails left!
Comment #23
esod CreditAttribution: esod commentedThanks @nlisgo for your help. Will you describe in detail what you are doing when you say "I seem to be getting the error when testing FileFieldDisplayTest locally on 8.0.x HEAD locally!!"
I'm following the instructions from https://www.drupal.org/node/2116263, but I'd like to know more about the tests so I can get more patches to pass.
Comment #24
nlisgo CreditAttribution: nlisgo commentedHere's another attempt
Bingo!
Comment #25
nlisgo CreditAttribution: nlisgo commented@esod, I'll look into the issues I was having with the tests and perhaps contact you directly if I have a breakthrough. But my problems are definitely unrelated to this one.
Comment #26
nlisgo CreditAttribution: nlisgo commentedIncorporated the feedback from #15 and #16 changing 'Save draft' to 'Save as draft'.
Comment #27
esod CreditAttribution: esod commentedSweet. I'll have a look at your passed patch and the interdiff. I'm sure that will help me too.
Comment #28
esod CreditAttribution: esod commentedNow that we've resolved the issue with the text in the button(s), how do you think we could customize the draft messages per @tkoleary's suggestions in #8? There's only $insert and isNew() to work with at the moment.
Comment #29
BerdirNo we don't. We unpublish the node and save that.
Which I think means this pretty misleading, Save as Draft or Save Draft not making a big difference. "Save and unpublish" is exactly what it does..
Comment #30
Bojhan CreditAttribution: Bojhan commented@Berdir That is a huge WTF, why the hell do we do that?
Comment #31
esod CreditAttribution: esod commentedIt's always worked this way. In D7 when you un-publish a node and Create a new revision, the node's status column in the database is changed to 0 and the vid column (revision column) is given to a new integer.
In D8, the data structure has changed somewhat so that when you un-publish a node and Create a new revision, the node's vid column is given a new integer and the node_field_revision's table status column is changed to 0.
Either way the action is the same. A revision doesn't make a new node, it changes things for the existing node.
So, Save and unpublish is the literal action, but it is suggested that Save and unpublish (and its variants) will be confusing to the end user. If the end user knows or will intuit that Save Draft/Update Draft will apply to unpublished nodes, the changes we want to implement will be fine.
Comment #32
BerdirYes, I'm not saying it is great the way it is, and there have been issues for a long time that wanted to change it, but that is how it works now.
This is an interesting paragraph :)
1. The issue summary only mentions the "Save and keep published" button as confusing, only later on the other labels have been discussed as well. So there doesn't seem to be any data to back those?
2. "If the end user knows X and Y, then Z will be clear". Isn't UX exactly about avoiding that you have to know things to be able to understand the UI?
I did a quick search, and there doesn't seem to be any relevent usage of "draft" in core, so this is introducing new words that aren't used in help/documentation yet.
Not sure, but maybe this issue should be limited to the "Save and keep published", where I think "Update" is a valid replacement.
There are also technical underlying problems, that are not changed by this issue but is still relevant. Because there are various different buttons based on the current state of a node, it is very hard for a contrib module to alter them. There is an old issue open about this.
Comment #33
zaporylieI've successfully applied patch #26 and really like how it keeps submit button simple and clear. I want to have it in 8.0.x, so RTBC+1
Comment #34
BerdirBased on the recent dicussions, I don't think this is RTBC?
Comment #35
esod CreditAttribution: esod commentedAlthough there is no use of the word draft in core up until now, I vote to start using it at this time, for this case. Every other combination I try ends up leading me to difficult phrases like Save and keep published/Save and keep unpublished. Those phrases are too wordy and I expect users will be frustrated by those phrases' seeming lack of clarity.
Of note is something in comment #2
If "Draft is the common nomenclature for a post that is not published", I think we're good with the current changes. All software, even great software, relies on the user to "know" something about the software in order to use it. So is it unrealistic to expect the user to know drafts are unpublished or is it not? I say it is not.
Anyway, here are current screenshots of the proposed changes for the sake of the discussion.
node_add
node_edit
node-edit_draft
Comment #36
nlisgo CreditAttribution: nlisgo commented@esod the latest patch should have changed 'Save draft' to 'Save as 'draft'
Comment #37
tkoleary CreditAttribution: tkoleary commented@berdir @esod
It is not reasonable for the entire burden of comprehension to be placed on the button text alone which is why I introduced reference to the DSM back in #8.
That DSM language in that coupled with the new "draft" nomenclature resolves the issue and this should be the experience of the user:
or
We should *not* use "save as draft" because, as Berdir noted, we are saving the changes to the node, not to a new version of the node and "save as" is universally understood as "keep the version from where I began editing but save the changes I just made to a new version" which is not what we do.
To the comment that "draft" is not a word we currently use, we should employ off-the-island thinking here. "Draft" is a ubiquitous and well defined term fully loaded with borrowed connotations we can rely on to guide users unfamiliar with Drupal. Once it is in core it also nudges contrib workflow solutions towards using "revision" in their nomenclature, which is what we want.
Comment #38
BerdirI'm not against using "draft", that's fine with me. And it seems great when creating new content ("Save and publish" vs. "Save draft").
Unfortunately, not even that is true. [x] Create new revision is essentially "Save as", it keeps the old values around as an old revision, but the active revision of the node will be unpublished and the node will no longer be accessible for normal users.
The API supports this concept with isDefaultRevision() ( new in 8.x, this will save but not make the new values the active revision), but we don't use that in the UI/Forms, because starting so is going to open a whole bunch of new issues. For example, I really don't know what will happen if you then edit the node again. It will probably edit the active revision again and you will have no way to edit your latest revision... and so on ;)
We have "Save and publish", so why not use "... and unpublish"?
Would then look like this:
New: Save and publish (default), Save draft
Update published: Update (default), Update and unpublish
Update unpublished: Update draft (default), Update and publish
Then everything that *changes* the publication state is very clear and short enough IMHO and we use can draft to shorten some of the currently too long labels.
Comment #39
esod CreditAttribution: esod commentedWe definitely need to change the DSM for updates. It is difficult to change the DSM for updates because currently the save() method in class NodeForm has the ability to print only one possible message for an updated node. See the relevant line of code in core/modules/node/src/NodeForm.php, line 421.
Making a "new version" is not the same as "Create new revision". New revisions don't change a node's publish status. I can see publishers wanting to work on a new version while keeping the old version published. If I'm not mistaken, that's what new nodes are for.
Comment #40
tkoleary CreditAttribution: tkoleary commented@Berdir
That still looks a bit complex to me and I'm beginning to question the value of "update" if we use "draft". The reason for suggesting update was to remove the clumsy "save and keep published" but I think save is sufficient in both cases if the other option is "save draft".
There is no difference when you save and publish a new node or when you save/update/save and keep published a published node. Presumably the language was introduced to remind the user that the node is live and will be immediately public on save, but that information is also already printed elsewhere in the UI and there is no evidence to show that users would not just know this.
Given the subtleties of this, I made paper prototypes of three different versions of this flow and hallway tested them on five users with knowledge of Drupal ranging from virtually none to advanced.
When changed to the following and tested on a new set of users the following language produced less confusion:
New node:
Publish
Save draft
Published node:
Publish
Save & unpublish
Draft (unpublished) node
Publish
Save draft
BUT, all users still found "save and unpublish" strange and asked why "unpublish" could not be a separate action from save. I am inclined to agree with that and I wonder if we should consider going to a button and toggle model eg.
New node:
[toggle] Published |unpublished
[button] Save
Published node:
[toggle] Published | unpublished
[button] Save
Unpublished node:
[toggle] Published | unpublished
[button] Save
Seems simpler
Comment #41
BerdirToggle/checkbox seems simple to me too, and it would solve #1901216: Modules cannot reliably enhance or alter the node form anymore along the way (that is the issue I mentioned above), as it would mean that we only have a single button that a module needs to alter.
Comment #42
BerdirIt is kind of funny, as it would essentially be the same as 7.x again, the published checkbox would just be more visible.
Comment #43
tkoleary CreditAttribution: tkoleary commented@Berdir Yes, it's ironic.:)
I think the lesson is that consistency is better especially in instances like this where the pattern is perhaps the most commonly used interaction in Drupal and many many users have established expectations for how it will behave.
I think if we land here it is definitely an improvement over 7 and also puts us in a place that is simpler and less ambiguous than wordpress, joomla, Adobe or Sitecore, all of which have more complicated patterns.
Comment #44
tkoleary CreditAttribution: tkoleary commentedIt could look like this. I prefer state to action and radios to checks here because it works better in all states of the node.
Status could possibly also be "Change status"
I also added cancel because it's the more common pattern, though perhaps that warrants another issue.
Comment #45
tkoleary CreditAttribution: tkoleary commentedComment #48
disasm CreditAttribution: disasm at AppliedTrust commentedLets get the issue summary updated with before/after screenshots of the proposed layout.
Comment #49
brandonpost CreditAttribution: brandonpost as a volunteer commentedI'm at the sprint at DrupalCon LA, and I will start working on a patch to implement the changes proposed by @tkoleary in #44 & #45. In #44, he asks whether adding a 'Cancel' button should be part of the scope for this issue. Does anyone have thoughts about this?
Comment #50
Berdir+1 to the changes suggested there.
I don't think that cancel belongs here, at least not in a first iteration.
Note: With that, we might actually be able to use a widget again for the status. To get started with that, add a similar setDisplayOptions() call to the status field as the promote/sticky fields already have. The difference is that you want to use options_buttons instead of boolean_checkbox, although we probably need to work a bit on the labels. To get those, you need to set the on_label and off_label settings.
Edit: In Node::baseFieldDefinitions()
I'm in IRC if you have questions.
Comment #51
janaabiakar CreditAttribution: janaabiakar commentedHi @Brandonpost, I am at the DrupalCon LA also, I am a UX/UI designer. I think it's important to add a Cancel button as suggested by @tkoleary.
People sometimes make mistakes while inputting their content and it's helpful to just hit a button to disregard all the changes that have been applied to a form.
Comment #52
brandonpost CreditAttribution: brandonpost as a volunteer commented@Berdir, thanks a lot for the guidance! This is taking longer than I thought it would since I'm still getting to know Drupal 8. I have to leave now to catch a flight, but I will try to work on this more this weekend.
@janaabiakar, I agree there should be a Cancel button here for the reason you gave. My question was more whether or not adding a Cancel button falls within the scope of this issue, or if a separate issue should be opened to allow for more discussion about the Cancel button. One question I have is where to send the user if they click the Cancel button. I think we would want to send the user back to wherever they came from. I'm not sure the best way to get this information in D8, if we just use $_SERVER['HTTP_REFERER'], or if there is a better way.
Comment #53
adamexmachina CreditAttribution: adamexmachina as a volunteer commentedThis issue needs work and is not yet ready for review.
Comment #54
adamexmachina CreditAttribution: adamexmachina as a volunteer commentedComment #55
adamexmachina CreditAttribution: adamexmachina as a volunteer commentedI am removing the Novice tag from this issue because the summary has been updated and there are no more novice tasks to be completed at this time.
Comment #56
brandonpost CreditAttribution: brandonpost as a volunteer commented@adamexmachina, you were right that this issue still needs work and is not ready for review.
Comment #57
drifter CreditAttribution: drifter commentedOnce you have content translation enabled, the save button's label changes to "Save and keep published (this translation)", which is even more verbose and harder to parse.
Comment #58
BerdirMaybe we can get this into 8.1.0?
This is a patch that uses a checkbox. That allows us to use the standard checkbox widget and is trivial to implement, for radio with options, we'd need to use the boolean field type, which is not a trivial switch to make and definitely not just a UI thing.
The downside is that this will break dozens of tests as they all use the button label. But afaik we can break tests in minor releases, so that should be OK.
Comment #60
tkoleary CreditAttribution: tkoleary at Acquia commented@Berdir
Bravo
Comment #61
BerdirThe default weight should probably be higher so that it is likely to be at the end, together with the Save button, e.g. 90 or so.
Also, it requires a cache clear to update the view displays. Maybe we want an explicit update function to add the component for all node view displays explicitly.
Comment #62
tduong CreditAttribution: tduong at MD Systems GmbH commentedFixed a bunch of tests. There are still tests failing and need some more work. Hints on how to proceed are welcome! ;)
There is a test (Drupal\menu_ui\Tests\MenuNodeTest) coming from #2423153: Add menu from the editing page doesn't save the changes. I think we can remove it or revert that commit, since we don't need these 4 buttons anymore.
And the another strange test (Drupal\node\Tests\ NodeFormButtonsTest), which use an assertButtons() method that check for the dropdown buttons, which we don't have anymore. It's pretty useless asserting the same button each time, so maybe we should change this assertButtons() method or adding a new one that checks for the visibility of our new 'Published' boolean_checkbox and if it is checked or something like that, what do you think?
Comment #64
tduong CreditAttribution: tduong at MD Systems GmbH commentedRerolled. New:
Comment #65
Berdirit said keep, so explicitly setting it should not be needed.
Same for a whole bunch of others too. if it said Save and keep *, just change to Save. only if it says Save and publish or Save and unpublish, then you need to set status.
Comment #67
tduong CreditAttribution: tduong at MD Systems GmbH commentedFixed the bugs @Berdir mentioned in #65 and the remaining failing tests.
Comment #69
tduong CreditAttribution: tduong at MD Systems GmbH commentedAs discussed with @Berdir:
Comment #70
BerdirThe [] to NULL chnage here is unrelated.
here too.
Also an unrelated change.
same.
I think we still need to write an update function for this.
Add node_update_N (where N is bigger than the last).
Load all form displays for nodes, add status with these settings, save.
Comment #71
tduong CreditAttribution: tduong at MD Systems GmbH commentedFixed unrelated changes. I'll added that function later.
Comment #74
tduong CreditAttribution: tduong at MD Systems GmbH commentedRerolled and added node_update_8004() in node.install
Comment #76
tduong CreditAttribution: tduong at MD Systems GmbH commentedFixed a Save and keep published button committed from another issue, refactored node_update_8004().
Comment #77
BerdirWhat else is there that's not default?
Neither is correct. Use $form_display.
Comment #78
tduong CreditAttribution: tduong at MD Systems GmbH commentedRerolled and done.
Comment #80
tduong CreditAttribution: tduong at MD Systems GmbH commentedMisunderstood @Berdir's suggestion. Fixed.
Comment #81
BerdirIndentation looks a bit off now. Patch looks good to me now otherwise.
Lets also update the issue summary, link to related issues that we're reverting to explain the big change in that test there.
Comment #82
tduong CreditAttribution: tduong at MD Systems GmbH commentedDone.
Comment #83
tduong CreditAttribution: tduong at MD Systems GmbH commentedComment #84
xjm@Berdir asked me to take a look at this issue in terms of whether it would be acceptable for a minor version.
Based on the nature of the change and the specific code changes (at least based on a cursory code review), this would be a good type of change to target for a minor version. It's disruptive to the node form structure (which is considered an internal API) and the user interface, which are both things we can change in minor versions per https://www.drupal.org/core/d8-allowed-changes#minor and https://www.drupal.org/core/d8-bc-policy.
The one concern I'd have is that in general we do not want to force people to adopt new UIs in minor versions -- we want to make it an opt-in for old installations and the default for new ones. "Fixing" the usability for existing sites is actually sometimes worse for UX because suddenly the existing users have to learn new patterns. (A memorable image in a DrupalCon Chicago keynote in 2011 was that it was akin to having someone come into your kitchen in the middle of the night and reorganize all your stuff for "better" kitchen usability, but that just means you suddenly no longer know where your spoons are. Before, you knew where they were, even if it was a dumb spot.) So is there any way we could sanely keep the old option without adding too much cruft? (If the answer is "no", that's not necessarily a reason not to do this, but we should at least discuss it.)
We'd want both usability and product manager signoff before committing the change. I also think it needs an upgrade path based on the config changes in there?
Thanks everyone! Usability improvements like this are great for the new minor version cycle.
Comment #85
xjmOh also, the current issue title disagrees with the issue summary and patch.
Comment #86
xjmAdding a related issue from @berdir.
Comment #87
xjm@swentel pointed out that
node_update_8004()
is in the patch, but it might still need an upgrade path test. Thanks @swentel!Comment #88
tduong CreditAttribution: tduong at MD Systems GmbH commentedUpdated title and improved issue summary a little more .
Comment #89
BerdirKeeping the existing behavior for existing sites would be possible but problematic.
Here's what we could do:
1. Right now, the update path ads the new status component as visible, like the default config. We could change that and hide it explicitly instead.
2. Either based on that or another, separate setting, we decide to show either the new single button or the old ones. Not sure if we need a separate setting, it doesn't really make sense to either show both (not sure what would actually win then, probably the buttons) nor neither.
However, I'm worried about the complexity that that would imply for core/contrib modules. My main reason for working on this is not the UX improvement. It's that this also results in a big DX improvement. We can for example close #1901216: Modules cannot reliably enhance or alter the node form anymore as a duplicate of this. We also no longer need any of the changes that #2423153: Add menu from the editing page doesn't save the changes introduced. A mistake that I'm sure lots of contrib and custom modules will make too.
If we keep the support for the old UI, we make that an even bigger problem and even more complicated to alter those buttons reliably for both existing and new sites. See for example https://www.drupal.org/project/override_node_options. This change *will* break that module (no matter which option we pick). But the nice thing is that the new code for it will be absolutely trivial. it just has to add two more lines to http://cgit.drupalcode.org/override_node_options/tree/override_node_opti... and can throw away all of http://cgit.drupalcode.org/override_node_options/tree/src/OverrideNodeOp.... (which is copied from core and adjusted for the new permission the module adds).
Comment #90
BerdirWe can remove a bit more from NodeForm. The updateStatus() method and it's usage as an entity_builder directly above.
Comment #91
xjmDiscussed with @Berdir. I think we should add a change record for this change given the impact on the user interaction and contrib.
Comment #92
Crell CreditAttribution: Crell at Palantir.net for Acquia commentedJust a note, Workbench Moderation currently adds an arbitrary number of new alternatives to the drop-down button now. If that UI model changes, we still need to allow for an arbitrary number of additional "save and..." operations, because that's what WBM does. I'd also push back on leaving both old and new UIs intact, as that doubles the work for us to enhance that list. :-(
One of our designers suggested a select box with Save button rather than radios, as it would scale better to the potentially many transitions WBM could add.
Comment #93
BerdirSelect + save would I think be perfectly compatible with the proposed solution. You'd just hide the default status widget that is added for node forms, which you can easily do from the UI and instead show a widget for your own field.
Comment #94
yoroy CreditAttribution: yoroy as a volunteer commentedOn the general notion of changing UI between minor versions: I don't think keeping the existing behaviour around for existing sites is a good idea. Apps update all the time on my phone, and I can still find the retweet and like buttons in the Twitter app too. It's not like we're rearranging the whole kitchen, more like swapping the knives and the spoons in the same drawer :-)
As for the proposed change, looking at the latest patch in #82 it looks like the new direction could work but the current design is not good enough yet:
The checkbox is not clearly related to the Save button, it might as well apply to the image field above. It’s a pity the radio button approach in #44 is so much more work, as it communicates a lot better what’s going on.
This is not a detailed design proposal but something like this to visually group the checkbox and the button needs to happen before we can commit this:
Comment #95
xjmThanks @yoroy, that all makes sense to me.
Comment #96
xjmI wonder if we could do some sort of A/B testing for the proposed change once @yoroy's feedback is implemented, since we are reverting a previous fix that was also intended as a usability improvement?
Comment #97
xjmSo the previous issue also discussed several of these form element design choices.
Comment #98
BerdirThe problem is that Published is a widget. A user can see and move it around on the manage form display page. So we can't just add some simple CSS rules to change some spacing and add a visual separation. What if someone wants to show the checkbox below the title?
We have similar things with for example the node links, which are configurable too but by default, we show them separately in the node template and just care about shown or hidden from that UI. We could do something like that too, likely in seven.theme, where we already have a bunch of form alter for the node form. (Although I'm not a fan of that either, as it's close to impossible to customize that without a seven subtheme).
Comment #99
Bojhan CreditAttribution: Bojhan commented@xjm With our current practices/resources thats unlikely. I think whatever we decide we have to be very careful of its impact this is a 99% interface.
Comment #101
Bojhan CreditAttribution: Bojhan commentedComment #102
webchickAnother possible implementation: #2753717: Add select field to choose moderation state on entity forms
Comment #103
phenaproximaIMHO, the Published checkbox should be treated as a normal widget -- that is, allow the site builders to move it wherever they like. But it should be defaulted to appearing immediately before the form actions. If the user explicitly moves it from there, so be it.
And to prevent it from getting lost in the chaos of the full form, I think core should provide a bit of CSS to highlight the checkbox in some way, like a light grey background for the entire widget and its wrapper. Or, if we want to get really fancy, a background color that changes depending on the state of the checkbox (red if unpublished, green if published).
Comment #104
webchickFrom talking to Bojhan it doesn't sound like this is ready for product management sign-off yet, and is still in discussion. The issue summary makes it sound like there's an agreed-upon spec, however.
Either way, it'd be great to have a "future-looking" design that takes into account how Content Moderation options will show up in the new world order.
Comment #105
Berdir@webchick: The way I understand, the only thing that content moderation would do is replace the "Published" checkbox with whatever UI it ends up using (a simple select, or some kind of bar or whatever).
I also thought that the only thing that we were blocked on here is making the published widget visual. The suggestion was to move it close to the save button and have it visually separated from the rest of the form.
That is more complicated than it sounds because this is just a standard widget. We could move it a specific place in seven, together with the buttons, but then we lose the ability for site builds to control its position (some might want to have it shown directly under the title or so?) and we also have to keep it configurable, so that it can be switched out with the content moderation widget/UI easily (which seven would also need to support). Since we have no field group concept in core, we can't easily make that configurable.
#103 has some alternative suggestions for the UI.
Comment #106
phenaproximaWould it be helpful if I provided a proof-of-concept patch for #103?
Comment #108
ohthehugemanatee CreditAttribution: ohthehugemanatee at Amazee Labs commentedI have an opinion about the bike shed, too! ;)
We are discussing 3 separate issues here, which do not have to be addressed all at once.
1) UX of a confusing button to "Save and Publish", "Save and Keep Published", etc
2) DX of a UI that limits customization, and loads it with nasty surprises like #2423153: Add menu from the editing page doesn't save the changes.
3) UX of a "published" state widget that is separate from the submit form element.
Issues 1 and 2 are very closely related, and have a simple solution: separate the "save" and "published state" form elements. That's the proposed resolution, and it seems like everyone in this thread agrees.
Issue 3 is actually a problem for all the fundamental node properties like author, revision, and datestamps. Right now these are separate fields, and we use templates and seven.theme to basically magick them into a sidebar. That's not great, and we should consider how to improve it. But we should consider how to improve it for all the fundamental node properties together.
And importantly, we don't have to improve it IN THIS ISSUE. This issue can address 1 and 2 in isolation, following the design pattern already in place for author, revision, and publish date. If we change that design pattern later (in a separate issue), that's OK.
With that in mind, yeah @phenaproxima I think it would be helpful to have a patch to address 1 and 2 per #103, following the design pattern already in place.
Comment #109
alexpottOne of the funny things about the current pattern is that most of the time you know you want to create a draft or update the published content before you click edit. Forcing the user to choose after is what makes this so tricky. Maybe we should put the choice of editing published node or creating a draft before the choice to edit.
Comment #110
dixon_I agree with Alex. It is a little bit strange that the task of editing live content and creating a new draft is only distinguished with a checkbox on the edit form.
Should these two tasks not be a bit more separated? Perhaps separate the two tasks as two different operations, with separate links, tabs etc in the UI? One for "edit live" and one for "create new draft"?
Comment #111
tkoleary CreditAttribution: tkoleary at Acquia commented@alexpott
Boom. Lateral thinking FTW!
Comment #112
BerdirThat's an interesting idea, but I don't think it really affects this issue, that's more something to think about for #2753717: Add select field to choose moderation state on entity forms?
If anything, then making this a simple widget instead of a complicated thing with the buttons will make it easier to conditionally hide it, be it always or just in some cases, when the user clicked on "create draft"?
Comment #113
anavarreComment #114
Berdir@anavarre: This issue on its own has nothing to do with content_moderation.module. Other issues for that module depend on it, that's all.
Comment #115
johnchqueDuh, did the rebase for 8.2.x by mistake. Just an option we might use a fieldset for this, I added some code for still be able to move it around the form.
Comment #117
johnchqueThis time for 8.3.x. Kept the changes as shown in the previous screenshot.
Comment #119
johnchqueRebased.
Comment #120
johnchqueComment #121
BerdirHm. Not sure about #108. Publication status is a critical part of the content creation workflow and it should IMHO always be visible and not be hidden away. So if we put it somewhere in the sidebar, we should basically put it in the same place as the revision fields, so that they are always visible.
But based on the UX tests we made with the blocks UI, the right sidebar was practically invisible to every single user, not sure if that's better with the node create form?
Using a fieldset to highlight it might work but then we need to work on the wording, because the screenshot looks pretty repetitive. Don't really have any good ideas, though.
Comment #123
BerdirRerolled status is now a standard field, we need to change it.
Comment #124
BerdirAnd here's a version for 8.2 in case anyone needs it.
Comment #125
hass CreditAttribution: hass commentedHow should this fit into content moderation?
Comment #128
chr.fritsch#123could not be applied. I rerolled it
Comment #130
BerdirWell, it applies I think, just has a merge-conflict that I forgot to fix :)
This fixes some tests. Not sure what to do about content_moderation now, we have a bit of a hen/egg problem it seems.
#2753717: Add select field to choose moderation state on entity forms is postponed on this, but content_moderation is messing around with the node save buttons and replacing it with its own similar pattern with a button per moderation_state.
Comment #132
timmillwoodThis should fix the failing content_moderation test by just leaving it as a special case. We'll fix the content moderation button in #2753717: Add select field to choose moderation state on entity forms.
Comment #133
timmillwoodShort and sweet change record https://www.drupal.org/node/2847274
Comment #135
timmillwoodAdding upgrade path test.
Comment #137
hass CreditAttribution: hass commentedWe should discuss this first with content moderation team as this change may otherwise need to be rolled back for content moderation. Aside there may not enough test coverage as this should break content moderation I guess...
Comment #138
timmillwood@hass - As the Content Moderation maintainer I am fine with this. Although you may have a point about test coverage, so tagged this for manual testing.
There is currently some code in \Drupal\content_moderation\Plugin\Field\FieldWidget\ModerationStateWidget that disables Node module's "publish" and "unpublish" buttons, maybe we should remove that from content moderation in this issue? However it could equally be done afterwards in #2753717: Add select field to choose moderation state on entity forms.
Comment #140
BerdirReroll, simple conflict in a test.
We have been using this for more than a year now on projects and didn't have any issues. One thing I just noticed is that when you hide the checkbox (or when you just applied the patch without running the update or cache clear) then you see the new fieldset but nothing in it.
What we do need might be another UX review. An idea I had was to push it into the sidebar for seven and basically replace the current hardcoded Published/Not Published header at the top. Not sure if that is visible enough.
Comment #142
BerdirThis should fix the fails.
Comment #143
BerdirSo, here is how it looks now:
My idea was to replace the static Published text with it somehow in the sidebar:
Comment #145
jofitz CreditAttribution: jofitz at ComputerMinds commentedFix the final test fail.
Comment #147
jofitz CreditAttribution: jofitz at ComputerMinds commentedNo, it's definitely passing!
Comment #148
timmillwoodI think it's looking pretty good.
Comment #149
hass CreditAttribution: hass commentedThis cannot RTBC. See my comments, please.
Comment #150
BerdirYour comments have been answered. content_moderation was breaking and has been fixed and has a separate issue to further improve it, which was blocked on this but now no longer is.
That said, we need to get rid of that description at the very least, as I tried to convince @timmillwood in the issue that moved the definition to a separate trait, that's why it re-appeared. I also asked @yoroy for thoughts on my screenshots and this might be a good issue to discuss in the UX meetings.
Comment #151
BerdirAuto-reroll powered by git.
Comment #152
BerdirThis patch is better :)
Comment #154
Truptti CreditAttribution: Truptti at Axelerant commentedVerified the patch '2068063-151.patch' in #152, following are the observation
1.The Patch is applied successfully
2.On applying the patch 'Save and Publish' and 'Save as Unpublished' buttons are replaced and Publish checkbox, Save button,Preview button is displayed while creating a new node
3.On editing a node Publish checkbox, Save button,Preview button and Delete link is displayed.
Attached snapshot 'AfterPatch_Edit_Node.PNG' & AfterPatch_New_Node.PNG' for reference.
This can be marked as RTBC.
Comment #155
Truptti CreditAttribution: Truptti at Axelerant commentedComment #156
yoroy CreditAttribution: yoroy as a volunteer commentedAt the very least that "A boolean indicating the published state" description text has to go, it makes things harder to understand instead of helping :)
I'll review this more in depth soon, I wonder if we can be smarter about the visual styling of this.
Comment #157
BerdirYes, I've also noticed problems when you don't have access to the status or if it's configured to not show, then you get an empty publication status wrapper, that definitely looks weird.
@yoroy: Yeah, I agree that we need better visual styling, my idea is in #143 although I quickly tried that and it was surprisingly not easy to get it to where I wanted it. If you want to discuss this in a UX meeting, tell me when and I'll try to join in case there are technical questions.
Comment #158
ifrikWe discussed this in today's UX meeting, and found that this causes a problem when the workflow/content moderation modules are enabled.
The workflow module overrides the default publish button by adding extra statuses. And to complicate matter furthers: users can generate their own statuses, which are then also added to this drop-down button.
(Screenshot and recording to follow.)
It would be good to discuss this issue with people from the Workflow initiative, to see what could be workable solution.
Comment #159
ifrikComment #160
Berdir@ifrik: Ah, looks like it already was discussed there and I missed that :) the workflow UI is changed in #2753717: Add select field to choose moderation state on entity forms to use a select instead of different buttons. What we need to figure out is in which order those issues need to happen, not sure what is easier. The workflow initiative is definitely aware of this patch and Tim actually worked on it.
another thing to test manually is content translation workflows, which also messes with those buttons.
Comment #161
yoroy CreditAttribution: yoroy as a volunteer commentedVideo discussion: https://youtu.be/66ZoqccOYPI?t=9m52s
This does need some coordination with the Content Workflow team, because a situation like this does not look like an improvement:
Comment #162
yoroy CreditAttribution: yoroy as a volunteer and at Roy Scholten commentedAh, thanks berdir
Comment #163
hass CreditAttribution: hass commented@Bedir: WTF? That is exactly what I complained about in #149. Tests are also missing as this patch must fail with moderation in mind.
Comment #164
BerdirAs discussed, this implements field access for status field when moderation is enabled, incuding test coverage. Also fixed up the published status thing to be translated, optional and a details element not a fieldset. Still not convinced by this pattern at all, but at least it is technically working now and we have something that can properly be reviewed and discussed by the UX team.
@hass: What you said is that this should be discussed with the moderation team. It was not just discussed, @timmillwood, which is part of that team worked on this issue. And no, it doesn't fail, because the manually selected status is simply irrelevant and overriden when using moderation states. So it was technically working as expected, just resulted in a confusing UI, which is now fixed.
#2753717: Add select field to choose moderation state on entity forms will then also get rid of the dropbutton for the workflows and replace it with a simple select instead.
Comment #165
timmillwoodI prefered this as a fieldset rather than details.
I wonder if "Publishing status" reads better than "Published status"
Comment #166
Berdir1. fieldsets don't support #optional which is why I changed it. I don't like either fieldset or details, actually :) The labels are duplicated either way. As mentioned before, my idea is putting it in the same place as the revision checkbox/field, where we have a static string for published/unpublished right now when editing.
Comment #167
timmillwoodI have updated the patch to move the checkbox to the "meta" area where the
<h3> Published</h3>
currently is. This is done in seven.theme, so I also made it look nice without seven. Then if the status field doesn't exist or the user doesn't have access to it the old<h3>
is used.Bartik - Published node
Bartic - Unpublished node
Seven
Seven - With content moderation
Comment #168
BerdirNice. As mentioned in IRC, maybe we need a bit of styling in seven to make that bigger/more visible, lets see what the UX team thinks about it.
Also, an idea that I had is that with workflows, it might make sense if seven would display the current workflow state there and not published/unpublished, but that's obviously not something for this issue.
Comment #169
timmillwoodRight, adding the following to seven's CSS will change the label to have the same styling as a the old
<h3>
tag, I'll see what @yoroy thinks before updating the patch.Comment #170
kattekrab CreditAttribution: kattekrab at Catalyst IT commentedRE https://www.drupal.org/node/2068063#comment-11950285
I have an issue for that one. With a patch!!
#2849357: Remove "Published" status description to align with "Promoted" and "Sticky at top of lists"
Comment #171
kattekrab CreditAttribution: kattekrab at Catalyst IT commented@yoroy #156
I have an issue for that one. With a patch!!
#2849357: Remove "Published" status description to align with "Promoted" and "Sticky at top of lists"
Comment #172
Berdir@kattekrab: This issue already removes the description as well and it changes the label to Published, but just for node. I would suggest we update this patch here accordingly and close yours as a duplicate.
Comment #173
kattekrab CreditAttribution: kattekrab at Catalyst IT commentedSounds good to me @Berdir - I'll do that now.
Comment #174
yoroy CreditAttribution: yoroy as a volunteer and at Roy Scholten commented@berdir is there a rationale for why we should consider moving the "published" checkbox to the sidebar?
Currently you can create, edit, publish, unpublish content while ignoring all the stuff in the sidebar. Moving the checkbox for publishing status to the sidebar would break that.
It's also not very comfortable to see the setting for published state move to different locations on the page depending on which modules you enable. That makes things unpredictable on a very important screen where we should strive to be consistent so that we don't undermine people's confidence.
Comment #175
timmillwood@yoroy - The sidebar is only for Seven.theme, so we can move it out very easily, but by default (in Bartik for example) should it be one of the vertical tabs or just a fieldset above (or below) that?
Comment #176
BerdirIt was just an idea I had. The main reason is that we currently have that static info there about Published/Not Published, so I wanted to try how it looks when the checkbox is there and get your feedback on that.
I'm perfectly fine not moving it there. That said, when we don't do that, I'd rather not have a fieldset/details element at all, because that IMHO looks strange and very repetitive.. I'd rather do something in seven.theme that moves it into a common container with the save buttons so that we can have a visual separation there as you suggested a while ago.
The downside of doing anything (fieldset, moving to sidebar or save buttons) is that we break the ability for users to position the checkbox where they want it, as they can with other fields. For example, someone might want to have that checkbox directly below/above the title.
Comment #177
yoroy CreditAttribution: yoroy as a volunteer and at Roy Scholten commentedThanks berdir.
yes!
Would such a change make that *impossible* to do or would it be *more work* to make it look right when moving to another location on the page?
Comment #178
BerdirDepends on where we make the change. If we do it in node.module then it is there for everyone and it is relatively easy to change it with a custom module that reverts those changes.
If we make it seven specific then another them would simply not have it, so if you have another admin theme you can dowhat you want, but if you do use seven.theme then it is very hard to undo that change as seven is the last to alter that form.
Comment #179
timmillwoodI'm wondering if we're best going back to the patch in #164.
Comment #180
BerdirPossibly. Rerolled #164, will think about what to do with seven.
Comment #181
tim.plunkettThis looks out of place. Also, the module doesn't depend on node.module, is this okay?
yay!
Out of scope, and also wrong
Weird indentation choices.
Thank goodness!
Comment #182
timmillwoodRe-roll of #180 and fixes for items mentioned in #181.
@tim.plunkett - Re: #181.1 this is not really ok, although there are some Node specific things needed even though Content Moderation doesn't depend on Node, although this is out of scope for this issue, there are a couple of other issues looking into these things.
Comment #184
BerdirFixed that test and changed the published status label directly in the trait instead of just for node.
Comment #185
Munavijayalakshmi CreditAttribution: Munavijayalakshmi at Valuebound commenteduse short array syntax (new coding standard).
Fixed the short array syntax error and attached new patch.
Comment #186
timmillwoodAfter talking about this on yesterday's UX meeting and talking with @jojototh today we came up with this solution:
Comment #188
BerdirI still find it a strange to have that duplicated label, the proposal back in #94 didn't have that and that looks better to me.
I would actually also suggest to move the markup into the template, we already have node-edit-form.html.twig which has three regions, then we could just display status in the footer and put the hr above in there?
Comment #189
timmillwoodRemoved the label, like in #94. I think it seems a bit bare now.
Also moved the
<hr/>
to the twig template, but note, this is in classy, therefore admin themes that extend this will just get the checkbox.I also removed the field from being display configurable because it doesn't make sense.
Comment #190
BerdirIt IMHO still makes sense to be configurable IMHO, you could for example hide it if you manage it somehow. And it makes sense for themes that do not extend from classy. We have similar things with e.g. the node links, which can also be moved around but they are in a fixed position in the default template.
Wrong screenshot, that still has the label?
Worth mentioning that the line will now always be there, also if access to status is denied. Not sure if that's a feature or a bug. Would be nice to have a screenshot with the default look in seven and when you are using workflows? And possibly as a user without administer nodes permission? I could also imagine that we'd want the upcoming workflows select to also show up below that line, but I guess that's something to figure out in the other issue and trickier, as it is now an always existing base field.
Comment #191
timmillwoodYeh, I guess no hard in making it configurable.
Uploaded the right screenshot, but embedded the wrong one, edited.
I guess the last paragraph in #190 shows the downsides of #189 compared to #186. The patch in #186 has the
<hr/>
as part of the field, so if the field is removed intentionally, via a form alter, or due to permissions, the<hr/>
is gone too.Comment #192
timmillwoodComment #194
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer commentedSorry to be late to the party, here's my 2 cents when it comes to usability:
I feel that the published checkbox is a bit confusing for content authors, since publishing / unpublishing is a user action in their head. Having a button specifically for toggling the published state would be more in line with the concept of performing an action.
How about having three distinct (separate) buttons?
Comment #195
timmillwood@Manuel Garcia - My only concern there is, what does "save" do? I guess it's need to be "save and keep published", "save and unpublish" as the two options, which is what we have now, but just in a drop button. So I guess we could move them out of a drop button into separate buttons.
Comment #196
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer commented@timmillwood good point - yeah then doing that I think would be a clearer path for the user than having a checkbox for it in my opinion.
Comment #197
timmillwoodI've been looking at what other systems do.
It seems like when I spun up a site on wordpress.com there was no way to save as unpublished, but a bit of googling seems to suggest it's possible to get "publish" and "save draft" buttons.
Joomla does pretty much what we're suggesting in #2753717: Add select field to choose moderation state on entity forms, a save button, then a select list to choose published, unpublished, archived etc.
Perch (https://grabaperch.com/features/use-bootstrap-foundation) has a "save as draft" checkbox, so I assume not checking this and clicking save will publish.
Wagtail, a django CMS by Drupal shop Torchbox (https://wagtail.io/) has a button similar to our current drop button.
Silver stripe (https://www.silverstripe.org/) has multiple buttons as @Manuel Garcia is suggesting.
Typo3, couldn't work it out.
Comment #198
yoroy CreditAttribution: yoroy as a volunteer and at Roy Scholten commentedIt's good to keep in mind that the dropbutton was introduced because earlier usability testing showed that people were unsure about what "Save" would do. This was probably for Drupal 6, where the "Published" checkbox was not close to the "Save" button, tucked away in a collapsed fieldset underneath.
I *think* with the published checkbox right above the Save button we're good and won't reintroduce that particular problem.
To recap our options:
With the individual buttons for both we will have to consider the label variations for unpublished to unpublished, published to unpublished, unpublished to published, unpublished to unpublished. And then we'd probably arrive at the forced wording we use in the dropbutton now, but with 2 very wide buttons.
Comment #199
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedBeen lurking here and watching this thread for ages, now its time I posted.
My opinion is that the checkbox option is by far the best:
Jonathan
Comment #200
yoroy CreditAttribution: yoroy as a volunteer and at Roy Scholten commentedComment #201
yoroy CreditAttribution: yoroy as a volunteer and at Roy Scholten commentedWe discussed this extensively again at our UX meeting at devdays Seville (link to follow).
We concluded that we want to go for the checkbox option. Individual buttons would become potentially very long when translations are involved. In Seven theme we do show the current publishing status but in another location (top of the right sidebar). We decided for now to leave it there. Showing the current publishing status is sufficiently covered by the label of the checkbox itself.
Comment #202
timmillwoodSo... now that's decided.
<hr/>
like it?should it be in node-edit-form.html.twig of classy or part of the form element in NodeForm.php?
If the site builder disabled the form element via "Manage form display" should the
<hr/>
also be removed?Comment #203
tkoleary CreditAttribution: tkoleary at Acquia commentedNo. It provides a clean separation for the submits which is visually helpful in all cases.
Comment #204
Bojhan CreditAttribution: Bojhan commentedThanks for the decision, sounds great! We do have to consider if this is a 8.4 thing, given that it changes a core interaction of a 99% field? It will need a big change notice.
@tkoleary I assume that you can remove the form submission element? Then I guess the HR is not needed, but I dont get the point of removing the form submussion element here :)
Comment #205
lauriiiThanks @yoroy for pointing out the question on #202. I think using the node-edit-form.html.twig is sufficient. As a first step, you could add this only into Seven theme, not in Classy or Stable.
I think it is unlikely that we would like to make an exception on this one since it could potentially be disruptive. However, I will discuss with @Cottser and we will make a decision based on that.
Comment #206
timmillwoodMaking the form display configurable again as suggested in #190, and moving the
<hr/>
to Seven as suggested in #205.The biggest remaining issue now is the
<hr/>
is still there is the field is disabled or the user doesn't have access. Is this ok? if not how do we remove it in Twig?Comment #207
tkoleary CreditAttribution: tkoleary at Acquia commentedIMO it's not a problem.
Comment #208
tkoleary CreditAttribution: tkoleary at Acquia commentedAnd BTW this may seem like a small change but this is so much better now. Many many authors will be happy.
Comment #209
xjmHm I'm less confident about that
<hr>
than @tkoleary. Also it should be possible to conditionally display it in Twig, no? Not sure whether that's what we want or not but it seems like we should not add unnecessary markup to the page when it's not useful. Also, are we sure we should do this with markup vs. CSS?Agreed on #205 FWIW.
Comment #210
xjmOh and re: #204, yes, this is definitely a minor-only change (not backportable to 8.3.x after alpha IMO since it changes basically the most important UI). There is already a change record draft attached to the issue.
Comment #211
Bojhan CreditAttribution: Bojhan commentedCan we not just add this in Seven?
Comment #212
lauriiiTagging for accessibility based on #209.
Comment #213
timmillwood@Bojhan - what's "this"? the whole checkbox? the hr?
@xjm - displaying conditionally in Twig is beyond me, I tried
{% if form.status %}<hr/>{% endif %}
but that didn't seem to work. I guess form.status could be set without the field being rendered? I don't know. Maybe a CSS border top on the field might work better, then it would only appear if the field is rendered? We can have a try.Comment #214
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedI saw the accessibility tag was added re: #209. Is this a question about accessibility of
<hr>
versus a CSS border? I read the comments as far back as #188 where the separator was first introduced.On balance, if we do go for a horizontal rule, make it a real semantic
<hr>
. Here's what I know about assistive tech support:<hr>
, but it varies a lot.<hr>
at all, in my own testing.<hr>
. I made a test page with HR elements labeled in various ways. I found that ChromeVox and Talkback will announce a separator, but only if it has a label. I need to test it with more screen readers. I don't know how helpful this is, what the label would say, or whether this is better than a heading.The most pertinent comment is this one from @tkoleary in #203:
I like this idea, though surely it applies to forms on all admin pages? The patch in #206 only adds a separator to the node form. Preceding the submit buttons with a separator, but just on node forms, kind of goes against the spirit (if not the letter) of WCAG SC 3.2.4 - Consistent Identification.
Comment #215
Bojhan CreditAttribution: Bojhan commented@tim Yep, the
<hr>
Comment #216
timmillwood@Bojhan - in #206 the
<hr>
was added to Seven via core/themes/seven/templates/node-edit-form.html.twigIt sounds like from #214 a
<hr>
is better than a CSS border top.Comment #217
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commented@andrewmacpherson in #214
AFAIK The <hr> is not intended to be added above the submit buttons, it is meant to be above the checkbox so that the checkbox does not get lost. The main discussion now is how to remove the <hr> when there is no checkbox. However, I agree with @tkoleary that it's not a problem if we have a horizontal rule when the checkbox is not there.
Comment #218
timmillwoodSo even after all this discussion I think the patch in #206 might be good to go from a UX and accessibility point of view? So could do with a code review.
Comment #219
yoroy CreditAttribution: yoroy as a volunteer and at Roy Scholten commentedAgreed @timmillwood
Comment #220
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedFollowing on from @bojhan in #204
and @xjm in #210
where would be the correct place to discuss how contib modules can maintain their 8.x tests to keep them passing? Many are tested at 8.3 and 8.4 continuously and simultaneously, and when this change is committed maintainers will have a choice of making their tests pass at 8.3 or 8.4 but not both. Should this be raised as a spin-off issue, not to distract from the final push to get this committed here.
Comment #221
timmillwood@jonathan1055 - This will only affect browser tests, so I guess you can check if the checkbox exists or the drop button exists? But maybe worth a follow up issue.
Comment #222
BerdirThis has happened plenty of times already, compared to things like views schema changes, this can actually be worked around if you really want to, like looking for a certain string on the page.
But I don't think that many tests will be affected because the button label only changes for users with the "Administer content" permission, which most tests don't use I think. Simplenews is the only one I found in in a list of 110+ modules.
Of course, for a few modules like https://www.drupal.org/project/override_node_options, this will do a lot more than just break tests, it will break the actual functionality. But backend form structure is excluded from BC. And I think the good side is that it will make those modules a lot easier.
Comment #223
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedThanks @timmillwood and @Berdir. I maintain the Scheduler module (86 in list of most installed modules). We have 64 references to the 'save and ..' or 'save and keep ..' button over 13 out of our 22 test files, because Scheduler is all about altering the published/unpublished state at specified times. Thanks for the tip regarding searching for the checkbox (via xpath I guess). Also there may be scope to run some of the tests as a user without the full permissions, so they will get the same button in 8.3 and 8.4.
Overall this change is a great improvement which I am fully in favour of, and the minor complications with tests, and some modules breaking functionality temporarily is a worthwhile price to pay for the long-term benefit.
Comment #224
timmillwoodIt was discussed in #2753717: Add select field to choose moderation state on entity forms that if the moderation_state field is replacing the status field is should also appear below the
<hr>
, this is not possible with the current implementation of this patch. Therefore we need a #group which we can add things to.Comment #225
timmillwoodThis should do the trick.
Adding a footer container to the node form, tested in Seven and Bartik, it looks the same as it always has, but means in #2753717: Add select field to choose moderation state on entity forms we should be able to put the moderation_state field in the footer container for nodes.
Comment #226
timmillwoodoops, please review Testy McTestbot.
Comment #227
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer commentedLooks good to me, here are some screenshots:
Before:
After (#225 applied):
Comment #228
amit.drupal CreditAttribution: amit.drupal as a volunteer and at gai Technologies Pvt Ltd for gai Technologies Pvt Ltd commentedReview Patch #225.
After Apply Patch run update.php than published checkbox display in content add page.
Comment #229
timmillwood@amit.drupal your screen shot doesn't look right, @manuel's looks correct.
Comment #230
amit.drupal CreditAttribution: amit.drupal as a volunteer and at gai Technologies Pvt Ltd for gai Technologies Pvt Ltd commented@timmillwood
Review again patch #225 on drupal 8.4.x and attach screenshot.
Comment #231
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commented@timmillwood re #229 I think all the screen shots look correct, Manuel Garcia's in #227 and amit.drupal's in both #228 and #230. I can't see any difference, and they all look correct and as expected.
Comment #232
timmillwood@jonathan1055 - @amit.drupal's first patch in #228 has the
<hr>
in the before screenshot, even though it shouldn't. The before screenshot in #230 looks better, the same as @Manuel Garcia's #227.Anyway, it looks like #228 onwards has just confused things and derailed the whole issue.
Things look good from a visual point of view, we have plenty of screenshots now, how does it look from a code point of view, does the implementation work ok? #2753717: Add select field to choose moderation state on entity forms has an example of how things can hook into this, does that work ok?
Comment #233
BerdirCan't you use #$form['status']['#group'] = 'footer'; ?
That should have the same effect and you don't need to actually move the status around.
#type actions has weight 100, so this should default to showing it directly above that, which is I think what we want.
Comment #234
timmillwoodGood spot @Berdir!
Really think we need sign off from a frontender / themer, @lauriii?
Comment #235
ifrikThis looks very clear and straightforward now. It also works fine for multilingual content.
Comment #236
amateescu CreditAttribution: amateescu for Pfizer, Inc. commentedIt's so nice to all that node-specific code removed! Here's a review:
Extra empty line ;)
This change doesn't seem necessary. Other modules might add some extra submit buttons there and it was kinda nice that the previous code was taking all of them into account.
In
hook_update_N()
implementations we should deal only with straight config objects.If we want to use the Entity API, we need to do that in a
hook_post_update_NAME()
function.Nice! The name of the update function needs to be updated though :P
Comment #237
lauriiiThe markup changes itself look good now. However, I think we probably will have to do something to ensure there is enough space on top of the separator because at the moment it looks a bit cramped with some variations.
Example:
Comment #238
timmillwoodThis should fix the items in #236.
@lauriii - What do you suggest?
<br/>
too old school?Comment #239
lauriiiMaybe something simple as this would work
Comment #240
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commentedhurray!
Here the screenshots:
Before (page content type):
After (page content type):
Before (article content type):
After (article content type):
Looks good to me!
Code looks good, we've got a proper solution for FE, RTBC!
Comment #241
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commentedOops, here the proper image for After (article content type):
Comment #242
tstoecklerSorry to have to kick this back. This change is really great and I applaud all the effort being done here.
But - while generally we do not consider forms as an API - the node form in particular is different in my opinion as a lot of contrib and custom modules will alter this. Since this is a straight-up simplification I agree (and feel strongly, in fact) that we should do the change, however, I also think we should be a bit more up-front to module developers about this change.
The change record currently does not mention a change of the form structure at all, it could just as well just be changing the form labels.
Proof of how common it is to have to account for the currently weird node form is this gem in
menu_ui_form_node_form_alter()
:Since that is not actually broken by this patch I think it's fine to this in a follow-up, but with this patch this can now be very much simplified to something like
and I think we should make module developers aware of this.
Comment #243
amateescu CreditAttribution: amateescu for Pfizer, Inc. commented@tstoeckler, I had the exact opposite opinion in my review from #236 :)
Sorry for being nitpicky but "add_status" is a bit too generic, how about "configure_status_field_widget" or something like that?
Comment #244
tstoecklerAhh, sorry, missed that. Even though I tend to disagree, I'm fine with not changing Menu UI here, but do you agree that a note about this in the change notice is in order?
Comment #245
amateescu CreditAttribution: amateescu for Pfizer, Inc. commentedYes, definitely, the CR should explain in more detail the changes that were made here and their impact.
Comment #246
ifrikI've also checked this with the Content moderation and Workflows modules enabled since these modify the Save button. This still works after the patch.
Comment #247
timmillwoodUpdating based on #243.
I tend to agree with @amateescu about #242, and I guess we could address it in a follow up, so putting back to RTBC.
Comment #248
timmillwoodUpdated the change record to explain the node form changes in more detail. https://www.drupal.org/node/2847274
Thanks @Manuel Garcia for the reminder.
Comment #249
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commentedThannks @timmillwood!
Interdiff on #247 looks good, we've got a proper CR now, +1 to RTBC
Comment #251
BerdirRebased the patch, didn't apply anymore due to two moved tests:
Comment #253
tacituseu CreditAttribution: tacituseu commentedUnrelated failure
Comment #255
BerdirDo we have a new random test fail?
Failed twice with
fail: [Completion check] Line 271 of core/modules/views_ui/src/Tests/ExposedFormUITest.php:
The test did not complete due to a fatal error.
Comment #256
tacituseu CreditAttribution: tacituseu commented@Berdir: No, they're known segfaults, see #2859704: Intermittent segfaults on DrupalCI (some "did not complete due to a fatal error" with no additional info).
Comment #257
star-szrFrom a frontend perspective, this looks good.
The additions to Seven are sensible and in this case leaving Classy alone seems to work out fairly reasonably. If someone has overridden the #theme for this form as Seven has done (in
seven_form_node_form_alter()
), they may need to adjust/override their node-edit-form.html.twig template if they want the publish checkbox to be with the form actions in the markup.Comment #258
alexpottI think that Bartik needs a bit more work. The submit buttons on chrome are really far away from the published tickbox.
Why am I talking about Bartik? There is a option that people have to display content creation forms in the main theme (and not the admin theme). This is another reason why this change is especially tricky. It's the one part of the admin front end that is really simple to configure to not display in the admin theme (it's just a tick box on admin/appearance). Therefore custom themes for sites that have content creation as one of there main flows for registered site visitors are likely to have customisations to this form both terms of form alters but also in terms of the theme itself.
Also because of the above I think the CR needs to detail better how this change impacts themers of the node add/edit form
Comment #259
BerdirAgreed that we need be careful about this change, also in regards to frontend themes.
I think the 90% use case for seeing this form in the frontend theme is workflows where normal/anonymous users can create (unpublished) content, but who knows what people are doing :) At least for those users this issue shouldn't actually change anything, because they only had a single Save button before and they also will now. That's true for anyone who doesn't have administer nodes permission, although sites can have customized that as well of course.
Comment #260
timmillwoodHere we have how the published checkbox looks by default after this patch has been applied. As @alexpott mentioned in #258, the submit buttons are quite far from the checkbox in Bartik. This is because Bartik sets this:
and this:
@lauriii @Cottser - What do you advise here?
Comment #261
timmillwoodAdded an extra paragraph to the change notice.
Comment #262
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commentedRe #258, #260:
Had a look at the problem with the checkbox in Bartik, and @timmillwood is right, here is how I see it:
form-actions
element for any publishable entity form needs itspadding-top
removed.form-wrapper
for the published checkbox needs itsmargin-bottom
removed.Not a straight forward fix, we will probably have to add a CSS class to the published checkbox element at least.
Comment #263
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commentedRebased as the changes to these two would not apply:
Comment #264
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commentedOK I just went ahead and had a go at this, trying to fix the issue with Bartik. I went the way of not disturbing the existing styles for the rest of the elements, and just removing margins for these specific fields.
Let me know what you think.
Before this patch in Bartik:
After this patch in Bartik:
Comment #265
vijaycs85Manually tested the patch and working as expected:
Scenario 1: Fresh install with patch
- Installed site with patch
- created node
- Confirmed the node has publish checkbox
Scenario 2: Apply patch to existing site
- Installed site with 8.4.x
- Created two article. one in draft and one published
- Applied patch
- Ran update.php (ref: Start & In progress)
- Confirmed both nodes reflecting the publish status on checkbox.
Seven theme: Desktop | Mobile
Bartik theme: Desktop | Mobile
+1 to RTBC.
Comment #266
Bojhan CreditAttribution: Bojhan commentedFollowing the screens this should resolve the last outstanding issue raised by Alex. I don't see any visual issues that could hamper commit, and with Berdirs comment in mind it seems safe to get this in.
Comment #268
tacituseu CreditAttribution: tacituseu commentedUnrelated failure
Comment #269
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commented@tacituseu It is not an 'unrelated failure' it is part of the work done in #2851916: Expose phpcs patches to comment stream to ensure that patched code adheres to coding standards. This one line fix should be corrected. This 'use' statement has been added but is not required, so here is a patch with that entire change to
node.install
reversed out, but other than that it is identical to #264Comment #270
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedPatch now passes the coding standards and no new violations are added. Setting to RTBC as originally done in #265 and #266.
Comment #271
tacituseu CreditAttribution: tacituseu commented@jonathan1055: It was unrelated failure, #2857843: Random fail in Drupal\KernelTests\Core\Entity\ContentEntityChangedTest::testChanged to be exact, see https://www.drupal.org/pift-ci-job/686517.
You most likely based your comment on the re-test I've added...
Comment #272
tstoecklerThe
updateStatus()
method should be deprecated as part of this patch, as it's now always a no-op.Also still not super happy about the hunk in
menu_ui_node_form_alter()
not being removed here while its test coverage inMenuNodeTest
is being removed. Can we at least have a follow-up to discuss that?Moreover,
MediaForm
contains the same status dance so would be nice to either handle that here directly or open a follow-up for that.And lastly, looking at all the test changes, would be nice to list the needed changes for contrib tests that use the node form a bit more explicitly in the change notice.
Comment #273
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commentedThanks @tstoeckler!
Deprecating NodeForm::updateStatus().
Removing the status dance from Media, updating its tests, and also deprecating MediaForm::updateStatus().
I'm not sure what you mean about
menu_ui_node_form_alter()
, so I'll leave that to someone else at least for now :)Comment #274
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commentedRerolling #273 due to #2870453: Convert web tests to browser tests for node module
Comment #275
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commentedOK thanks @timmillwood for explaining a bit why we should have another look at MenuNodeTest.
In this patch, instead of removing that chunk, I've changed it to check that the menu links only appear when the node is published, using the published checkbox instead of the different buttons.
Comment #276
tstoecklerThank you @Manuel Garcia! I'm fine now with the menu code and this way no follow-up is needed.
I adapted the change notice to make the required test changes more clear.
So everything I complained about above is fixed and I was about to re-RTBC this, but then noticed the following:
Because Media is (as of now) still considered experimental, we can actually remove this directly instead of deprecating it. For Node module we have to keep it around and deprecate it (just like the patch is currently doing), but not for Media.
On the other hand, would be really nice to get this in so not sure it makes sense to hold this up on some leftovers in an experimental, AFAICT it shouldn't be a problem in terms of release management, but not sure, so leaving at "Needs review". If we can get a quick update to remove that function that would be nice, otherwise maybe someone else is bold enough to pull the trigger.
Comment #277
BerdirNow I'm confused, when did we add media to this?
We have an existing issue for that with an existing patch, so I'd prefer to keep that separate: #2863431: Change "Save and keep un-/published" buttons for media module
Comment #278
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commentedHah you beat me to it @tstoeckler! It looks perfect, thanks. I noticed we didnt mention Media, so I've added info to the change notice about Drupal\media\MediaForm being changed.
However looking at @Berdir's comment looks like we should remove those changes from this patch, so I have reverted that change from the change notice.
I will prepare a patch shortly removing the changes from Media.
Comment #279
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commentedRemoving changes from media module added on #273, as per request on #277.
Comment #280
BerdirThanks. I think it makes sense to keep that separate, as @tstoeckler said, the rules on what we can deprecate/remove are different and the UI is very different, so I think that needs to be tested separately and I'd prefer to not block this issue on testing media UI.
Comment #281
tstoecklerI tend to disagree with #277 as for usability impacting decisions our usual "piece-by-piece" approach has a degrading impact on the product, but since in this case the only other case is in an experimental module and we already have an issue, why not.
Comment #282
catchs/Access/Assert
(fixable on commit)
Otherwise this looks good to me (and really happy to see this change, I've both been confused by the existing UI myself and seen others get confused by it) but want to give yoroy another chance to look at it just in case.
Comment #283
yoroy CreditAttribution: yoroy as a volunteer and at Roy Scholten commentedThanks for all the refinements. I'm really looking forward to see this committed as well. I had another look and found one visual glitch unfortunately:
On small screens the border above the checkbox and the bottom of the vertical tabs container are just a bit too close to eachother. Lets get them out of their intimate zones :-)
In the above mockup I fixed it by adding a margin-bottom of 1.5em to the container of the vertical tabs: .layout-region-node-secondary.
Otherwise this all looks and works great, so one more little fix and it's ready to go.
Comment #284
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commentedGood catch @yoroy thanks!
It occurred to me that on small screens the line separating the published checkbox from the top would not be as needed, as it is already visually separated from the tabs on top. So I went ahead and changed the latest patch so that the separating line only appears on widescreens, and made sure that the spacing is correct on both layouts. I think it looks cleaner this way, let me know what you think =)
Wide screen:
Small screen:
Comment #285
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commentedHad a brief chat with @yoroy about this, and he had already thought about this, and had decided to leave the line on small screens in order to make the separation crystal clear.
Doing this now, and switching all the new padding and margins to ems as well.
Wide screens:
Small screens:
Comment #286
timmillwood#285 look as though it addresses #283, we're ready for commit.
Comment #287
yoroy CreditAttribution: yoroy as a volunteer and at Roy Scholten commentedThank you @Manuel Garcia for the quick turnaround on this. @larowlan wondered how this would look with contrib Workbench Moderation, I checked and the look is identical to what we see here. I'm happy with this now!
Comment #289
catchCommitted c53b322 and pushed to 8.4.x. Thanks!
Did my best with the issue credits, but let me know if I overlooked something, gets very difficult with #287 comments.
Comment #290
timmillwoodOpened a follow up #2886569: Users with just create content permission don't know publishing status as the UX is confusing for users who don't have the "Administer content" permission.
Comment #291
slashrsm CreditAttribution: slashrsm at MD Systems GmbH commentedPAtch against 8.3.4. In case anyone needs to patch their projects.
Comment #293
kbasarab CreditAttribution: kbasarab at Mediacurrent for Group Nine Media, Inc. commentedRoll against 8.3.5 for those needing it as well.
Comment #294
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commentedComment #295
flocondetoileAttached a reroll for 8.3.6, if needed
Comment #296
pfrenssenIt seems the update hook for this is not complete. This changes the base field definitions for all newly created entities, but existing entities also need to be updated.
Here is how it looks now on my site after updating to 8.4.x:
edit: It is because my site has overridden this base field. If the field is not overridden it will look correct.
Comment #297
Berdir@pfrenssen can you open a new issue? Note that your description is not the one from the changed code but the old one from the node module.
description/title afaik don't require an update, just a cache clear. Are you sure that your example is a node form and not something else that was copied from node? That string was already changed/removed in Node in #2810381: Add generic status field to ContentEntityBase
Comment #298
ressa CreditAttribution: ressa commentedI just noticed the improvement in the "Publish"-UI, when I was testing the latest version (8.4.0-rc2) over at simplytest.me. Thanks for making this small, but great improvement, the new design is much more user-friendly and intuitively understandable.
Comment #299
gillesv CreditAttribution: gillesv commented@berdir, I also experience the issue that @pfressen mentioned.
The update function worked for most node types, but NOT the "page" node type. I think it's because that node type was generated automatically by the install profile, and the site was not installed in the default english language (but in the dutch language), so it created overrides for all the basic fields (title, status, promote,...).
Should I create a new issue?
Comment #300
geerlingguy CreditAttribution: geerlingguy commentedChiming in just because I had no clue this was happening until I read through the 8.4.0 release notes today... but basically, this feels like a regression to me—we had this idea of 'action buttons' with multiple actions throughout the Drupal 8 UIs, and we also had a lot of different systems (like workflow moderation) that added to or changed the button to add new items.
The published checkbox not only adds more weight to the operations on the node form, in my mind it adds some complexity in that the one button used to be my control over how a node was published, but now that ambiguity is hidden behind a checkbox (usually not styled that well by other admin themes or themes where node forms are displayed using the non-admin theme) and a save button, which was a #DrupalWTF from D7 and prior (even though it used to be slightly more hidden than it is now).
Also, for anyone who's modified anything in a node form submit button (e.g. the text of one of the buttons/actions), that code will likely break (I've only done it once, and don't have time right now to test against 8.4 on that site), so this change is not only relatively major for UX (the whole reason we switched to a Dropbutton instead of checkbox + button was as a result of UX testing/research), it also can and will break certain themes (which isn't apparent in any of the change records/notes I found).
Is... there any discussion around reverting to how it was working in 8.0-8.3?
Comment #301
DuaelFrI'd add that low technical skill admins that are used to see and use this drop-down button on their sites are likely to dislike this checkbox because of our natural resistance to change.
I'll deploy one of these tomorrow. We'll see...
Comment #302
DamienMcKennaMy concern with the new UX is as follows:
This seems like a small dichotomy.
Comment #303
samuel.mortensonI feel like this is a UX regression, even if user testing showed that the dropbutton was confusing, that's what every Drupal 8 user has become accustomed too. In my opinion this should be at least configurable, so that existing sites don't have to re-adjust to such a dramatic change.
Comment #304
LiamPower CreditAttribution: LiamPower commentedI don't really agree with how this has been done, I'm going to have clients who I'm sure aren't going to be happy with the change to their content editing experience. I feel this should have been a configuration option within the content types to allow a preference to be made.
Comment #305
Sam152 CreditAttribution: Sam152 as a volunteer and at PreviousNext commentedI think a minimal contrib module to restore the old behavior will address this. I don't have an opinion on the UX, but I also have some particular sites that will need to remain consistent with 8.3.
Comment #306
BerdirI understand that not everyone is happy with the change, also simply because it is a change. Maybe a configurable module can restore the behavior, but making it configurable in core would be quite complicated. Keep in mind that this doesn't just affect the standard node form but also content moderation which was changed to basically replace the checkbox with a select instead of lots of dropbox options. Then all those things would have to respect that setting and we'd have twice the code complexity and this was already extremely hard to get in as it is.
Note that those dropbuttons are by default only visible for users with "administer nodes" permission, which is an administrative permission that normal users on many sites won't/shouldn't have, for them, nothing changes.
This also considerably simplifies altering the node form, allowing normal users to publish/unpublish content can now be done with 3 lines of hook_entity_field_access() code and allow access to the status field but not changing other things like author/created/sticky/new revision behavior. And I've seen various questions on Drupal Answers where people were struggling with altering the node form because you had to add your action to all buttons but then again special casing preview and so on. Now there is always only one button.
Comment #307
geerlingguy CreditAttribution: geerlingguy commentedI opened #2914426: Revert the removal of the entity save dropbutton in Drupal 8.4.0 as a follow-up since this ticket is closed.
Comment #308
xeM8VfDh CreditAttribution: xeM8VfDh commentedI'm not here for the the dropdown vs checkbox debate. But, this change did cause some confusion in my org because the checkbox above "Save" has no corresponding "Published" label, as showing in the original patch screen shot. Am I missing something, or might there be some configuration that is preventing the "Published" label to show next to the checkbox above the "Save" button? Right now its just a mysterious checkbox above the "Save" button, so it's not immediately apparent that to save-as-unpublished, the editor should uncheck that box.
maybe my issue is related to this... https://www.drupal.org/node/2915879
It looks like a problem with content types migrated from D6 to D8, but the issue linked above doesn't clearly explain how the issue was resolved. If anyone knows, please share!
EDIT: it looks like, as a result of my D6 to D8 migration, I had various entried like the following (see below) for my content types created in D6:
and corresponding config files:
I deleted the config files, which showed differences queued for synchronization in
Configuration >> Development >> Configuration Synchronization
. I then ran the synchronize option on that page, and it removed the entries from my database. As a result, I now see the proper "Published" label on "Manage form display" pages and on the create/edit content type pages. So, I think this solves the problem, but am hesitant to push changes to production.... does anyone know if this is safe?EDIT: allegedly these config changes are safe (see: https://www.drupal.org/node/2915879#comment-12313531)
Comment #309
fdverwoerd CreditAttribution: fdverwoerd at Dutch Open Projects commentedI'm not sure if I should make new issue or say it here, but when upgrading from 8.3.7 to 8.4.2 the save button has not changed, see attached screenshot:
'Save and keep upublished' or 'Save and publish' do not work, but these buttons are still present?
Comment #310
JHDiamond CreditAttribution: JHDiamond commentedHey!! What if we turn the whole thing into something like an 80's adventure story game?! something like:
And then like, you have to click on the right sentence or something but its not hyperlinked to indicate that that's what your supposed to do.
Thoughts? I think all content creators would really appreciate it it!