Open nelsonic opened 1 year ago
I don't think we should "reinvent the wheel"/try to create a new UX to change lists. "Copying" what people are already familiar with will provide an easier onboarding experience and reduce initial frustration when first tinkering with the app.
I see our lists
in a similar fashion to what happens with Overleaf when tagging documents.
We're just using it for categorization purposes, but with the added benefit of having specific UX for most used lists (shopping lists, exercise logs, for example).
However, thinking of how to implement this, relates to how we are saving our items in our database.
As mentioned in https://github.com/dwyl/mvp/issues/418#issuecomment-1712701585, we don't have any relation between the table items
and lists
. So changing an item from one list to another means having to change the seq
field from a list and add it to another. Is there an efficient way of doing this? ðŸ’
@LuchoTurtle by definition we always want the items
to be in a sequence
in the list
.
So this is already the most efficient way of doing it. We don't need a relation. list.seq
works.
If anything is unclear about this approach, please read the code:
https://github.com/dwyl/mvp/blob/b8aee0e3c29d0cb45025595131248c08fbbf6a31/lib/app/list.ex#L149-L154
It couldn't be easier to add an item
to a list
.
I tried several iterations of having a list_items
table to join the data relationally and they all were more complex than this for maintaining the ordering
(sequence) of the items in the list.
I should have made it clearer in the OP that this issue is specific to the interface that the person
interacts with for adding/moving items
to a list
.
Yes, but I was curious about how we were going to do the moving of an item from one list to another (database-wise, not interface). Is there a more efficient way instead other than:
list.seq
cid
cid
we want to move fromlist.seq
arraycid
to the other list
?Regarding the interface itself, as I've said before, no need to reinvent the wheel. For example, look how Trello is doing things (I know it's not a 1-1 comparable application but the flow looks good to me).
They have a modal option (no-go) that does the same thing.
I would agree with you both that this is both a solved problem and such a core piece of most app functionality that 'reinventing the wheel' here might come back to haunt us as feeling 'incorrect' to some people.
The most common way to do this that I know of is essentially through tags (though I would argue I would prefer list and tags to be separate things, but not necessary in early stages). You just add/remove tags and those are the lists the item is part of (from an interface pov).
Other
list
-based project management tools allowpeople
to easily transferitems
from onelist
to another, How much do we want to "reinvent the wheel" on this functionality vs. just "copying" what people are already familiar with?