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

Feature: Implement voting logic for repos #12

Closed
1 task done
bdougie opened this issue Dec 16, 2021 · 5 comments · Fixed by #67
Closed
1 task done

Feature: Implement voting logic for repos #12

bdougie opened this issue Dec 16, 2021 · 5 comments · Fixed by #67

Comments

@bdougie
Copy link
Member

bdougie commented Dec 16, 2021

Type of feature

Feature

Current behavior

Today the api is listing repos based on relevancy in open sauced.

  • api.opensauced.pizza
  • The above is powered by a private DB hosted on supabase

Desired solution

We need a global state that can store votes from users

  • Add local state to fetch vote data
  • Implement vote column in supabase db
  • Alternatively we could use a public JSON file to store votes as an intermediary.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@0-vortex
Copy link
Contributor

IMHO anything calling a specific microservice or API endpoint could use some local mocking or container composing. How do you feel about doing some compatibility upgrades in https://github.com/open-sauced/hot-sauce-api ?

@bdougie
Copy link
Member Author

bdougie commented Dec 26, 2021

Hey, @0-vortex interested in hearing more about this microservice. I think I will try to figure out the voting logic this week. I am thinking about creating a table in the supabase DB with votes captured. I am also thinking this will be blocked slightly by #20, since I will need to store the votes based on the logged-in user.

Also, side note: I am going to look into making the data public via the new supabase studio.

@bdougie bdougie self-assigned this Dec 26, 2021
@bdougie
Copy link
Member Author

bdougie commented Dec 26, 2021

Going to be starting work on this. The current plan

The scope may be quick, but I will open issues if things start taking too long.

@hokagedemehin
Copy link
Contributor

You can also consider using React Context API for global state management. That way you can have a save a vote and have it available across the app for other components to use.

Redux can also do the same but I think the set up might be a lot

@github-actions
Copy link

github-actions bot commented Jan 7, 2022

🎉 This issue has been resolved in version 1.6.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