The Operations Menu for a Taxonomy contains "Edit Vocabulary" but does not contain "Delete Vocabulary".

The Operations Menu for Menus and Content Types contains both "Edit" and "Delete".

I believe the Operations Menu for these two should be consistent within the context of /admin/structure. I've been working with Menus and Taxonomies all day. My preference would be to add "Delete Vocabulary" to the Taxonomy Operations Menu.

Files: 
CommentFileSizeAuthor
#49 interdiff-40-49.txt754 bytesgaurav.kapoor
#49 Adding-delete-vocabulary-2621626-49.patch1.79 KBgaurav.kapoor
#44 Adding-delete-vocabulary-2621626-0-6.patch994 bytesalokbhatt
#40 Adding-delete-vocabulary-2621626-0-5.patch945 bytesalokbhatt
#35 Adding-delete-vocabulary-2621626-0-4.patch1.13 KBalokbhatt
#32 Adding-delete-vocabulary-2621626-0-4.patch1.13 KBalokbhatt
#29 Adding-delete-vocabulary-2621626-0-3.patch1.07 KBalokbhatt
#24 interdiff.txt455 bytesgaurav.kapoor
#24 Adding-delete-vocabulary-2621626-24.patch893 bytesgaurav.kapoor
#21 git_bash_no_warnings.png169.21 KBDinesh18
#18 Adding-delete-vocabulary-2621626-0-2.patch904 bytesalokbhatt
#15 patch_warning_gitbash.png158.57 KBDinesh18
#15 after_patch2.png187.07 KBDinesh18
#15 after_patch1.png194.71 KBDinesh18
#15 Before_patch.png192.21 KBDinesh18
#13 Patch_failed.png169.52 KBDinesh18
#11 Adding-delete-vocabulary-2621626-0-1.patch953 bytesalokbhatt
#6 Adding-delete-vocabulary-2621626.patch952 bytesalokbhatt

Comments

Greg Sims created an issue. See original summary.

cilefen’s picture

Version: 8.0.0 » 8.1.x-dev
Category: Bug report » Feature request
Issue summary: View changes

I think this issue makes sense.

This is on the fine line between a bug, a feature, or a task. I am going with feature, which postpones it to 8.1.x.

Greg Sims’s picture

@cilefen I understand why you might call this a Feature Request. Why would you defer it to 8.1.x? My understanding is this is 6+ months away. Perhaps it should be called a Human Factors Bug in the GUI.

cilefen’s picture

a) I could be wrong. ;-)

b) If it is a feature request, by definition it moves to 8.1.x. Actually the same is the case for "string, markup, user interface, or render array changes", which this issue is as well.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

alokbhatt’s picture

Assigned: Unassigned » alokbhatt
Status: Active » Needs review
FileSize
952 bytes

Added "Delete vocabulary" link as suggested.

Status: Needs review » Needs work

The last submitted patch, 6: Adding-delete-vocabulary-2621626.patch, failed testing.

alokbhatt’s picture

Status: Needs work » Needs review

May I know the cause of patch failure? The functionality is working fine at my end.
Does it failed after applying the patch?

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

alokbhatt’s picture

Please review new patch

alokbhatt’s picture

Thanks for review. Please move to rtbc.

Dinesh18’s picture

Status: Needs review » Needs work
FileSize
169.52 KB

I tried applying the patch, but the patch does not apply. PFA screenshot Patch_failed.png.
We need to work on the patch.

alokbhatt’s picture

Priority: Normal » Critical
Status: Needs work » Needs review

@Dinesh18 : Kindly test it with Drupal 8 current Development version.

Dinesh18’s picture

FileSize
192.21 KB
194.71 KB
187.07 KB
158.57 KB

Hello,

#11 patch is working properly. PFA screenshots for different scenarios.
Also, PFA git bash warning errors which needs to be resolved.

Dinesh18’s picture

Status: Needs review » Needs work

Need to work on patch to remove warnings.

swentel’s picture

Priority: Critical » Normal

There's no reason to move this to critical suddenly

alokbhatt’s picture

@Dinesh18 : New patch won't give the warning. Thank you for review it. Please check again new patch.

alokbhatt’s picture

Status: Needs work » Needs review
cilefen’s picture

Category: Feature request » Task

If there is broad agreement, this may as well be a task.

Dinesh18’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
169.21 KB

@alokbhatt : I have tested the new patch #18 and it doesn't give any warnings in git bash and it is working as expected. PFA screenshot
Changing the status to RTBC

lauriii’s picture

It would be great to have UI review from a product manager on this.

yoroy’s picture

Title: Add "Delete Vocabulary" » Add a "Delete" link for vocabularies on the vocabulary listing page
Status: Reviewed & tested by the community » Needs work
Issue tags: -Needs product manager review +Usability

The other listings where there is a delete link (content types, views, custom block types, view modes, likely others as well) the label is only "Delete", not "Delete ", so I think we should do that here as well. The position of the link is correct: it should be the last one.

Thanks for working on this!

gaurav.kapoor’s picture

Status: Needs work » Needs review
FileSize
893 bytes
455 bytes
gg24’s picture

Assigned: alokbhatt » Unassigned
Status: Needs review » Reviewed & tested by the community

Patch works as intended for me.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/taxonomy/src/VocabularyListBuilder.php
@@ -36,6 +36,10 @@ public function getDefaultOperations(EntityInterface $entity) {
+    if (isset($operations['delete'])) {
+      $operations['delete']['title'] = t('Delete');
+    }
+

This is not necessary the default title is 'Delete' ... plus t() would be wrong here - and yes it is wrong above.

Also I think we should file a followup issue to review the order of the vocabulary operations and consider changing "Edit vocabulary" to "Edit" to match content types etc... In my opinion the order should be the same as what you see on admin/structure/types for content types (which is the same as you see on admin/structure/block/block-content/types and admin/structure/comment) but with "Add terms" and "List terms" first because these are the most common operations for people - happy to defer that to a UX expert though. What I'm pretty sure about is that the order on admin/structure/taxonomy is pretty odd.

alokbhatt’s picture

Can we have clear requirement? Because initially there was no such comment on link title and if I am not wrong issue was about "Delete" link was not there and depends on that I made a patch file.

yoroy’s picture

Current situation:

  • There is no link to delete a vocabulary in the dropbutton on the vocabulary listing page

Desired situation:

  • Add a delete link to the dropbutton.
  • The label should be "Delete".
  • The link should be the very last one in the dropbutton.

Additional steps

  • Create a new issue to improve the overall sorting of items in this dropbutton.
  • @alexpott is right in that the ordering should be more consistent with similar dropbuttons. You can copy-paste his last paragraph of #26 there in the issue body.

Does that help?

alokbhatt’s picture

Yes, that is clear.

@alexpott: Please clear the order, it should like below:
List terms
Add terms
Manage fields
Manage form display
Manage display
Edit
Delete

Please correct the order if not suitable, also publishing new path with the same. Please review new patch.

As you said t() is not required that doesn't make sense to me, because it is labels which should be translatable, correct me if I am wrong.

alokbhatt’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 29: Adding-delete-vocabulary-2621626-0-3.patch, failed testing.

alokbhatt’s picture

alokbhatt’s picture

No sure why the patch is not going into the queue for testing, so I am uploading it again.

alokbhatt’s picture

Status: Needs work » Needs review

The last submitted patch, 32: Adding-delete-vocabulary-2621626-0-4.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 35: Adding-delete-vocabulary-2621626-0-4.patch, failed testing.

Berdir’s picture

+++ b/core/modules/taxonomy/src/VocabularyListBuilder.php
@@ -33,9 +33,13 @@ public function getDefaultOperations(EntityInterface $entity) {
+      $operations['edit']['title'] = t('Edit');
...
+    if (isset($operations['delete'])) {
+      $operations['delete']['title'] = t('Delete');
+    }

what Alex is saying is that these lines are not necessary because those are the default labels from the parent method. Just remove them and it will look the same.

alokbhatt’s picture

@Berdir: Thanks for review. Please review new patch.

alokbhatt’s picture

Status: Needs work » Needs review
Berdir’s picture

Status: Needs review » Needs work

A test is looking for an edit vocabulary link, you need to update that to use just Edit

alokbhatt’s picture

@Berdir: You suggest to remove "Edit" line in #32, anyways I tested in my local machine, it shows "Edit" only.

alokbhatt’s picture

Please check updated patch.

alokbhatt’s picture

Status: Needs work » Needs review

The last submitted patch, 40: Adding-delete-vocabulary-2621626-0-5.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 44: Adding-delete-vocabulary-2621626-0-6.patch, failed testing.

Berdir’s picture

No, you misunderstood.

The previous patch was fine. But as you can see, it has a failing test that we need to fix. In VocabularyUiTest.php, it is still looking for "Edit vocabulary", that's what you need to update. That and going back to the patch from #40.

gaurav.kapoor’s picture

Status: Needs work » Needs review
FileSize
1.79 KB
754 bytes
SwapS’s picture

Status: Needs review » Needs work

@yoroy -I would propose to keep Lable as 'Delete Vocabulary'.
For other cases like content types or menus - Delete , Edit lables are making clear sense.
But Vocaulary will have terms associated with it . Also 'List terms' , 'Add terms' links are also there in the dropdown .
Keeping link label as 'Edit Vocabulary' and 'Delete Vocabulary' would give better experience.

Current situation:
There is no link to delete a vocabulary in the dropbutton on the vocabulary listing page
Desired situation:
Add a delete link to the dropbutton.
The label should be "Delete Vocabulary".
The link should be the very last one in the dropbutton.

*Maybe we can also update 'Add terms' lable to 'Add term'

Cheers,
SwapS

yoroy’s picture

Well, deleting a vocabulary *also* deletes its terms. Which is tricky in itself, but I don't think "Delete vocabulary" instead of "Delete" helps with that. If anything, it might even suggest that the terms inside might not get deleted.