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

Bug | Topics with 0 posts #241

Open
aadeshkulkarni opened this issue Jul 10, 2024 · 11 comments · Fixed by #256 · May be fixed by #259
Open

Bug | Topics with 0 posts #241

aadeshkulkarni opened this issue Jul 10, 2024 · 11 comments · Fixed by #256 · May be fixed by #259
Assignees
Labels
backend bug Something isn't working good first issue Good for newcomers

Comments

@aadeshkulkarni
Copy link
Owner

Current:

All topics are displayed at the top. Even topics with 0 posts.

Expectation:

  • Show only those topics which have at least 1 post.
  • Sort topics by count(posts)

Note:

  • Implement this in the backend
@aadeshkulkarni aadeshkulkarni added bug Something isn't working good first issue Good for newcomers backend labels Jul 10, 2024
@AbdulWahab3181
Copy link

Hi @aadeshkulkarni ! I would like to work on this. Could you please explain a little more as I am new here? Also, could you please tell me if there is a bounty? If yes, what's the amount and what is the process?

@0xprathamesh
Copy link
Contributor

Hi @aadeshkulkarni ,
I would like to work on the enhancement to display only those topics which have at least 1 post and to sort topics by the count of posts. Could you please assign this task to me? and i would also like to add a Saved Posts page so that the user can see his saved post.

@aadeshkulkarni
Copy link
Owner Author

aadeshkulkarni commented Jul 11, 2024

@AbdulWahab3181 -

Could you please explain a little more as I am new here?

This bug is on / and /blogs route. Specifically, the Topics slider that is displayed beneath the header.
Please take the app for a spin. And also, set the codebase locally. This should definitely help you understand the issue better.

Also, could you please tell me if there is a bounty? If yes, what's the amount and what is the process?

No bounty for this one. Sorry.

PS: Please read the CONTRIBUTING.md file for contribution guidelines.
Whenever you'd like to work on any issue, please make sure you mention your approach as well.

@aadeshkulkarni
Copy link
Owner Author

Hi @aadeshkulkarni , I would like to work on the enhancement to display only those topics which have at least 1 post and to sort topics by the count of posts. Could you please assign this task to me? and i would also like to add a Saved Posts page so that the user can see his saved post.

Assigning this issue to you.
Saved post page is not required. We already have a bookmarks page that achieves this.

@vverma022
Copy link
Contributor

Could I work on this

@aadeshkulkarni
Copy link
Owner Author

Sure

@vverma022
Copy link
Contributor

Thank you I'll create an approach to the problem and post my solution after looking at the codebase.

@vverma022
Copy link
Contributor

vverma022 commented Jul 16, 2024

@aadeshkulkarni will filtering the blogs in the prisma query a right approach to the bug. I could modify the tagRouter.get("/", async (c) => {
try {
const prisma = getDBInstance(c);

	let query: any = {
		select: {
			id: true,
			tagName: true,
		},
	};. 

Are there any other backend end-points I need to take into consideration.

vverma022 added a commit to vverma022/figuringout-os that referenced this issue Jul 21, 2024
@aadeshkulkarni
Copy link
Owner Author

aadeshkulkarni commented Jul 24, 2024

Screenshot 2024-07-24 at 10 11 58 AM

@vverma022 - Your code breaks. Did you not verify your code by running it locally ?

Reverting your changes so that app is functional

@vverma022
Copy link
Contributor

vverma022 commented Jul 24, 2024

Screenshot 2024-07-24 at 10 11 58 AM

@vverma022 - Your code breaks. Did you not verify your code by running it locally ?

Reverting your changes so that app is functional

Apologies for the oversight. I might have some issues in my backend setup. Looking into them a creating a pull request with valid changes and appropriate screen shots.

@vverma022
Copy link
Contributor

vverma022 commented Jul 27, 2024

While filtering the tag router a bug is that even while publishing a blog when selecting a tag the other do not show-up. So in the Tags.tsx component a filter will be needed.

@vverma022 vverma022 linked a pull request Jul 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug Something isn't working good first issue Good for newcomers
Projects
None yet
4 participants