Clicking new in set list selects/edits title of existing item

Describe the bug
Clicking new (+) in a set selects an existing item in the list of objects and starts editing the item’s title, rather than opening a new object creation dialog. This happens with both the bottom and upper right (+) buttons, however, clicking the upper right button also re-orders the list.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a set with a list of existing objects.
  2. Click on new (+) either at the bottom or upper right.
  3. See an error: the title of an existing item is selected.

Expected behavior
Should have opened a dialog for

System Information:
Ubuntu 20.04 with Anytype 0.23.5

Is this the same issue or different?
https://community.anytype.io/t/existing-task-gets-focus-when-adding-new-task-to-filtered-set/4429

The issue described here seems slightly different but might have the same underlying issue. In the issue I describe a new object is created but the wrong item is getting focus/activated to be edited, but my issue is with filtered lists, and it is not clear whether the issue described here is on a filtered set or unfiltered set. The view is called All, but it can still be filtered. @kpw is your view filtered in this example?

Edit: just tried to reproduce the issue described here and could not. Tested the “+ New” at the bottom of the Set and the “+” at the top rigth of the Set. But I’m on Windows 11 and @kpw is on Ubuntu…

Yes it filtered, by tag in this case. I wasn’t aware that anything got created though in my case, but I just checked and it appears that a bunch of blank items (without the correct tag) were added to the set, but hidden from view until I removed the filter.

I guess what’s happening is that my filter is blocking the item from appearing the UI list and so the top item is grabbing focus instead of the newly created (but invisible) item.

1 Like

All right, good to hear it is also a filtered Set! Even though the OSes are different, I would assume it is then the same issue. I’ll link to this post in my post to indicate this issue is also present on Ubuntu.

Thanks for making that linkage! It never occurred to me that the filter might have an effect, but that makes complete sense, and wouldn’t be OS specific. I can imagine adding new items that meet the filter criteria could be a little tricky depending on how complex the filters are… I wonder if there’s a different uI paradigm that’s needed here (e.g. “+ new” → “create object that matches X criteria”)

Not sure what I would expect or prefer as an end user:

  1. The created object is shown in the filtered view and created with all properties matching the active filters (what you describe), or,
  2. The added object is created without any specific properties apart from the defaults for the Set Type, and it is only temporarily shown in the filtered list after creation. Then after X seconds, or after switching away from and back to the view in which the item was created, the object is filtered out like any other object and no longer visible in the filtered Set view.

I’m curious what you and others would expect or prefer!

Edit: interestingly, I just tried to reproduce this issue on my own setup and could not reproduce this in all of my filtered views! I’m still trying to pinpoint the exact reason why this is happening in some filtered views but not in all…

1 Like

I think I’d expect 1. but don’t know how that would work with filters with complex boolean (e.g. an “any of” filter were tag is X or Y?). The two mostly logical approaches I can think of are:

  1. Create an object with the union of the filter criteria (tag: X, Y)

  2. Present the user with choosing the these when the object is created. Maybe it pops up the object creation dialog box, and has the filter criteria repopulated. But the options the user choose before closing have to match a valid filter criteria or a warring pops up saying this wont appear in the set?

IDK, this is pretty tricky…

OK, I think this issue is linked to at least the built-in Status relation. As soon as I add a filter on the Set for relation Status (any filter as long as it is not set to “All”) the issue is present. Having the relation “Status” visible or not visible as a column in the Set or not does not seem to affect this. I have tested this with a range of different filters for different Types, both built-in (like “Done” and “Human”) and custom Types I created myself.

2 Likes

Describe the bug
When adding a new item (for example an object of type Task) to an existing Set of type Task that is not filtered, a new item is added and get focus so the user can type the Name of the new object:

Before click on “+ New”:
image

After click on “+ New”:
image

When doing the same thing in a Set that has filters active, the last object in the Set gets focus instead of a new object being added:

Before click on “+ New”:
image

After click on “+ New”:
image

However, a new object is added to the Set with Name == Untitled!
image

To Reproduce
Steps to reproduce the behavior:

  1. Open anytype
  2. Open a view in a Set that has filters active
  3. Scroll down to the bottom of the Set if needed so you can see the “+ New” option
  4. Click the “+ New” option to add a new Object in the Set.
  5. See that the last Object in the Set gets focus and if you start typing, it is appended to the existing name (which is already better than replacing the original, but still not the desired outcome!)
  6. Now switch to the “All” View and see that a new Object is created with Name “Untitled”

Expected behavior
I expect the same behavior for both filtered and unfiltered Sets: when you click “+ New” at the bottom of the Set, a new Object should be added and it should get focus so you can start typing its Name right away.

System Information:

  • OS: Windows 11 x64
  • Device Manufacturer/Model: Dell XPS 15
  • Anytype Version: 0.23.5 Desktop

Additional context
In addition, it would be great if the new Object is only created when something is typed in the Name field, as the Object is still created with Name “Untitled” if you don’t type and “cancel” your action by clicking elsewhere in the UI. I would expect the Object to NOT be created at all in that case.

After clicking the “+ New” button, a new line in the Set is created for the new Object:
image

After clicking elsewhere in the UI to make sure the new Object’s Name field does not have focus anymore, the Object is created and gets its name “Untitled”
image

4 Likes

@Razor is this bug on the radar of the Anytype devs? It is quite an annoying bug because Sets are so central to the usage of Anytype. Let me know if there is anything I can do to clarify or demonstrate the bug on my system.

@kpw this seems to be fixed in the 0.28.0 release. Could you check?

This topic was automatically closed after 8 days. New replies are no longer allowed.