swarmcity / boardwalk-ts

Boardwalk implementation in TS
boardwalk-ts.vercel.app
MIT License
1 stars 0 forks source link

show items i'm involved in at top #98

Closed kikipluche closed 2 years ago

kikipluche commented 2 years ago

place the items in which i am involved at top of list with a spacing.

Screenshot 2022-10-13 at 12 42 09
vojtechsimetka commented 2 years ago

Just a clarification. What are all the items that should be there?

Also at what point do these disappear from this top part of the list? Once completed or canceled?

kikipluche commented 2 years ago

yes those three cases.

kikipluche commented 2 years ago

about when they disappear:

-when the deal is completed or canceled, they should disappear as well, but i think not immediately (i need to dig into the documentation te see what the expected behaviour is, i didn't find it at first sight, will come back on this)

vojtechsimetka commented 2 years ago

in episode 3 epic 3 there you were not selected as provider. You are able to remove from list

Oh I missed this and thinking how to do this:

WDYT @filoozom ?

filoozom commented 2 years ago

That's a though one. I guess we could post a message in a second topic to index the messages a user replied to. So post the message to ${marketplace}/${item}/replies as well as ${user}/replies for example. Then we could fetch everything in ${user}/replies to see which items a user replied to. As the reply and index would be posted at the same time, they're likely to expire at the same time as well. In case we want to refresh those, we can, but need to do so for both at the same time.

Alternatively, as you said, storing the reply to localStorage would also work, but it's kinda meh for multi-device access.

I'm not exactly sure what you meant by the second option. For me, the main difficulty is to fetch this is an efficient way, or am I mistaken? If so, the main issue would probably be indexing the data somehow. Getting those states by going through all replies of all messages really doesn't scale at all.

kikipluche commented 2 years ago

What we (Michelle, Philippe and I) decided on:

  1. we show in the MYitemslist (top) the items where I am the seeker or the provider.
  2. When you replied to an item (not selected (yet)), the item is in the general items list.
  3. When a deal is cancelled or completed, it will move to the general items list
kikipluche commented 2 years ago

about the disappearing: in episode 3 epic 3, there is the example when you werent selected as a provider: here you can remove the item from the list.

in case a deal is complete or cancelled, it will disappear