Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: introducing Qs&As, reddit like tiny platform #436

Merged
merged 18 commits into from
May 12, 2024
Merged

Conversation

siinghd
Copy link
Collaborator

@siinghd siinghd commented Apr 16, 2024

PR feat:

Introducing tiny reddit like platform where people can ask questions or post something and people can reply.

In the prisma Schema two models are seperated (questions,answers) because with single recursive model it would be hard to get recursive answers.

Screenshot 2024-04-16 at 3 27 23 PM
Screenshot 2024-04-16 at 3 27 37 PM
Screenshot 2024-04-16 at 3 27 52 PM
Screenshot 2024-04-16 at 3 28 09 PM

Resolves #[Issue Number if there]

Checklist before requesting a review

  • I have performed a self-review of my code
  • I assure there is no similar/duplicate pull request regarding same issue
  • I assure that the build i working in local

@siinghd siinghd changed the title feat: introducing Qs&As, reddit like platform feat: introducing Qs&As, reddit like tiny platform Apr 16, 2024
@siinghd siinghd mentioned this pull request Apr 16, 2024
3 tasks
@Neon-20
Copy link
Contributor

Neon-20 commented Apr 16, 2024

are you thinking off adding a subreddit sort of thing as well, if yes then till which depth. @siinghd.
Something like this also engages community quite much : https://codeforces.com/blog/entry/127903

@siinghd
Copy link
Collaborator Author

siinghd commented Apr 17, 2024

are you thinking off adding a subreddit sort of thing as well, if yes then till which depth. @siinghd. Something like this also engages community quite much : https://codeforces.com/blog/entry/127903

This is just like that, looks same as that

@siinghd
Copy link
Collaborator Author

siinghd commented Apr 20, 2024

@hkirat veere can you look at this?

@hkirat
Copy link
Contributor

hkirat commented May 9, 2024

wow nice
are these attached per video?
or is this a global thing?

@siinghd
Copy link
Collaborator Author

siinghd commented May 9, 2024

@hkirat this is global thing, i think for video we could just expand the comments. We already have different type of comments.

In this somehow we could reference the video... like github does with pr's

@hkirat
Copy link
Contributor

hkirat commented May 9, 2024

Can we put this behind a globally configurable feature flag @siinghd ?
Happy to merge it but need to be able to disable it quickly if there are bugs

@hkirat
Copy link
Contributor

hkirat commented May 9, 2024

Maybe generally add a frontend feature flag functionality if possible

@siinghd
Copy link
Collaborator Author

siinghd commented May 9, 2024

@hkirat sure let me do it

@siinghd
Copy link
Collaborator Author

siinghd commented May 9, 2024

@hkirat should be done, maybe its dumb but i have added env var NEXT_PUBLIC_DISABLE_FEATURES = "featurea,featureb,featurec"

if you add qa or QA, basically you disable it, from server side it will redirect the user to '/'. if you are not in the page actions also can't be used i think. let me know if this is what u were thinking

Maybe u also want to disable some things on clientside (like conditional rendering) thats why the env is with NEXT_PUBLIC

@siinghd
Copy link
Collaborator Author

siinghd commented May 9, 2024

MMMM build has some problems with const session = await getServerSession(authOptions), let me check

@siinghd
Copy link
Collaborator Author

siinghd commented May 10, 2024

@hkirat ok veere should have fixed the build, idk why there were issues with session types and other types but should be working now.

But do check one time 5e0429e

@hkirat
Copy link
Contributor

hkirat commented May 12, 2024

/bounty $600
Will be testing after merging

@hkirat hkirat merged commit 8b567c6 into code100x:main May 12, 2024
1 check passed
@@ -13,12 +13,18 @@ const voteHandler = async (
data: InputTypeHandleVote,
): Promise<ReturnTypeHandleVote> => {
const session = await getServerSession(authOptions);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally should take weather it is a vote or downvote as an input
Toggling can lead to inconsistencies if the user is in two tabs/if the tab hasn't updated

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good follow up to add @siinghd

// appxCourseId: number;
// openToEveryone: boolean;
// slug: string;
// discordRoleId: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we get rid of it?

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

Successfully merging this pull request may close these issues.

3 participants