As a user, I can see all the items in a hashtag, so I know the activity of myself and other people.
Closed this issue · 4 comments
Abstract:
In Swarm City, hashtags are marketplaces. A hashtag gives context to a SWT transfer.
Users (Seekers) can post new requests in a hashtag, inviting other users (Providers) to reply to their requests.
How it could work:
A hashtag has a chronological list of hashtag items.
It shows a user the activity in the market, including what is being requested and the offered amount.
When a user creates or responds to an item it appears to that user above the hashtag items list.
The list is generated by the API by listening to events on a hashtag contract. The front end creates two lists: hashtagMyItems and hashtagItems.
The API emits a update event every 5 seconds with the full dataset.
What it looks like:
Userflow: https://invis.io/ABGM89SX3V5#/293466623_-Hashtag--contractadress_Of_The_Hashtag-
route: /hashtag/(contractadress of the hashtag)
In hashtag-view, we see two lists (below the hashtag + infobox), seperated by a white-space:
- list (A) - hashtagMyItems: A list with active items a user is involved in. If a user doesn't have active items, this list is not shown. Once a deal is being completed, the item is considered not active, so it appears as a completed deal in list 2.
- list (B) - hashtagItems: A list of items which a user is not involved in, and the user's completed deals.
Each hashtagItem consist of:
- description of the request
- reply-icon showing the amount of replies
- relative time
- avatar
- username and Seeker SWR*
(visually presented simply as 'SWR' > the color of name and rep is determined by the Seeker of the item: if the current user is the Seeker, the name+rep is black. If someone else is the Seeker the name is blue) - In list (A): copy "No provider selected."
- copy "SWT" and the value of this item
Scroll-behaviour list (A):
As a user scrolls down the page /hashtag and list 1 gets out of view, a small button appears in the right top corner, showing the number of items in list 1, followed by copy "active" and a small up-icon. Tapping this button makes the page scroll up so list 1 is visible again.
Desktop view:
---Invisionlinks with login (for inspect mode!):
mobile: https://projects.invisionapp.com/d/main#/console/13838256/293466623/preview
desktop: https://projects.invisionapp.com/d/main#/console/14147648/294446454/inspect
The list is generated by listening to events on a hashtag contract.
I suppose this is done on the node, and front-end has a channel to subscribe to?
- faffy puts the filter button back on the view where list A is scrolled up.
how it works:
frontend goes on hashtag and starts a subscription on that hashtag.
frontend gets back from API: datasets of all items on that hashtag and all replies connected to those items
frontend will filter this list to list A or B
the API will emit an event every 5 seconds with the latest full dataset.
@kikipluche Done!