Problem with deleting nested tags

palos
Posts: 12
Joined: Tue Apr 26, 2016 11:42 am
Contact:

Problem with deleting nested tags

Postby palos » Sat Apr 22, 2017 2:50 pm

I have note tagged as tag1/tag2. I press F4 and into second field for removing tags type tag1/tag2 and OK.

I expected both tag1/tag2 to be removed. But the note still has tag1 and only tag2 was deleted. I don't know if this behaviour is on purpose or it is a bug. But it is really annoying.

Tested on CN 3.6 Pro, CN 3.7 beta 1 Pro
OS Win7 Home
User avatar
CintaNotes Developer
Site Admin
Posts: 4734
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: Problem with deleting nested tags

Postby CintaNotes Developer » Sat Apr 22, 2017 5:30 pm

Strictly speaking this is not a bug - the behavior is logically correct, removing child tag doesn't automatically imply removing of the parent tag.

However in practice this behavior can be inconvenient, I can understand this.
I'd like to hear a third opinion here. I guess if 2 or more people would support changing the behavior, we'll go for it.
Alex
User avatar
Ovg
Posts: 127
Joined: Mon Feb 02, 2015 8:44 am
Contact:

Re: Problem with deleting nested tags

Postby Ovg » Sat Apr 22, 2017 7:10 pm

I support palos, but only if there are no other notes with the tag1, otherwise data loss can occur.
It's impossible to lead us astray for we don't care even to choose the way.
CN 3.11 LifeTime Pro Licence / Windows 7 SP1 x64
User avatar
CintaNotes Developer
Site Admin
Posts: 4734
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: Problem with deleting nested tags

Postby CintaNotes Developer » Sun Apr 23, 2017 3:58 am

Thanks, Oleg! You're right. Also if the note has both tag1/tag2 and tag1/tag3 tags, then tag1 and tag1/tag3 should stay when you delete tag1/tag2.
Alex
date
Posts: 243
Joined: Sat Aug 01, 2015 5:15 am
Contact:

Re: Problem with deleting nested tags

Postby date » Sun Apr 23, 2017 11:53 am

When you remove 'tag1/tag2,' in the F4-screen, the note is still tagged 'tag1' because you only removed the subtag. However, when you press ctrl-space, it doesn't list tag1 anymore to be a candidate for the removing, but it should.

On the other hand, when you delete 'tag1,' and therefore (logically) remove all subtags as well, when you press 'ctrl-space' 'tag1/tag2' is still listed, which should not be because the removal of the child tag is implied when removing the whole tag1.

So the autocompletion in the F4 screen should be the other way around to reflect how it happens.

Now to the original idea, I can see some practical value in removing both tags because that is how you typed it in and how it might appear will happen. However, what then do you need to type in when you want to delete tag2, but keep the parent tag tag1?
palos
Posts: 12
Joined: Tue Apr 26, 2016 11:42 am
Contact:

Re: Problem with deleting nested tags

Postby palos » Mon Apr 24, 2017 12:32 pm

date wrote: However, what then do you need to type in when you want to delete tag2, but keep the parent tag tag1?


I would suggest writing tag1 to the first edit (in form after pressing F4 for adding/deleting tags).
When you delete tag1/tag2 it is logical to add tag1 if you want it there.

CintaNotes Developer wrote:Also if the note has both tag1/tag2 and tag1/tag3 tags, then tag1 and tag1/tag3 should stay when you delete tag1/tag2.


Yes Alex, of course deleting tag1/tag2 from a note shouldn't affect tag1/tag3.
date
Posts: 243
Joined: Sat Aug 01, 2015 5:15 am
Contact:

Re: Problem with deleting nested tags

Postby date » Mon Apr 24, 2017 2:10 pm

palos wrote:
date wrote: However, what then do you need to type in when you want to delete tag2, but keep the parent tag tag1?


I would suggest writing tag1 to the first edit (in form after pressing F4 for adding/deleting tags).
When you delete tag1/tag2 it is logical to add tag1 if you want it there.

It depends on how you organize your tags whether this is logical thing to do or not. For example, if you have notes tagged as 'objects,' and some of those objects you tagged as 'objects/connected' or 'objects/disconnected,' if you select several of those and remove the tag 'objects/connected,' it is not logical to have to add 'objects' again.
On the other hand, when you for example mark some notes with a year, and add those years under a tag 'year' to keep the taglist organized, when you remove the tag 'year/1991' then it is logical to expect to have both tag year/1991 and tag year removed from those notes. Because just 'year' doesn't mean anything.
In the edit window, this is not a problem because you have immediate visual feedback on what you removed, but on the F4 screen, I can understand it is less clear.
palos
Posts: 12
Joined: Tue Apr 26, 2016 11:42 am
Contact:

Re: Problem with deleting nested tags

Postby palos » Mon Apr 24, 2017 4:25 pm

date wrote:For example, if you have notes tagged as 'objects,' and some of those objects you tagged as 'objects/connected' or 'objects/disconnected,' if you select several of those and remove the tag 'objects/connected,' it is not logical to have to add 'objects' again.

I understand what you mean.

So, maybe a switch somewhere in settings would be a solution? Setting like "delete child tag only" vs. "delete child and parent tags"

If you edit one note it is easy, in edit window you can see all tags, you don't even need to use F4 for adding/removing tags.
But if you have a group of notes and you want delete tag1/tag2 at once, it's now a nightmare. And moreover, I have not mentioned the case tag1/tag2/tag3 :)
date
Posts: 243
Joined: Sat Aug 01, 2015 5:15 am
Contact:

Re: Problem with deleting nested tags

Postby date » Mon Apr 24, 2017 8:07 pm

palos wrote:So, maybe a switch somewhere in settings would be a solution? Setting like "delete child tag only" vs. "delete child and parent tags"
A checkbox in the F4 screen, under the remove tags input field, saying 'including parent tags' is more appropriate. But far from ideal, because it is not obvious what this checkbox does if you don't understand.

If you edit one note it is easy, in edit window you can see all tags, you don't even need to use F4 for adding/removing tags.
But if you have a group of notes and you want delete tag1/tag2 at once, it's now a nightmare. And moreover, I have not mentioned the case tag1/tag2/tag3 :)
You just remove tag1, and it will remove all subtags as well. But I agree it is not obvious. To accomodate for both kinds of logic, and make it clear what will happen, I see no straightforward solution (atm) other than making the F4 screen look different than it is now.
User avatar
CintaNotes Developer
Site Admin
Posts: 4734
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: Problem with deleting nested tags

Postby CintaNotes Developer » Tue Apr 25, 2017 2:52 pm

Indeed, there are pros and cons for both ways. Introducing a global option is not a real solution, I think that the decision to delete or to retain parent tags shoud be made in each case separately.

Another option could be to introduce special syntax for including parent tags into the set, for example:

"tag1/tag2" means just the bottom tag tag2.
"[tag1/tag2]" means both tags tag1 and tag1/tag2

But it is another non-trivial complication.
Alex
palos
Posts: 12
Joined: Tue Apr 26, 2016 11:42 am
Contact:

Re: Problem with deleting nested tags

Postby palos » Tue Apr 25, 2017 4:00 pm

date wrote:tag1/tag2/tag3 :) You just remove tag1, and it will remove all subtags as well.

But in case tag1/tag2 and tag1/tag3 such a removing will remove both tags (tag2 and tag 3), so it is not ideal too (but far better than I did it it until now).

CintaNotes Developer wrote:"tag1/tag2" means just the bottom tag tag2.
"[tag1/tag2]" means both tags tag1 and tag1/tag2
But it is another non-trivial complication.

I agree it is not trivial, moreover it is not very comfortable. You can't do it ''fast". If you start type [ then the auto completion doesn't work, etc.

date wrote:A checkbox in the F4 screen, under the remove tags input field, saying 'including parent tags' is more appropriate. But far from ideal, because it is not obvious what this checkbox does if you don't understand.

I would go to date's solution. Maybe the last checkbox status could be memorized and preloaded with next F4.
And a contextual pop-up bubble with the mouse cursor over the checkbox is relatively simple to program.
User avatar
CintaNotes Developer
Site Admin
Posts: 4734
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: Problem with deleting nested tags

Postby CintaNotes Developer » Tue Apr 25, 2017 4:32 pm

I think it's possible to implement a very convenient way how CN can make decision semi-automatically.

The main difference is this: if there exist notes having tag1 on its own (but not tag1/tag2 etc.) , then it should be retained.
If such notes don't exist, tag1 should be removed together with tag2.
Alex
palos
Posts: 12
Joined: Tue Apr 26, 2016 11:42 am
Contact:

Re: Problem with deleting nested tags

Postby palos » Tue Apr 25, 2017 5:41 pm

CintaNotes Developer wrote:I think it's possible to implement a very convenient way how CN can make decision semi-automatically.

The main difference is this: if there exist notes having tag1 on its own (but not tag1/tag2 etc.) , then it should be retained.
If such notes don't exist, tag1 should be removed together with tag2.


So for deleting tags after pressing F4 you would type tag1/tag2 ?
date
Posts: 243
Joined: Sat Aug 01, 2015 5:15 am
Contact:

Re: Problem with deleting nested tags

Postby date » Tue Apr 25, 2017 6:40 pm

palos wrote:
date wrote:tag1/tag2/tag3 :) You just remove tag1, and it will remove all subtags as well.

But in case tag1/tag2 and tag1/tag3 such a removing will remove both tags (tag2 and tag 3), so it is not ideal too (but far better than I did it it until now).
This is how it works now, the same way as removing directories. But the autocompletion feature doesn't reflect that, I would say that is kind of like a bug.

I think it's possible to implement a very convenient way how CN can make decision semi-automatically.

The main difference is this: if there exist notes having tag1 on its own (but not tag1/tag2 etc.) , then it should be retained.
If such notes don't exist, tag1 should be removed together with tag2.
This makes perfect sense.

So for deleting tags after pressing F4 you would type tag1/tag2 ?
If you use tag1 for 'categorizing' other tags, so tag1 has no notes without subtags, then yes. Sounds like a perfect idea to me.
palos
Posts: 12
Joined: Tue Apr 26, 2016 11:42 am
Contact:

Re: Problem with deleting nested tags

Postby palos » Tue Apr 25, 2017 7:46 pm

Yes, it will be perfect. I'm looking forward to it.
User avatar
CintaNotes Developer
Site Admin
Posts: 4734
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: Problem with deleting nested tags

Postby CintaNotes Developer » Wed Apr 26, 2017 3:47 am

However this won't work so well for the first-time use of tags. And it also introduces dependency on existing notes which is hard to guess for the user.
So I'm still in doubts, frankly speaking.
Alex

Return to “Bug Reports”