cozy / cozy-contacts-v2

Contact books manager for Cozy
http://cozy.io
GNU Affero General Public License v3.0
20 stars 20 forks source link

Labels can only be added, never removed #289

Open Phyks opened 7 years ago

Phyks commented 7 years ago

Hi,

I have some empty labels in my contact apps, but it seems they cannot be removed. Would be really cool if there was a way to remove empty labels.

Thanks

EDIT: Actually, this might be a duplicate of https://github.com/cozy/cozy-contacts/issues/290 as a forced restart of the app clears empty labels.

clochix commented 7 years ago

Thanks for reporting @Phyks,

Could you describe the steps to reproduce this issue?

I have a contact with some specific labels. When I edit it and uncheck the labels, they disappear from the dropdown list but not from the contact popup. As soon as I close the popup, this labels disappear from the left menu.

Phyks commented 7 years ago

Ok, here are some steps to reproduce it.

capture d ecran 2016-09-14 a 14 50 06 capture d ecran 2016-09-14 a 14 52 20
clochix commented 7 years ago

Thanks, I was able to reproduce. This only happens if app was not reloaded after label creation. Also, when creating a new label, it's added at the top in the left menu, and not in the correct sort order.

Thanks for reporting!

Phyks commented 7 years ago

Thanks for investigating it further :)

Phyks commented 7 years ago

@clochix btw, I checked and labels seem to never be sorted (alphabetically at least). Where are they supposed to be sorted?

Phyks commented 7 years ago

Also, it may be somehow linked to https://github.com/cozy/cozy-contacts/issues/174.

clochix commented 7 years ago

I don't know where labels are supposed to be sorted, but, this is what I see in the UI: after adding a label and reloading the page, the labels are alphabetically sorted.

Phyks commented 7 years ago

Indeed, labels are sorted after a full page refresh, my bad :/