Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 Incorrect deletion of categories #187

Open
3 of 7 tasks
ElsaTam opened this issue Feb 6, 2025 · 2 comments
Open
3 of 7 tasks

🐞 Incorrect deletion of categories #187

ElsaTam opened this issue Feb 6, 2025 · 2 comments

Comments

@ElsaTam
Copy link

ElsaTam commented Feb 6, 2025

Check for existing bug reports before submitting.

  • I searched for existing Bug Reports and found no similar reports.

Expected Behavior

When deleting a category with the trash icon, it should delete the category in the same line

Current behaviour

The last category seems to be removed first even if I click on the trash icon corresponding to the first category.
Then, the first trash icon doesn't have any more effect, and the second trash icon deletes the new last category (previously the penultimate).

Reproduction

  1. Create a new Calendar with the Gregorian quick setup
  2. Go in the Events tab

Image

  1. Click on the trash icon next to the first category Natural Events. The last category Miscellaneous Events is deleted instead.

Image

  1. Click on the trash icon next to the first category Natural Events. Nothing happens.
  2. Click on the trash icon next to the second category Christian Holidays. The last visible category Historical Events is deleted instead.

Image

Which Operating Systems are you using?

  • Android
  • iPhone/iPad
  • Linux
  • macOS
  • Windows

Obsidian Version Check

1.8.5 and 1.7.5

Plugin Version

1.5.0

Confirmation

  • I have disabled all other plugins and the issue still persists.

Possible solution

From what I understand, the category is correctly deleted in the backend but the UI doesn't update correctly and an incorrect row is removed.
I used the debugger a little bit and the object containing the category is correct (it doesn't not contain Natural Events after I clicked on the trash icon to remove it, and it contains the 4 others).
But the algorithm to pick the .category row to delete might not be working as expected.

@nikodemus
Copy link

I observed something very similar. Didn't figure out what exactly was happening, but "tried to delete all categories and eventually was left with two that didn't delete", at which point I abandoned that calendar creation attempt.

@ElsaTam
Copy link
Author

ElsaTam commented Feb 7, 2025

@nikodemus You can still switch tab and open it again. The UI will correctly load and you will be able to delete the first one again. From what I understood, the correct item is deleted when you click on the trash icon, but the wrong row is removed from the UI. So going back and forth between tabs will let you delete the one you want since the UI is rebuilt each time. It takes a few more clicks, but it's a workaround while we wait for the bug to be fixed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants