figuringout
figuringout copied to clipboard
Bug | Topics with 0 posts
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
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?
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.
@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.
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 Postspage 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.
Could I work on this
Sure
Thank you I'll create an approach to the problem and post my solution after looking at the codebase.
@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 - Your code breaks. Did you not verify your code by running it locally ?
Reverting your changes so that app is functional
![]()
@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.
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.