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

As a user, I can see all the items in a hashtag, so I know the activity of myself and other people. #8

Closed
kikipluche opened this issue Mar 28, 2018 · 4 comments

Comments

@kikipluche
Copy link
Contributor

kikipluche commented Mar 28, 2018

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

@kingflurkel kingflurkel added this to the S01E01: Making babies milestone Mar 28, 2018
@swarmcity swarmcity deleted a comment from kingflurkel Apr 27, 2018
@swarmcity swarmcity deleted a comment from faffydee Apr 27, 2018
@xardass
Copy link
Collaborator

xardass commented May 4, 2018

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?

@kikipluche
Copy link
Contributor Author

kikipluche commented May 6, 2018

  • faffy puts the filter button back on the view where list A is scrolled up.

@kikipluche
Copy link
Contributor Author

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.

@faffydee
Copy link
Collaborator

faffydee commented May 9, 2018

@kikipluche Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants