webworka/Tagedit

not working correctly

waynebrantley opened this issue · 5 comments

open your test page at http://tagedit.webwork-albrecht.de/
hti save - shows Merlin as new and little owl as deleted, when I did nothing.

Remove merlin and little owl, add any tag to box, hit save. Shows nothing new, deleted!

looks like a cool deal, just needs a few bugs fixed. Also, perhaps another way to get tags into a box - so it is more clear what to do when you see the empty box - like a little icon they can click to open the dropdown list of items to pick from?

Hi Wayne,

thanks for the hint. There was a small bug in the example page where "Merlin" was marked wrong. The rest is working in my point of view.
What I do not understand is this: "Remove merlin and little owl, add any tag to box, hit save. Shows nothing new, deleted!"
It depends on what you took as input:
a) something from the autocompletion list -> Its displayed at the very end "Tags that are not changed"
b) something completly new (i.e. 'testentry') -> is visible at "Tags that are new"

The "new", "added", "deleted" on the target page are from the database point of view.

The icon would be a could idea. I keep that in mind. Thanks.

Oliver

Wayne, I think the issue here is a mis-interpretation of the workflow. Most tag editors I've seen function a bit differently. It took me a little while to understand this plugin too.

Here is what I am seeing:
When removing an item using this plugin by clicking the default "X", the item is temporarily removed from the current view of the list. Other editors generally see that as a permanent "delete" (and it is up to the user to handle it on the backend).
However, in this plugin it is seen as simply removed from the current list with no changes in the database. So if you refresh the page, technically all items that you temporarily removed would be back. Is this accurate?

And to do a permanent delete you must click the tag, and click the circled "(x)" to get it to be crossed out.

Hi mmezzacca,

You are completly right. The default x is removing from the list, the deletion in edit mode is deleting in the database.
Adding, deleting and editing ons the database has to be handled by the user.

Oliver

This is just a suggestion, but it might make sense to allow the user to choose. Have an option so if they want permanent deletes simply by clicking the default X instead of the current two step process [click tag, then (x)], I think that would be a valuable option. Or it could probably be accomplished with a list of Ids in a hidden input that track which have been removed.

This is how I'm currently using it: If the tag is removed from the current list by the "X" it deletes the current tag-to-object relationship from database. This is accomplished by checking the returned tags versus all the original tag relationships. If they do the hard delete "(x)" (red cross out), it deletes any tag-to-object relationships for that tag, and the tag object entirely.

Sweet plugin by the way!

I close this issue because the unexpected result seems to come from a misunderstanding. Thanks Marc for explanation.

In the next release (today or tomorrow) I'll put the possibility to show the complete list, using the arrow (down/right) key.