{"action":"opened","issue":{"url":"https://api.github.com/repos/swarmcity/SwarmCityConcept/issues/8","repository_url":"https://api.github.com/repos/swarmcity/SwarmCityConcept","labels_url":"https://api.github.com/repos/swarmcity/SwarmCityConcept/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/swarmcity/SwarmCityConcept/issues/8/comments","events_url":"https://api.github.com/repos/swarmcity/SwarmCityConcept/issues/8/events","html_url":"https://github.com/swarmcity/SwarmCityConcept/issues/8","id":309283928,"number":8,"title":"As a user, I can see all the items in a hashtag, so I know the activity of myself and other people.","user":{"login":"kikipluche","id":9036081,"avatar_url":"https://avatars1.githubusercontent.com/u/9036081?v=4","gravatar_id":"","url":"https://api.github.com/users/kikipluche","html_url":"https://github.com/kikipluche","followers_url":"https://api.github.com/users/kikipluche/followers","following_url":"https://api.github.com/users/kikipluche/following{/other_user}","gists_url":"https://api.github.com/users/kikipluche/gists{/gist_id}","starred_url":"https://api.github.com/users/kikipluche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kikipluche/subscriptions","organizations_url":"https://api.github.com/users/kikipluche/orgs","repos_url":"https://api.github.com/users/kikipluche/repos","events_url":"https://api.github.com/users/kikipluche/events{/privacy}","received_events_url":"https://api.github.com/users/kikipluche/received_events","type":"User","site_admin":false},"labels":[{"id":882255070,"url":"https://api.github.com/repos/swarmcity/SwarmCityConcept/labels/Boardwalk","name":"Boardwalk","color":"e99695","default":false},{"id":865544965,"url":"https://api.github.com/repos/swarmcity/SwarmCityConcept/labels/Epic","name":"Epic","color":"3E4B9E","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-28T09:17:20Z","updated_at":"2018-03-28T09:17:20Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"## Abstract:\r\nA hashtag is a chronological list of hashtagItems. It gives the user an insight into the activity and type of market, and shows transparently what is being requested for which amount. \r\n\r\nThe hashtagItemsList is amended by the user's activity, which is on top of the list so the user can easily follow up on his active items.\r\n\r\n## How it works:\r\nThe hashtagItemsList is populated by subscribing to the API, providing the hashtag contract address as a parameter.\r\n\r\nThe API returns the metadata of the hashtag and the items for the hashtag. The result is ordered chronologically. \r\n\r\nThe client splits this list into: ```hashtagItems``` and ```hashtagMyItems```.\r\n\r\nAn item is added to ```hashtagMyItems``` when **from** is the user's publicKey. \r\n\r\nActivity ( transactions / Events ) on the hashtagcontract are indexed on the API.\r\n\r\nThe subscription will emit new items to the client, or updates to existing items.\r\n\r\n------\r\n\r\n## API:\r\n### subscriptions\r\n\r\ntopic **hashtagItems** \r\n\r\n#### subscribe:\r\n\r\n```\r\n/**\r\n * @request\r\n * Represents the client request\r\n * @param {string} hashtagAddress - the contract address of the hashtag\r\n */\r\n\r\n{\r\n    hashtagAddress: <String>,\r\n}\r\n```\r\n\r\n\r\nreply:\r\n\r\n```\r\n/**\r\n * Represents the txHistoryChanged response\r\n * @response\r\n * @param {number} response - The HTTP response code\r\n * @param {string} subscriptionId - The SubscriptionID \r\n * @param {array} hashtagData - metadata of the hashtag\r\n * @param {array} hashtagItems - Array of hashtagItems \r\n */\r\n \r\n{ \r\n    response: <Number>,   \r\n    subscriptionId: <String>,\r\n    hashtagData: {\r\n     \"address\":\"0x3f0189a1647d091d111c78aacfbbddbd6b2c86b5\",\r\n     \"name\":\"Settler\",\r\n     \"description\":\"The first marketplace in Swarm City was #pioneer. This is the second. Post and answer requests for goods and services in this marketplace, and earn reputation as one of the earliest adopters.\",\r\n     \"contact\":    \r\n         [{\"name\":\"support@swarm.city\",\r\n         \"link\":\"mailto:support@swarm.city\"\r\n         },{\r\n         \"name\":\"@SwarmCityHelp (Twitter)\",\r\n         \"link\":\"http://twitter.com/@SwarmCityHelp\"}]\r\n    },\r\n    hashtagItems: <Array of hashtagItem>\r\n}\r\n```\r\n\r\n\r\n#### Events\r\n\r\n**hashtagItemChanged**\r\n\r\n``` \r\n{ \r\n    response: <Number>,   \r\n    subscriptionId: <String>,\r\n    hashtagItems: <Array of changed items>\r\n}\r\n```    \r\nHashtagitems can be updated (primary key = dealHash) or can be new inserts.\r\n\r\n-------\r\n\r\n\r\n### API documentation\r\n\r\nA part of this functionality has already been implemented in ```subscriptionHashtagItems.js``` in the subscriptions of the current API.\r\n\r\n-------\r\n\r\n## What it looks like in front end:\r\n\r\n**route:** /hashtag/(contractadress of the hashtag)\r\n![](https://i.imgur.com/LbFBYa6.png)\r\n\r\nIn hashtag-view, we see two lists (below the hashtag + infobox), seperated by a white-space:\r\n- **list 1 (hashtagMyItems):** A list with active items I'm involved in. If I don't have active items, this list is not shown. If a deal is done, the item is considered not active, so it appears as a done deal in list 2.\r\n- **list 2 (hashtagItems):** A list of items which I'm not involved in, and my \"done\" deals.\r\n\r\nEach hashtagItem consist of:\r\n- dealmessage\r\n- amount of replies and reply-icon\r\n- timestamp\r\n- avatar\r\n- username and Seeker SWR* (black in **list 1 (hashtagMyItems)**, blue in **list 2 (hashtagItems)**)\r\n*(visually presented simply as 'SWR')\r\n- **In list 1:** copy \"No provider selected.\"\r\n- copy \"SWT\" and the amount of this item\r\n\r\n**Scroll-behaviour list 1:**\r\nAs the user scrolls through 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.\r\n\r\n**Scroll-behaviour (situation A):**\r\n![](https://i.imgur.com/XNevHkS.png)\r\n\r\n**Scroll-behaviour (situation B):**\r\n![](https://i.imgur.com/6dyicPP.png)\r\n\r\n\r\n## Documentation / references\r\n\r\n"}}
{"actor":{"display_login":"kikipluche"}}