[Enhancement]: In chapter editor, make deletions of chapters soft deletes until saved #2248

Closed
opened 2026-04-25 00:05:26 +02:00 by adam · 2 comments
Owner

Originally created by @ZLoth on GitHub (Sep 11, 2024).

Type of Enhancement

Web Interface/Frontend

Describe the Feature/Enhancement

When deleting chapters using the chapter editor, the deletions should be "soft deleted" until saved so that deletion can be undone. Deleted chapters should have the input boxes removed, the text of both the runtime and chapter name are modified to use the strikethough HTML tag, and possibly changing the color from while to another color. If you click the minus sign again, then the change is undone, and the input boxes are restored.

Why would this be helpful?

As currently designed, the chapter editor is a "hard delete" which means that once the chapter is deleted, it cannot be undeleted unless you refresh the page. This can be a problem if I'm deleting duplicate chapters and hit the minus sign one-too-many times.

Future Implementation (Screenshot)

image

Audiobookshelf Server Version

v2.13.4

Current Implementation (Screenshot)

image

Originally created by @ZLoth on GitHub (Sep 11, 2024). ### Type of Enhancement Web Interface/Frontend ### Describe the Feature/Enhancement When deleting chapters using the chapter editor, the deletions should be "soft deleted" until saved so that deletion can be undone. Deleted chapters should have the input boxes removed, the text of both the runtime and chapter name are modified to use the strikethough HTML tag, and possibly changing the color from while to another color. If you click the minus sign again, then the change is undone, and the input boxes are restored. ### Why would this be helpful? As currently designed, the chapter editor is a "hard delete" which means that once the chapter is deleted, it cannot be undeleted unless you refresh the page. This can be a problem if I'm deleting duplicate chapters and hit the minus sign one-too-many times. ### Future Implementation (Screenshot) ![image](https://github.com/user-attachments/assets/7d268799-6375-42e6-b899-85450e3094ec) ### Audiobookshelf Server Version v2.13.4 ### Current Implementation (Screenshot) ![image](https://github.com/user-attachments/assets/6d20466e-337e-4508-8cbc-4362b59ccaa5)
adam added the enhancement label 2026-04-25 00:05:26 +02:00
adam closed this issue 2026-04-25 00:05:26 +02:00
Author
Owner

@advplyr commented on GitHub (Sep 11, 2024):

There is actually a button to reset the changes so you don't have to refresh the page.

image

Keeping the removed chapters there would complicate the UI since we are iterating through the chapters and validating. We would have to store removed chapters and their index in another array then merge them just for display purposes.

I don't see the effort involved in doing that being worth it. I also prefer not to see the chapter there once I remove it and before I hit save.

The chapter editor will eventually be refactored. There is a lot of changes I want to do and a lot of changes that have been suggested.

@advplyr commented on GitHub (Sep 11, 2024): There is actually a button to reset the changes so you don't have to refresh the page. ![image](https://github.com/user-attachments/assets/ce0909bd-3cf4-4200-bd08-e204e468b46f) Keeping the removed chapters there would complicate the UI since we are iterating through the chapters and validating. We would have to store removed chapters and their index in another array then merge them just for display purposes. I don't see the effort involved in doing that being worth it. I also prefer not to see the chapter there once I remove it and before I hit save. The chapter editor will eventually be refactored. There is a lot of changes I want to do and a lot of changes that have been suggested.
Author
Owner

@ZLoth commented on GitHub (Sep 11, 2024):

I understand. Being able to import chapters from metatag information is more important to me.

@ZLoth commented on GitHub (Sep 11, 2024): I understand. Being able to import chapters from metatag information is more important to me.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2248