open-sauced / hot

πŸ•The site that recommends the hottest projects on GitHub.
https://hot.opensauced.pizza
MIT License
426 stars 148 forks source link

Feature: Replace the removed contributor avatars #333

Closed bdougie closed 2 years ago

bdougie commented 2 years ago

Type of feature

πŸ• Feature

Current behavior

During work on https://github.com/open-sauced/hot/pull/321 I had to remove the contributor avatars while that data s being added to the API. When it is available, we can added them back.

Screen Shot 2022-10-04 at 10 33 28 AM

Suggested solution

uncommented the components in the app.

Additional context

https://github.com/open-sauced/hot/pull/321

Code of Conduct

Contributing Docs

bdougie commented 2 years ago

Contributions are available from this endpoint

/v1/repos/{owner}/{repo}/contributions
nightknighto commented 2 years ago

@bdougie

Contributions are available from this endpoint

/v1/repos/{owner}/{repo}/contributions

in beta, contributors are retrieved from the repo data object

const { id, full_name, name, description, issues, stars, contributions } = repo!;

Shouldn't I do that in alpha as well instead of calling the api endpoint?

bdougie commented 2 years ago

We are actively trying to move away from that. Also between the time, I assigned this and now, my changes on alpha have been overwritten. What you are looking at is us leveraging the Supabase SDK, which is limited.

the new task

Instead of working on this, could re-do the changes linked in this issue first. https://github.com/open-sauced/hot/issues/380

Forget about working on alpha for now. Instead, work from beta.

update: contributors (StackedAvatars) are now removed from beta.

nightknighto commented 2 years ago

@bdougie in Hero.tsx, repositories are fetched and cards are dynamically created for it, all in the same single file. This makes it very hard to dynamically get the contributors data from the api, since it will need an array of dynamic useSWR hooks, or even an array of fetch requests then storing the results and mapping them to their correct objects.

So I have 2 ways in mind: 1- Using the contributors field in repo's data (but you said you are trying to move away from that) 2- Make the cards into their own components, named HeroCard component, and then I will be able to manage api calls and use hooks dynamically much more easier.

Thoughts?

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 2.26.0-beta.10 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 2.26.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: