Editing an existing tag should not result in creating a new entity or referencing another existing one

Created on 1 April 2024, 10 months ago
Updated 10 April 2024, 9 months ago

Problem/Motivation

In Add the ability to show extra metadata in results Needs work , I raised a point about editing tags, expecting it to be a bug:

Now [when I inline edit the title of an already referenced entity] the changes aren't discarded anymore after pressing enter, but they also aren't saved after submitting the form. Did it work like this before? Are you supposed to be able to change the titles of referenced entities in the Tagify widget? If so, this should be fixed.

@gxleano, the maintainer, answered this:

It seems there might be a misunderstanding about how tag editing works. When you edit a tag, it doesn't automatically update the referenced content associated with that tag. Instead, the tag itself is modified. For example, if you change a tag from 'Orange' to 'Apple', it simply updates the tag label. If 'Apple' already exists, it switches to that tag; otherwise, it creates a new tag (if auto-creation is enabled). This functionality has always worked in this way.

I have thought about this more and I really think this behaviour is counterintuitive and confusing. When editing an existing entity label, you would never expect a new entity to be created (when autocreate is turned on) or another entity to be referenced (when accidentally entering the label of an existing entity).

Proposed resolution

I think it would make more sense to turn off tag editing, requiring people to remove a tag and re-add it if they want to reference something else. The fact that there's no autocomplete makes it so people won't expect another entity to be referenced when changing the label.

📌 Task
Status

Fixed

Version

1.2

Component

Code

Created by

🇧🇪Belgium dieterholvoet Brussels

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024