Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discuss: Interface for Moving an item from one list to another list? #420

Open
Tracked by #165
nelsonic opened this issue Sep 10, 2023 · 5 comments
Open
Tracked by #165
Labels
discuss Share your constructive thoughts on how to make progress with this issue enhancement New feature or enhancement of existing functionality good first issue Good for newcomers help wanted If you can help make progress with this issue, please comment! needs-design A feature idea that needs some interface design in order to be discussed/built. priority-1 Highest priority issue. This is costing us money every minute that passes. question A question needs to be answered before progress can be made on this issue research Research required; be specific starter A beginner-friendly issue that is a good starting point for a new person T25m Time Estimate 25 Minutes user-feedback Feedback from people using the App

Comments

@nelsonic
Copy link
Member

Other list-based project management tools allow people to easily transfer items from one list to another,
How much do we want to "reinvent the wheel" on this functionality vs. just "copying" what people are already familiar with?

@nelsonic nelsonic added enhancement New feature or enhancement of existing functionality help wanted If you can help make progress with this issue, please comment! good first issue Good for newcomers question A question needs to be answered before progress can be made on this issue T25m Time Estimate 25 Minutes priority-1 Highest priority issue. This is costing us money every minute that passes. user-feedback Feedback from people using the App starter A beginner-friendly issue that is a good starting point for a new person discuss Share your constructive thoughts on how to make progress with this issue research Research required; be specific needs-design A feature idea that needs some interface design in order to be discussed/built. labels Sep 10, 2023
@LuchoTurtle
Copy link
Member

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.

image

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.

image

As mentioned in #418 (comment), 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? 💭

@nelsonic nelsonic mentioned this issue Sep 13, 2023
7 tasks
@nelsonic
Copy link
Member Author

@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:

mvp/lib/app/list.ex

Lines 149 to 154 in b8aee0e

def add_item_to_list(item_cid, list_cid, person_id) do
list = get_list_by_cid!(list_cid)
prev_seq = get_list_seq(list)
seq = [item_cid | prev_seq] |> Enum.join(",")
update_list(list, %{seq: seq, person_id: person_id})
end

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.

@nelsonic
Copy link
Member Author

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.

@LuchoTurtle
Copy link
Member

LuchoTurtle commented Sep 13, 2023

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:

  1. open list.seq
  2. iterate over each cid
  3. find the cid we want to move from
  4. splice the list.seq array
  5. and then add the cid 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).

Screenshot 2023-09-13 at 09 22 51 Screenshot 2023-09-13 at 09 22 58 Screenshot 2023-09-13 at 09 22 43

They have a modal option (no-go) that does the same thing.

Screenshot 2023-09-13 at 09 23 12

@iteles
Copy link
Member

iteles commented Sep 13, 2023

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).

@nelsonic nelsonic changed the title Discuss: How to Move an item from one list to another list? Discuss: Interface for Moving an item from one list to another list? Sep 15, 2023
@nelsonic nelsonic mentioned this issue Sep 16, 2023
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Share your constructive thoughts on how to make progress with this issue enhancement New feature or enhancement of existing functionality good first issue Good for newcomers help wanted If you can help make progress with this issue, please comment! needs-design A feature idea that needs some interface design in order to be discussed/built. priority-1 Highest priority issue. This is costing us money every minute that passes. question A question needs to be answered before progress can be made on this issue research Research required; be specific starter A beginner-friendly issue that is a good starting point for a new person T25m Time Estimate 25 Minutes user-feedback Feedback from people using the App
Projects
Status: No status
Development

No branches or pull requests

3 participants