RC4Community icon indicating copy to clipboard operation
RC4Community copied to clipboard

TODO: Create a Hacker News component

Open Sing-Li opened this issue 3 years ago • 5 comments
trafficstars

Create a React based Hacker News "top list" or "current list" component based on configurable criterion.

Model this one close to the existing Discourse component.

Sing-Li avatar Jan 12 '22 01:01 Sing-Li

@Sing-Li I would like to work on this issue and for the design atm, I've come up with this (similar to https://news.ycombinator.com/ ):- rc4_comm_hnnews

How many stories should we fetch and store in the cms? (The API provides us with top 500 stories)

sidmohanty11 avatar Feb 07 '22 13:02 sidmohanty11

Hey @Sing-Li, could you please assign this to me?

adarsh500 avatar Jan 08 '23 19:01 adarsh500

@adarsh500 Can you describe the approach you will be taking to create this component? What would the component look like? Let me know the proposed data flow.

Sing-Li avatar Jan 09 '23 04:01 Sing-Li

Hacker News has a public API (https://github.com/HackerNews/API) along with good documentation (https://hackernews.api-docs.io/v0/items/get-by-id) which can be used for this component. We can fetch the data server side and then pass it onto the page as props. I came up with a prototype design for the cards, i've tried to keep it similar to the Rocket.Chat design system.

We could use a component which would give us either the top news or the hot news by selecting tabs

Useful additions: we can add pagination support

Untitled-2022-12-21-14111

Untitled-2022-12-21-1412

@Sing-Li i hope you like it, would like to get your feedback on this : )

adarsh500 avatar Jan 09 '23 18:01 adarsh500

@Sing-Li, is this issue resolved?

umangutkarsh avatar Oct 16 '23 04:10 umangutkarsh