Closed kikipluche closed 6 years ago
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?
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!
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:
Each hashtagItem consist of:
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