# Improve UX for deleting category with topics inside

**URL:** https://meta.discourse.org/t/improve-ux-for-deleting-category-with-topics-inside/307842
**Category:** UX
**Created:** [May 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:** 1
**Showing post:** 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: [May 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.

---

_[View the full topic](https://meta.discourse.org/t/improve-ux-for-deleting-category-with-topics-inside/307842)._
