Issue: New relation suggests creating existing entity, which leads to duplication

image

In this example, I like to assign the tag ‘gpt’ to a Page, and when I type in gpt in the search box, it shows the existing tag but also suggests to create the same tag.

Apart from this being unncessary, people sometimes accidentally click the Create button so that tags are duplicated.

Solution: remove the ‘Create XX’ button when the entity XX is already present.

Do you want other users to not be able to create new tags at all?
If so, you could just make sure that the users do not have editor permissions in the space where the Tag db lives.

This is also what we experience.

Our users need to create new tags themselves. So we can’t solve it with permissions since they need editing rights.

We have the same end goal as Yuri: make sure user links an existing entity instead of accidentally creating a new one.

1 Like

In that case, it seems that you need Fibery to prevent any attempt to create a new tag/entity with the same name as an existing one, which sounds rather like uniqueness constraints (as part of the more generic ‘validation rules’):

Yes, that’s an option. But I also hope that we could avoid things via user interface. Since the difference between link existing and create new one is not very clear.

We’re facing the same problem in other areas with link or create (in list views for example). Don’t know what the UI best practices are, but I hope that there are possibilities.

My point was, we can’t eliminate the ‘Create’ option if you want users to be allowed to create their own tags (so long as they choose a name not already taken).

If I understand Yuri’s proposed solution:

the visibility of the ‘Create …’ option would need to be determined based on a uniqueness check, the outcome of which could change as a user types each character.

For example, if tags A, ABC, ABC1, ABC12 already existed, then as the user starts typing the letters A…B…C…1…3 the ‘Create…’ option would initially not be present (because A matches), then it would appear (because AB does not match anything) then it would disappear (ABC matches, ABC1 matches) then it would reappear (ABC13) does not match anything.

I’m not saying it’s not possible, I just don’t know if it would be a pleasant experience.

FYI, the current behaviour is that the list of options shrinks as you start typing, and if you press enter, the top match is chosen (in preference to creating a new entity). A user has to actively choose to create a new entity with the same name.

Correct, the visibility of the ‘Create …’ option would need to be determined based on a uniqueness check.

I think it can be implemented as follows:

  1. Attach a listener to the entity input field to detect user typing.
  2. Compare the input against existing entity names in the select options.
  3. If a match is found:
    – Disable or hide the ‘Add’ button.
    – Optionally, provide a tooltip explaining why it’s disabled.
  4. Use a debounce function to optimize performance, ensuring checks occur after brief pauses in typing.
  5. Test the functionality for accuracy and responsiveness.

I think it is no doubt possible, but I do not expect it will be done very soon. We don’t have a lot of feedback that this is an issue for a lot of people, and the solution described might not be desirable for all users, implying that there would need to be a setting to enable/disable the uniqueness requirement.
Also, this is likely to only work at the GUI level, and I can imagine we may wish to put in validation rules at the backend level instead.

About my experience, when creating new entities in rich text (text selecting + Ctrl E, I dont know is it existed or not, so sometimes I got duplicated entities.
Also I should recommend alias name for entities like Obsidian when mention some entities. Ex [[Peolple A]] can be mention by [[alias_name|People A]] ⇒ it’ll dislay alias_name as People A in rich text

1 Like

I just found out that I only have the issue when I select an item (click with mouse).

I’m currently migrating a bunch of stuff from select fields to database fields. While doing that, I’m only typing + press enter.

If you do that, you won’t face problems. I think most people do that (really don’t know why I’ve used my mouse before; this is better for my RSI also :joy:)

1 Like