Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Feature: Replace placeholder avatars with contributor avatars #21

Closed
2 tasks done
bdougie opened this issue Dec 18, 2021 · 9 comments · Fixed by #28
Closed
2 tasks done

Feature: Replace placeholder avatars with contributor avatars #21

bdougie opened this issue Dec 18, 2021 · 9 comments · Fixed by #28

Comments

@bdougie
Copy link
Member

bdougie commented Dec 18, 2021

Type of feature

Feature

Current behavior

Within each repo card, the list avatars are placeholders. This was needed to figure out the design, but they will need to be replaced with the avatars of the contributors.

image

Desired solution

In the opensauced.pizza app, we grab the avatars using graphql. We can do something similar here.

Example in the opensauced dashboard

image

Additional context

This can be completed without a github OAuth

Code of Conduct

  • I agree to follow this project's Code of Conduct

Update:

This issue is blocked on the need for a proper data fetching pattern from GitHub.

@kelvinsekx
Copy link
Contributor

Is there no link to fetch the Avatars?

@bdougie
Copy link
Member Author

bdougie commented Dec 19, 2021

Yes and not. You can fetch the contributors of repository and you can fetch avatars using github usernames separately.

Link to how it is done in the main repo: https://github.com/open-sauced/open-sauced/blob/bf2501d0320c282695b563e02b7394f871557d0d/src/components/Repository.js#L119

  1. I think we will need to recreate this persisted query file in this repository.
  2. We will introduce data fetching from github in this project
  3. Use the existing contributors_oneGraph item to display avatars.

I will address the following to unblock this - #23

@nulfrost
Copy link
Contributor

I'd love to take this one on once it's unblocked! So just to make sure I'm clear on what the task at hand is, we want to replace the placeholder avatars with avatars coming from the github api? Also since we are rendering a list of repos from a static list of items in a json file, would we be replacing that with the data from the github API or something else?

@bdougie bdougie mentioned this issue Dec 20, 2021
15 tasks
@bdougie
Copy link
Member Author

bdougie commented Dec 20, 2021

we want to replace the placeholder avatars with avatars coming from the github API?

The placeholder images should be actual avatars of the top 2 contributors of the project.

Also since we are rendering a list of repos from a static list of items in a json file, would we be

replacing that with the data from the github API or something else?
The static file is temporary for development. This was a shorcut to avoid pagination of the https://api.opensauced.pizza.

#25 will unblock this.

@nulfrost
Copy link
Contributor

Okay I see, gotcha! Will wait for that to be merged ☺️ thank you

@bdougie
Copy link
Member Author

bdougie commented Dec 21, 2021

This is now unblocked, the data was added to the static JSON file. The avatars can now be dynamically rendered. I will be adding the fetch logic to the action that populates the DB.

i.e. https://github.com/open-sauced/actions/blob/main/populate-the-supabase/action.js#L27-L55

@nulfrost
Copy link
Contributor

.take

@github-actions
Copy link

Thanks for taking this on! If you have not already, join the conversation in our Discord

nulfrost added a commit to nulfrost/hot that referenced this issue Dec 22, 2021
bdougie pushed a commit that referenced this issue Dec 22, 2021
* feat: replace avatar fixtures with contributor avatars

fixes #21

* test: add tests for getAvatar

* style: adddress linting issues
github-actions bot pushed a commit that referenced this issue Dec 22, 2021
## [1.2.0](v1.1.0...v1.2.0) (2021-12-22)

### 🍕 Features

* replace placeholder avatars with contributor avatars ([#28](#28)) ([c817a98](c817a98)), closes [#21](#21)
@github-actions
Copy link

🎉 This issue has been resolved in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

3 participants