Problem/Motivation
Really similar to #874000: Automatically remove module's nodes upon module uninstallation, we want to automatically remove the content entities of the module upon the its uninstallation, but for entity types.
Currently we already have some Contrib modules that have their own workaround (see e.g. #2609782: Trouble deleting and removing Paragraphs - can't uninstall comment #10, ...), and we want to avoid having them individually but provide this thing in Core.
Proposed resolution
This feature provides a "prepare uninstall" form, similar to a "confirm uninstallation" form, displaying the amount of content entities that need to be removed before uninstalling a module, that will be accessible by a link provided on the Uninstall page for each entity type a module has as admin/modules/uninstall/entity/{entity_type_id}. After the content data has/-ve been removed, the form is redirected to the Uninstall page.
Uninstall page

Prepare uninstall page (e.g. for node)

Confirmation

| Comment | File | Size | Author |
|---|---|---|---|
| #152 | Screen Shot 2016-07-27 at 09.45.56.png | 76.54 KB | alexpott |
| #152 | 2688945-152.patch | 19.48 KB | alexpott |
| #152 | 143-152-interdiff.txt | 849 bytes | alexpott |
| #143 | 2688945-143.patch | 19.59 KB | alexpott |
| #143 | 140-143-interdiff.txt | 8.08 KB | alexpott |
Comments
Comment #2
tduong commentedComment #3
tduong commentedComment #4
tduong commentedComment #5
berdirComment #6
cilefen commentedComment #7
tduong commentedStarted with the form but I cannot make it work properly (it does not get the entity_type argument from routing). I've also tried so many things that now I'm confused... Will work more on this tomorrow!
Comment #8
cilefen commentedThis sentence does not make sense. Also, we really need a confirmation form for this.
Comment #10
berdirThat form *is* the confirmation form, we don't need another.
Comment #11
tduong commentedNow it works, but only as standalone form, so you have to go to admin/modules/uninstall/entity/{entity_type_id} to test it. At the moment you cannot go to the install/uninstall page because of an exception:
Symfony\Component\Routing\Exception\MissingMandatoryParametersException.What is in plan is that this form will be accessible by a link provided on the unintall page for each entity type a module has, but we need to decide more in details how to do it.
Next task: count how many content entities there are for the entity type we want to delete and show them on this prepare uninstall form.
Comment #12
tduong commentedNo interdiff because it is bigger than the patch :P
Comment #14
tduong commentedAdded content entity counter.
Comment #16
tduong commentedI've noticed that in the UI ("fresh drupal instance") the node module has also taxonomy and history requirements, and you cannot uninstall node until you don't uninstall the other two first, but in the test there is no such thing (see screenshots to get what I mean). Do I miss some obvious informations?
Comment #19
tduong commentedRerolled. I've just noticed that all my previous patches were made against 8.0.x branch. Now I'll set testbot to run on that branch instead of 8.2.x and see if there are still problems.
Locally I've switched to the 8.2.x ranch and tried to run the test but I got a warning and a fatal error, here is the output:
Does anyone knows what can I do now ?
Comment #20
tduong commentedHmm, ok I'm dumb...
Comment #21
andypostThis is right version to run tests
@tduong about #19 see https://www.drupal.org/node/2648064
Comment #22
tduong commentedOk, changed branch, added a link in the uninstall module descriptions to its "Prepare uninstall" page, extended the test and uploaded new screenshots.
As my current code I cannot get all entity type ids right (e.g. 'views' instead of 'view'). Any suggestion ?
And there is still the odd thing for the test: after removing the content data, uninstall Node checkbox should still be disabled and it should be required at least by Taxonomy and History (as blank drupal installation), but in the test it is ready to be uninstalled without any further dependencies. Do you know what is wrong here ?
Comment #24
berdirentity type and module is no the same thing. You can't add this here, you have to add it in ContentUninstallValidator
that's why the test doesn't work.
Comment #25
tduong commentedHe-hem... D*mn it... You are right!
Comment #27
berdirthat's not how links work :) We might also want to make this part of the same reason string, not two separate ones.
Comment #28
tduong commentedDone.
Learnt something new. For those who wonder why with the previous code there were 2 problems:
Comment #30
tduong commentedForgot to fix the link thing also in the "Prepare uninstall" page. Also improved the test by checking for the modules description instead of their names, re-enabled the check for taxonomy and history (since node is supposed to be required by them, thus it could not be uninstall as long as they are still alive, but both local test and testbot do something strange...)
I've investigated a bit for the failing unit test and it seems like there is still something wrong with the link in ContentUninstallValidator when
toString()is called and it ends to core/lib/Drupal/Core/Routing/RouteProvider.php on line 214 wherefetchAllKeyed()is called on a non-object variable.Cannot figure out how to fix it. Any suggestions ?
Comment #32
tduong commentedDiscussed with @Berdir and it makes more sense to redirect back to the "Uninstall" page right after the data has been removed.
The reason why taxonomy and history don't appear during test it's because I didn't enable them, but when installing Drupal it does it by default. Dropped checks for these modules from the test.
Now locally my test fails checking that we are redirected back to the uninstall page and I think it's because batch needs time to run for the test, so it needs to sleep a bit, but probably I'm not doing that right.
Comment #34
tduong commentedReroll and removed that unnecessary sleep() thing. Still no idea why the expected and actual path are not matching during tests... manually works fine!
Comment #36
tduong commentedDiscussed with @Berdir and found the bug: need to set the domain for the redirect response. and about the failing kernel test the register() method .. does nothing but failing our test :D
Comment #37
tduong commentedAnother reroll, updated IS and put some screenshots as well.
Comment #38
timmillwoodI quite like this solution, just updated some of the wording.
Comment #40
timmillwoodForgot to update the test.
Comment #41
timmillwoodComment #42
tduong commentedThis change looks odd for other content entities, e.g.:
comment --> "Remove Comment entities" "There are 2 Comment entities to remove!",
shortcut --> "Remove Shortcut link entities" "There are 2 Shortcut link entities to remove!", ...
In the title there is already written that that delete form is related to which content entity, so I think it is clear enough and it is enough to know the amount of content entities to delete (not Content, from 'node' entity type).
Comment #43
timmillwoodI think from a UX point of view it's better to be explicit.
Comment #44
timmillwoodComment #45
berdirThe main problem with mentioning the type in messages like that is getting case and plural forms correctly. Which is practically impossible.
Comment #46
joachim commentedThis is a really big improvement!
Just some UI things to tweak:
> There are 2 Content entities to remove!
I don't think exclamation mark is needed. We don't use those anywhere else in UI strings.
Though what we should have is the standard warning that 'This action cannot be undone.' And maybe that should go with some further help text, such as we have when you delete a field? Eg, 'This will delete all Foo entities from the site, and will allow the Foobar module to be uninstalled. This action cannot be undone.'
The button could also maybe be changed to say 'Delete all Foo entities'.
Lastly, there's no need for a fieldset that consists of the whole form.
Comment #47
joachim commentedLooking at this some more, this should be following the same UI pattern as other deletion forms.
I'm having a look at making this use ConfirmFormBase or ConfirmFormInterface, but getting a bit stuck with getting the entity type ID into the form...
Comment #48
joachim commentedI'm working on this at the moment.
Comment #49
joachim commentedUpdated patch:
- changed form class to inherit from ConfirmFormBase, so we get:
-- standard title with the confirmation question
-- cancel button
- changed confirm button to use the entity type label for additional clarity
- fixed entity type ID rather than label used in one of the batch labels
- fixed whitespace at the end
I'm not massively keen on this in buildForm():
but the only way to avoid it that I see is adding a form builder, which seems like overkill.
EDIT: drat, this will possibly break the test due to the button label change :( And I'm out of coding time for this weekend. Sorry!
Comment #51
timmillwoodQuick update to fix tests.
Although untested due to local environment issues.
Comment #53
timmillwoodOoops
Comment #54
Bojhan commentedGenerally we do not use the word "entities" in the UI. This is part of our guidelines. Can we in this case not say:
"Delete all Content types"
Unless I am wrong, for core almost all "bundles" are referred to as types in the UI. I would keep that consistent pattern.
I would happily have a philosophical debate over the label, but its a established standard - if one wishes to re-open that discussion we need a separate issue, and avoid negatively impacting the importance of this issue.
Comment #55
joachim commented> Generally we do not use the word "entities" in the UI
Fair enough.
Though "Delete all Content types" isn't what we're doing here. We're deleting all nodes / comments / menu links / flaggings.
Entity types have plural labels as of 8.1.x, so we can use these:
Comment #56
Bojhan commentedAhh, good point. Great!
Comment #57
timmillwoodUpdating with suggestion from #55.
Comment #58
berdirLooks like you uploaded the interdiff twice?
Comment #59
timmillwoodok, this should be correct now.
Comment #61
tduong commentedMissed to edit some places and screenshots.
Comment #62
tduong commentedMissing uppercase.
Comment #63
timmillwoodComment #64
joachim commentedWe can't rely on the replacement token being at the start of the sentence in other languages, so ucfirst() is wrong here.
Best way is to reword so the token is not at the start of the sentence.
Comment #65
timmillwoodLooks like we're in a pretty good place.
Comment #66
cilefen commentedThe grammar police say "allow" cannot be followed immediately by an infinitive, but gerund phrases are acceptable.
Comment #68
amateescu commentedThe patch is still green, back to RTBC.
Although.. the current patch does not address un-installing a module via the API (or drush). Is it ok to leave that for a followup?
Comment #69
alexpottLet's not concatenate translations - this causes problems for RTL.
Nice - I like keeping all the batch logic in the same place.
Where is @current, @percentage and @total coming from?
Maybe we should have the 100 as something configurable.
This looks tricky - I think we should set it to finished when the number is 0 or the number has not changed from the last number. If the last number is not 0 then we need to fail and say that we couldn't delete something.
I would just passed the entity_type_id into the results otherwise we need to this on every batch iteration.
Comment #70
alexpottComment #71
alexpottI definitely think the Drush issue is fine to do in a followup - or even the drush queue.
Comment #72
alexpottI think this patch could do with a product manager review.
Comment #73
amateescu commentedRe #69:
2. Fixed.
4. Yes.. I think that's a safe assumption :)
5. They were coming from
_batch_process()itself, but I rewrote the progress message part to show a better overview of the real progress.6. Done, made it configurable in the form, hidden under an 'Advanced options' details element.
7. We can only assume that we were able to delete everything, otherwise an exception would have been thrown and the batch would've stopped anyway.
8. Done.
Comment #74
amateescu commentedIt's not only Drush, it's our own module API that is not taken into account here, i.e.
\Drupal\Core\Extension\ModuleInstallerInterface::uninstall(). Basically, the only reason that #874000: Automatically remove module's nodes upon module uninstallation is still open after so many years :)However, the workaround for someone who wants to uninstall a module in an update hook or something is that they have to manually remove their content entities with Batch API, pretty much like how we're doing it in this patch.
Comment #75
alexpottOne of the problems we have is that there is nothing to stop people creating content whilst this is on-going.
Let's set this to do it one at a time then so we're sure that batching is working.
Comment #76
amateescu commentedTrue, but that only means that the user will have to go through this 'delete content' step again before uninstalling the module. It's not like we're automatically uninstalling it at the end of the batch process, we're just redirecting back to the module uninstall page.
Sure thing :)
Comment #77
timmillwood#76 looks good to me.
I agree that if content is created during the delete process then they will just have to run the process again. One would assume that users will only do this process on a dev version of the site too.
Comment #78
joachim commented> I agree that if content is created during the delete process then they will just have to run the process again. One would assume that users will only do this process on a dev version of the site too.
The alternative is to run an ordered query for 100 entities in each batch run, and instead of setting the max at the start of the batch, set finished if the query returns fewer than 100. It means your batch UI can't show progress (or we can show approximate progress that might jump at the end).
I used this approach on a site with a batch that processed all entities of a certain type, while users were potentially adding more.
Comment #79
webchickWill try and review this today during UX meeting. For now, adding the tags.
At a glance of the screen shots, though, it doesn't look like we're doing nearly enough here to inform people about what sort of destruction is about to happen. For example:
- Notice about 2 content items about to be deleted is not styled in any way (e.g. red error), so it's super easy to just click past it, leading to unwanted data loss.
- Rather than simply saying "2 content items" it probably should display a (truncated if necessary) list of node titles, which would more clearly communicate what is being deleted.
Will ping the UX team to see if they have other feedback.
Comment #80
berdir@webchick: Note that the only way to get to this page is from the uninstall page when it tells you why a module can't be uninstalled. So a site builder shouldn't accidently end up there. But sure, adding a red message that this will delete data and that there is really no undo won't hurt ;)
Comment #81
Bojhan commentedComment #82
yoroy commentedDiscussed this during UX meeting in Slack:
In general: not explicit enough about what is going to happen. We need to slow down this quite a bit (introduce more friction) so that people become really aware that there is no undo here.
1. For example: have people literally type in the word "Delete" in a text field before they can continue.
2. Showing a list of what's going to be deleted would also help estimate the impact. "3 Flagging entities" is quite abstract, can we show a list of titles instead? Similar to the confirm screen that follows bulk-deleting from the content listing:
3. Lets not make the primary button blue here, maybe we should introduce a big scary red button here.
4. Do we want to remind people to create a backup of their database first? That's the only undo option there is right?
Comment #83
yoroy commentedSo yeah, needs work :)
Comment #84
timmillwood@yoroy - The patch extends
ConfirmFormBase, and therefore follows all the design patterns of other confirmation forms. Should we apply your points from #82 to all confirmation forms?Comment #85
gábor hojtsy@timmillwood: Well, the conclusion of the discussion was that most confirm forms don't have the potential to delete 5k nodes that you worked on for 4 years "accidentally". That this form can do such damage as to undo the majority of a site, so it needs to be treated as such.
Comment #86
webchickWhatever the content admin page is doing to its confirm form, though, is a pattern that already exists in core, so however it's doing that, yes, we want to establish the same "OMG ARE YOU REALLY REALLY SURE?" pattern in both places.
Comment #87
gábor hojtsyThe content admin page allows you to act on 50 nodes at most (by default). This form allows to act on all the content on the site, be it 50, 5000, 50000 or whatever. There is a clear level of difference in damage made. Not sure I would want to type in "Delete" each time I want to bulk-delete 2 nodes, but if I am about to delete four years of work, I would welcome the extra caution.
Comment #88
timmillwoodok, how about, based on #82:
1) This confirm form
2) All confirm forms
3) All confirm forms
4) This confirm form
Comment #89
webchickBtw, lest you think we're just being overly paranoid here, this same type of deal is literally how jQuery lost its entire plugins repository a few years ago, thanks to a major "oops" with VBO. :P https://blog.jquery.com/2011/12/08/what-is-happening-to-the-jquery-plugi...
#88: I think so, except I'd say 3) is probably this form only. Gábor is correct that this is pretty special, at least in terms of what ships with core.
Comment #90
yoroy commentedIterated over a design for this with @Bojhan, @gabor and @webchick:
Comment #91
gábor hojtsyAnd by red Delete link I think what is meant is it should still be a submit button but look like a link. Otherwise page preloaders and other nifty client side tools would delete all your content :D
Comment #92
webchickCool, if that's the spec, my concerns are addressed!
Comment #93
berdirFine with me, just a note on the titles/labels. Not everything really has a label that can be shown there. Flaggings for example don't have a label, so the output there will be pretty weird.
I suppose we can skip the list if we detect that no labels are returned.
Comment #94
timmillwood@Berdir makes a good point, I am here for ContentModerationState entities, which don't have labels. I guess we could compute one if that would be a good UX+.
Comment #95
joachim commentedReversing the position of the action button and the delete seems like a really bad idea to me. People often go for UI elements based on their position without fully reading them. It s the reason OS X dialog boxes always have the confirm button at the bottom right, for instance.
Comment #96
joachim commentedAlso, I think the name of the entity type needs to be in there somewhere. Titles can be ambiguous, and some entities won't have meaningful labels (eg I have no idea what flagging entities show for their titles). So either page title or the total count should include the entity type label in the sentence.
Comment #97
gábor hojtsy@joachim: the point of reversing the buttons was because people don't usually read them and this form can do massive irreversible damage to your site.
Comment #98
ifrikFirst of all: this is a great addition because it stops otherwise unnecessary searching round through the admin interface to find out where whatever comes from, and leads the user straight to the next task at hand.
Second: We don't actually have a separate style for situations in which the default option is to delete something. We got the default action as a blue button, a grey cancel button, and a red link for something destructive - but if the destructive action is the option you came to this page for then it's a blue button.
Since that is the same all over core, it probably doesn't make sense to discuss this here as an isolated event.
Third: In other cases when a user deletes not one item but several, they see a list of these items. So getting a list if you hit the "Remove content items" is the expected behaviour. In fact, I would expect a confirmation page that looks very similar to the one I get when I decide to delete the same items in a different way. (See screenshots.)


In this case it is even more relevant to see such a list, because what we delete here can go across a several entity types - labelled as something that is barely visible in the admin UI.
For example uninstalling the Node module, requires the user to delete content of the entity type: Content - and then it simply says all content items or remove x content items. Nowhere is the user alerted that this means deleting all pages and articles, or what ever custom entity types there are.
So there certainly needs to be a list of items. For deleting content through a bulk operation on the Content page, the length of the list is restricted by the number of items is shown in the View (50 items by default).
Following that: a list of items on the confirmation page can also contain 50 items. It could then have a line at the bottom of the list that says "and xxx other items."
To make this even safer, I would even propose to show the entity type in the list. That would make it really obvious.
Fourth: The action a user does is to delete something, and that's the word we use all over the place. Labelling the link "Remove" makes it sound like a different action (and possibly a less destructive one). So this should in any case say "Delete ...". Same in the help text on the confirmation page.
And fifth: yet another issue: So far we have one permission to administer modules, and that was fine in D7, when modules could be disabled. But since uninstalling modules is a destructive action now, we should think about making Uninstall modules a different permission. That would also make it less likely that somebody stumbles on the Uninstall page.
Comment #99
joachim commented> Nowhere is the user alerted that this means deleting all pages and articles, or what ever custom entity types there are
That's a good point. Maybe in addition to 'X items' and the list of titles, we should give a summary like:
> @joachim: the point of reversing the buttons was because people don't usually read them and this form can do massive irreversible damage to your site.
That is my point though. People don't read them properly, and someone could click the thing that LOOKS like a cancel button, but isn't.
Comment #100
gábor hojtsy@joachim: because of cancel buttons are red links? Or because of the spatial positioning of them? If we want to keep the button orders, colors, etc. because people may click the wrong thing out of habit, then it is hard to dismiss the idea to need to type in something explicitly into a text field.
Comment #101
joachim commentedThe spatial position. I believe it's documented in usability studies that people often go by position of elements. I certainly notice that behaviour in myself. I can easily imagine coming to this page, reading the warnings, thinking 'oops, that doesn't look good' and then clicking what I automatically think is the cancel button but without reading the text of it. (Of course myself I'd just close the tab...)
I think the delete button in red in the usual position would be much better.
Comment #102
amateescu commentedHow about keeping the red delete button on the left but disabled, and add a checkbox above it "I'm sure I want to delete all items", which has to be checked in order to enable the delete button?
Edit: at least this makes it a two-click process, so the user is less likely to do both actions by accident.
Comment #103
amateescu commentedFor now, this patch implements the design that was agreed upon in #90:
Comment #105
joachim commented> How about keeping the red delete button on the left but disabled, and add a checkbox above it "I'm sure I want to delete all items", which has to be checked in order to enable the delete button?
Yup, that sounds good to me. Potentially a UI pattern we could abstract out later on.
Comment #106
Bojhan commentedI prefer not to change direction again. Both a red button and a checkbox have significant implications, and should warrant further discussion.
Lets move ahead with the direction which was agreed upon. We can easily optimise most of this later on and right now its holding up a big initiative from going in. This is experimental, we can change it after commit.
Comment #107
ifrikCan you still change the wording to talk about "Delete" instead of the weaker "Remove"?
Comment #108
gábor hojtsy@Bojhan: to be precise the patch changes various existing parts of the stable Drupal core and therefore is not experimental. The functionality it blocks is experimental but not this patch. That does not mean we cannot make changes to it after the patch lands but much less so to the API at least after 8.2 is released.
Comment #109
joachim commented> Both a red button and a checkbox have significant implications, and should warrant further discussion.
Fair enough. I'd be happy to leave those for later.
However, I do think that the reversed buttons is a big UX mistake.
Comment #110
amateescu commentedFixed and improved the tests for the new UI.
Comment #111
dawehnerNice a usecase for the plural label
Maybe I nitpick and say that this is a URL not a link :P
Am I the only one who things that nobody actually has to care about this number? Deleting an entity throws hooks is much more costly than having x or 10x batch jobs, so I would have just gone with 10 entities or so and call it a day? The batch API deals with starting new processes, when time is gone.
Do we care about content which is created in the meantime?
should we sort by some criteria like ID descending or ascending?
Weird variable name ... can't we just use
$entitiesI love the typo in here
Comment #112
amateescu commentedThanks for reviewing!
Re #111:
Comment #113
amateescu commentedAlso fixed a typo and a comment.
Comment #115
alexpottI seem to be able to break things.
It gets stuck :)
Comment #116
alexpottThis is happen because of deleting parents - see \Drupal\taxonomy\Entity\Term::postDelete()
Here's a simple fix.
Comment #117
amateescu commentedThat's a very simple fix indeed, @alexpott++
Comment #119
yoroy commentedIs the patch in #116 supposed to work on simplytest? I enable forum, create forum node, then go to uninstall forum, which then still has a disabled checkbox, telling me to delete forum nodes first.
Comment #120
alexpott@yoroy well forum does not provide the entity type - the node module does.
Comment #121
berdirYeah, that's a slightly different use case because forum only provides a node type/bundle for nodes.
I think we can relatively easily extend this to support bundles as well, we just need a condition in the entity queries and pass that argument along, but I think we should do a separate issue for that.
Comment #122
alexpottComment #123
alexpottI agree with @Berdir - let's do that in a follow-up.
Comment #125
timmillwoodThis patch looks to be in a good state, and as it's blocking #2725533: Add experimental content_moderation module, lets get it RTBC'd.
Comment #126
joachim commentedThis reordering of the buttons is a really big mistake.
Comment #129
timmillwoodUnrelated #fail.
Comment #130
alexpottBefore we commit this:
Comment #131
alexpottComment #132
amateescu commentedHere's a test for the bug fixed in #116, also applied to the patch from #113 to prove that it's failing.
Wrote a draft CR for this feature: https://www.drupal.org/node/2772525 and this is the followup requested for #121: #2772511: Support uninstalling modules that provide bundles for content entity types
Comment #134
alexpottNice test.
uninstalled :) can be fixed on commit.
Comment #135
alexpottJust re-read #111.3 and realised I caused the additional form element - what I was concerned about was properly testing this whilst batching. The new taxonomy test help resolve this concern. I've removed it and bumped up the number of taxonomy terms created. I've hard-coded the limit to 10.
Comment #136
berdirHm. 10 is a pretty low value IMHO. I guess that's set so low for the term recursive deletion, but even when setting it to 1, there's not really a limit to how many terms it might actually delete?
The problem is that batch overhead is quite high, and when deleting just 10 per batch run, I guess you spend more time on refreshing and bootstraping than actually doing something (batch calls multiple operations but only until 1s is passed).
Just pointing that out, I care way more about actually getting this in than fighting over the limit :)
Comment #137
alexpottI think if you're doing 1000's of entities we should provide an integration with drush.
Comment #138
alexpottFixing the disables
Comment #139
dawehnerWell, it still calls operations until you get near the 1s mark, doesn't it? So the overhead of batch operations should be kind of small over what happens on entity deletion ...
Comment #140
amateescu commentedDiscussed a bit with @alexpott on IRC and we decided to mark
\Drupal\system\Form\PrepareModulesEntityUninstallForm::deleteContentEntities()as @internal in order to make it possible to add additional parameters to it (e.g. $limit or $bundle) in the future without having to worry about BC.Comment #141
yoroy commentedThanks for creating that followup. Quite likely this design can be improved further still, at least we've made an explicit decision here.
Pity the ui issues surfaced a bit late but i'm happy we accomodated for that bit of work to happen still.
Lets go ahead with this!
Comment #142
alexpottHmmm this should be a formatPlural... because saying "And 1 more content items" does not make sense.
Comment #143
alexpottPatch attached:
Comment #144
amateescu commentedMaybe we should also add a check for a non-null $entity_type_id at the beginning of this condition. Or is the routing system handling that for us?
This is pretty minor and can be fixed on commit, the rest of the interdiff looks great :)
Comment #145
xjmWell I would not fix anything more than a coding standards or docs fix on commit, personally. :)
Comment #146
xjmWhile testing this patch to potentially commit it, I accidentally canceled the form the first time instead of deleting the items, because the Cancel button was where the normal "Yeah do this thing" button would be.
I went back and confirmed that I am not crazy; it is different from every other confirm form, including the one that you might have to visit right before you do this (in my case, uninstalling Taxonomy and History in order to be able to uninstall Node and test the batch deletion).
If I can accidentally cancel my form because the button moved, it's not inconceivable that someone might accidentally click the link when they want to cancel. Less likely, perhaps.
I see this design was discussed earlier on the issue, and @Bojhan suggested going forward with it because it was an experimental module and we can iterate on the best design later. The thing is, this is not an experimental module. This is a change to stable core that lets you delete all your content.
Are we really, really, really sure that basically xjm is just an idiot who needs to pay more attention, and that it is better to have the new design for this one form and no other?
Comment #147
xjmI should add that the functionality itself seems to work great, the listing on the confirm form makes it clear what the consequences of the action should be, and the hardcoding at 10 items in the batch job seemed fine based on my testing with large-ish batches (admittedly without 20 other modules firing delete hooks, but nonetheless). I will go ahead and commit it if the usability maintainers say "yes absolutely really". But in the earlier discussion, it did not seem to me that the full consequences of this were clear. Edit: And the first user to test it seems to have gotten it wrong, soooo... :P
Comment #148
twistor commentedI'm curious where the missing conversation is regarding:
Comment #149
alexpottI agree with @xjm's comment in #146. I think the most relevant example is the uninstall screen where we are listing configuration entities that will be deleted. We have not changed the pattern there - so changing the pattern here seems wrong too. I think we need to remember that the only people who can get to this screen are people who can uninstall modules - which is a very data destructive operation already. Maybe the way forward here is to make this form a usual confirm form and open a followup issue to discuss the design of super-destructive confirm forms like this and the module uninstall form - so we can be consistent.
Comment #150
alexpottComment #151
Bojhan commentedGiven that this is critical for getting workflow in. I have no objects to removing the change to confirm forms and create a propper followup to solve this. This is a tricky problem and needs a consistent solution.
I am very concerned about all the WI Criticals that get held up though :(
Comment #152
alexpottOkay removed the special button styling...
Comment #153
alexpottCreated the follow up #2773205: Come up with a design for highly destructive operations in confirm forms
Comment #154
alexpottRe #144 - visiting
admin/modules/uninstall/entityresults in the expected 404 - we don't need to check for NULLness. But also...So all good imo.
Comment #155
webchickI agree we can go ahead with this in the interest of unblocking workflow. I'm confused why #146 is the rationale, though. The accidental click resulted in a non-destructive action, forcing her to go back and read the actual options, which is exactly what it was intending to do.
Comment #157
alexpottFor me the rationale is we already have super-destructive operations that precisely a user with the perms necessary to get here and we don;t special case that form either. I do think we should consider the UX pattern for such forms but the arguments that @joachim put forward about spatial reasoning are strong - after all the accidental click documented in #146 could have been intended to cancel but instead deleted everything.
DrupalCI is busy fixing itself.
Comment #159
webchick@twistor: We discussed that alternate pattern briefly in UX meeting the other week, and it was only really supported by Kevin. Bojhan had done some user-testing of it and found it to increase user frustration, and overall feels like a "cover your ass" cheat, rather than an actual design, IMNSHO. :) But something we can explore in the new sub-issue.
Reviewed this upon @alexpott's request, as well as manually tested it. Couldn't find anything to complain about!
Committed and pushed to 8.2.x. Thanks!
Comment #160
alexpottI created the followup #2773205: Come up with a design for highly destructive operations in confirm forms