incubrain / nuxt-feedback

Building a feedback system that integrates with GitHub
https://nuxt-supabase-auth-sable.vercel.app
0 stars 0 forks source link

store feedback #2

Open Drew-Macgibbon opened 1 year ago

Drew-Macgibbon commented 1 year ago

Firstly we need to discuss what data we will store with feedback:

Here's a start to discuss further:

{
    "id": 1, bigint
    "title": "John Doe", varchar
    "body": "", text
    "created_at": "2018-01-01T00:00:00.000Z", timestamp
    "updated_at": "2018-01-01T00:00:00.000Z", timestamp
    "user_id": "UUID of user", uuid foreign key
    "votes": 0, int
    "votes_weighted": 0.00 float
    "gh_issue": "url-to-issue", text
    "status": "open", ?
    "category": "feature" ?
  }

usually for categories/statuses I would use a join table, but these will be unique to the feedback table. So we should consider something else, maybe enums, looking for suggestions

in development use nitro storage layer, I've set things up so you can set/get kv storage from feedback.json on server/api/feedback endpoint.

In a serverless environment, we will need to setup/use supabase. the project is configured to use the testing sb project

Drew-Macgibbon commented 1 year ago

@JapneetRajput @aayu5hgit In relation to the DB table; I've provided a start here, however, I'm sure it will change as we develop the feature. Start by storing/working with JSON. As we become more confident about the data structure we will move to storing in the DB.

JapneetRajput commented 1 year ago

Suggestion to other fields that we can add

  1. "priority" : (low medium high)
  2. "github_pr" : "url-to-pr"
  3. "assignee" : "username" (Can be fetched from github)
  4. "size" : (low medium high)
JapneetRajput commented 1 year ago

Another thing that I had in mind was, when the developer is switching the status of a task we can use debouncing to update the status in the DB with a delay of 1s* to reduce the number of calls to DB.

aayu5hgit commented 1 year ago

@JapneetRajput the priority has to be decided by us, right? Because if we give this option to user to decide the priority of their issue, there might be many issues with high priority.

JapneetRajput commented 1 year ago

Um even that is open for discussion because both the options have their pros and cons

(Con) If we give the user the right to set the priority they'll often tend to give their tasks the highest priority. (Pro) But getting the user's take on how quickly they need it can be an important factor too.

@Drew-Macgibbon @aayu5hgit Can we consider keeping 2 priority fields one which can be set by the users and one by the developer who'll be working on it? Or does this complicate things

Drew-Macgibbon commented 1 year ago

@JapneetRajput @aayu5hgit user priority is set collectively by the weighted upvotes. priority should be set by us.

@JapneetRajput "size" I'm assuming is an estimate on task difficulty? Using storypoints is worth considering.

Debouncing is a good idea. Lots of little tweaks we can do with the API request to improve the overall UX

JapneetRajput commented 1 year ago

Oh yes this idea for 'priority' sounds best to me

Yes by size I meant task difficulty or the relative time required to complete the task

aayu5hgit commented 1 year ago

@Drew-Macgibbon so we will be prioritizing feedback wrt user's weighted upvotes or according to the complexity of the feedback (or say, issue)? OR

We can average out the priority like

Priority Set by us:

Drew-Macgibbon commented 1 year ago

@aayu5hgit sounds good.

Average Priority could possibly be used as a sorting algo.

We would also need to determine how we rate things, eg.

Urgent - 3 - bug/unexpected behaviour/security vulnerability etc

JapneetRajput commented 1 year ago

image

I've kept int2 for the fields which will have enums. status, priority and size. We can then map the values to the integers

user_id is a foreign key to the id field in users table

@Drew-Macgibbon @aayu5hgit

Drew-Macgibbon commented 1 year ago

@JapneetRajput I try to avoid Enums in most cases, they have odd behaviours, it was just a suggestion to think about.

Now we know that categories/statuses will be defined by the developer/functions we can just use int2 imo

JapneetRajput commented 12 months ago

After making the necessary zod changes, I'm facing this error

image image

Code flow is :

image

@Drew-Macgibbon can you help me with this