# שיפור חווית המשתמש במחיקת קטגוריה עם נושאים בתוכה

**URL:** https://meta.discourse.org/t/improve-ux-for-deleting-category-with-topics-inside/307842
**Category:** UX
**Created:** [14 במאי,‏ 2024,‏ 4:23am UTC](https://meta.discourse.org/t/improve-ux-for-deleting-category-with-topics-inside/307842 "2024-05-14T04:23:54Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![traceymoko](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/traceymoko/32/483235_2.png) [@traceymoko](https://meta.discourse.org/u/traceymoko)
#### Post date: [14 במאי,‏ 2024,‏ 4:23am UTC](https://meta.discourse.org/t/improve-ux-for-deleting-category-with-topics-inside/307842/1 "2024-05-14T04:23:54Z")

</div>

## Context

> **Discussion on other topics**
>
> > [@When we delete a category, what happens to the deleted topics in it?](https://meta.discourse.org/t/when-we-delete-a-category-what-happens-to-the-deleted-topics-in-it/171131/2):
> >
> > You can’t delete a category while it has topics. You’ll see something like this.
> > 
> > ![image](https://global.discourse-cdn.com/meta/original/3X/8/5/852356785a8cd6de20cf48c63b160defb831f7d6.png)
> > 
> > You’ll have to either recategorize the topics or delete them before you can delete the category.
> 
> > [@Include more hints throughout Discourse that link to relevant Docs on Meta](https://meta.discourse.org/t/include-more-hints-throughout-discourse-that-link-to-relevant-docs-on-meta/307749/3):
> >
> > If I try to delete a category, the current behavior is _almost_ desirable. I see the button, usually greyed out but with a questionmark, and if I click it, it says:
> > 
> > > Can’t delete this category because it has sub-categories.
> > 
> > or:
> > 
> > > Can’t delete this category because it has 25852 topics. Oldest topic is…
> > 
> > The behavior is good, I know what’s wrong and what my next step is - delete a bunch of posts and subcategories. It would not be improved by linking to the “delete a category” how-to guide instead.
> > 
> > Of course, it still is a band-aid fix to the real problem: **Why doesn’t it let me delete a category with posts in it?** I can delete folders with subfolders and files on my system, why can’t I delete categories with subcategories and posts? If it didn’t have these weird restrictions, there wouldn’t be a need for a how-to guide in the app to begin with.
> 
> > [@Include more hints throughout Discourse that link to relevant Docs on Meta](https://meta.discourse.org/t/include-more-hints-throughout-discourse-that-link-to-relevant-docs-on-meta/307749/4):
> >
> > For the example there — of not allowing you to delete a category if there are topics in it — a more graceful way of the software handling that could be like this. When you try to delete a category with topics in it, it could first suggest if you would like to:
> > 
> > - move all the existing topics to another category, or
> > - move all the existing topics into Uncategorized (if it exists), or
> > - delete all topics in the category
> > 
> > and then confirming that you would like to delete the category.

## Feature

Instead of disabling the Delete Category button when there are topics inside that category,  
[![](https://global.discourse-cdn.com/meta/original/3X/8/5/852356785a8cd6de20cf48c63b160defb831f7d6.png) ](https://global.discourse-cdn.com/meta/original/3X/8/5/852356785a8cd6de20cf48c63b160defb831f7d6.png)

Discourse could instead first show a modal that includes options for handling the topics, before confirming that you would like to delete the category.

### Mockups

Without option to add tags:

 ![Screenshot_2024-05-21_at_4.26.48 PM](https://global.discourse-cdn.com/meta/original/4X/9/0/6/9060819b160b1e53128b8a63ded41bcdafb184ab.png)

With option to add tags:

 ![Screenshot_2024-05-21_at_4.26.48 PM 3](https://global.discourse-cdn.com/meta/original/4X/a/a/e/aae263151a03eb22072f4b48b044f3500e88e355.png)

### Details

This would save the user from having to exit the category settings page, bulk-selecting the topics in the category and moving them elsewhere.

When you try to delete a category with topics in it, it could first suggest if you would like to:

- move all the existing topics to another category, or
- move all the existing topics into Uncategorized, or
  - (if Uncategorized is not enabled, offer to enable Uncategorized)

- delete all topics in the category

and then confirming that you would like to delete the category.

With the options of moving the topics, it could also offer the option of adding tags to the topics.

---

<div class="post-metadata">

### Author: ![Firepup650](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/firepup650/32/465200_2.png) [@Firepup650](https://meta.discourse.org/u/Firepup650)
#### Post date: [14 במאי,‏ 2024,‏ 10:53am UTC](https://meta.discourse.org/t/improve-ux-for-deleting-category-with-topics-inside/307842/2 "2024-05-14T10:53:27Z")

</div>

> [@traceymoko](#):
>
> put all the existing topics into Uncategorized

That’d need to check if the setting to allow Uncategorized is enabled first.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [14 במאי,‏ 2024,‏ 11:01am UTC](https://meta.discourse.org/t/improve-ux-for-deleting-category-with-topics-inside/307842/3 "2024-05-14T11:01:53Z")

</div>

Just to cross-link a similar recent comment on this as well:

> [@Not being able to delete topic blocks category deletion](https://meta.discourse.org/t/not-being-able-to-delete-topic-blocks-category-deletion/307728/1):
>
> (why not just make it so if you delete a category it deletes all the topics within it?)

---

<div class="post-metadata">

### Author: ![LWinterberg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lwinterberg/32/361644_2.png) [@LWinterberg](https://meta.discourse.org/u/LWinterberg)
#### Post date: [16 במאי,‏ 2024,‏ 8:11am UTC](https://meta.discourse.org/t/improve-ux-for-deleting-category-with-topics-inside/307842/4 "2024-05-16T08:11:43Z")

</div>

It could enable that, too.

---

<div class="post-metadata">

### Author: ![traceymoko](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/traceymoko/32/483235_2.png) [@traceymoko](https://meta.discourse.org/u/traceymoko)
#### Post date: [21 במאי,‏ 2024,‏ 7:12am UTC](https://meta.discourse.org/t/improve-ux-for-deleting-category-with-topics-inside/307842/5 "2024-05-21T07:12:19Z")

</div>

I forgot about the option of adding tags to the topics too, for deleting a category. So I’ve added that here.

Here are initial mockups:

Without option to add tags

 ![Screenshot_2024-05-21_at_4.26.48 PM](https://global.discourse-cdn.com/meta/original/4X/9/0/6/9060819b160b1e53128b8a63ded41bcdafb184ab.png)

With option to add tags

 ![Screenshot_2024-05-21_at_4.26.48 PM 3](https://global.discourse-cdn.com/meta/original/4X/a/a/e/aae263151a03eb22072f4b48b044f3500e88e355.png)

I’ve added these to the OP. Happy to make changes if anyone has suggestions.

---

<div class="post-metadata">

### Author: ![traceymoko](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/traceymoko/32/483235_2.png) [@traceymoko](https://meta.discourse.org/u/traceymoko)
#### Post date: [21 במאי,‏ 2024,‏ 7:15am UTC](https://meta.discourse.org/t/improve-ux-for-deleting-category-with-topics-inside/307842/6 "2024-05-21T07:15:05Z")

</div>

> [@Firepup650](#):
>
> > [@traceymoko](#):
> >
> > put all the existing topics into Uncategorized
> 
> That’d need to check if the setting to allow Uncategorized is enabled first.

> [@LWinterberg](#):
>
> It could enable that, too.

Thanks – added it to the OP  
Meant to handle that case of Uncategorized being enabled or not, but forgot.

---

<div class="post-metadata">

### Author: ![Simon\_Manning](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon_manning/32/198596_2.png) [@Simon\_Manning](https://meta.discourse.org/u/Simon_Manning)
#### Post date: [21 במאי,‏ 2024,‏ 9:49am UTC](https://meta.discourse.org/t/improve-ux-for-deleting-category-with-topics-inside/307842/7 "2024-05-21T09:49:20Z")

</div>

> [@traceymoko](#):
>
> - move all the existing topics into Uncategorized, or
> - (if Uncategorized is not enabled, offer to enable Uncategorized)

I’m not sure if I agree with offering the option to change a site setting in this context. In a community with a number of administrators, one doing housekeeping might choose this option without knowing why it was disabled or understanding the implications of enabling it.

I haven’t looked to see if there is a precedent for offering site settings changes in this way but it seems dangerous to allow settings to be changed as an aside to performing other tasks.

Potentially category deletion is disabled here for a similar reason, i.e. to encourage examining which topics are going to be deleted, though I don’t have a strong opinion about that. If that is true, perhaps the help text for the disabled delete button could be improved with a brief explanation of that.

---

<div class="post-metadata">

### Author: ![LWinterberg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lwinterberg/32/361644_2.png) [@LWinterberg](https://meta.discourse.org/u/LWinterberg)
#### Post date: [24 במאי,‏ 2024,‏ 10:43am UTC](https://meta.discourse.org/t/improve-ux-for-deleting-category-with-topics-inside/307842/8 "2024-05-24T10:43:47Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/4X/f/5/1/f51419bfbfba4b964a1075e22e6199c1aba0cce0.png)

The preference itself is suffering from the very same problem as the posts: It requires you to run about the place cleaning up stuff yourself when it could have a flow to do it automatically.

It is a weird preference to begin with. It’s one thing to require posters to select a category before posting - it’s another if an admin action leaves posts uncategorized.

I see two potential fixes for this:

- Restrict the preference to be about just the “Allow topics to be **created** without a category” bit. This means that this preference would have no effect on moving posts, recategorizing posts by an admin, or stuff falling into it when a category is being deleted.
- Delete the preference altogether and expose an “uncategorized” category in the category overview which can receive per-category permissions just like a normal category could.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [24 במאי,‏ 2024,‏ 11:49am UTC](https://meta.discourse.org/t/improve-ux-for-deleting-category-with-topics-inside/307842/9 "2024-05-24T11:49:54Z")

</div>

One other thing to consider for Uncategorized is that it’s also been semi-replaced by the new default-seeded #General category. Newer sites may have no need for it any longer, though supporting its existence on older ones is likely still a thing.

---

<div class="post-metadata">

### Author: ![traceymoko](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/traceymoko/32/483235_2.png) [@traceymoko](https://meta.discourse.org/u/traceymoko)
#### Post date: [17 ביוני,‏ 2024,‏ 3:46am UTC](https://meta.discourse.org/t/improve-ux-for-deleting-category-with-topics-inside/307842/10 "2024-06-17T03:46:22Z")

</div>

Just linking another case where an administrator had trouble with the current Delete category behaviour

> [@I'm really convinced that I'm being toyed with by a community software](https://meta.discourse.org/t/im-really-convinced-that-im-being-toyed-with-by-a-community-software/311615/4):
>
> I can’t find the area to delete “Channels” and when I try to delete a category it tells me “There are channels in this category that can’t be deleted.”
