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

Fix issue 256: Bugfix | Tags with 0 posts #259

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

vverma022
Copy link
Contributor

@vverma022 vverma022 commented Jul 27, 2024

Topic Slider Changes

Description

Fixes the Bug where the Topic's with 0 posts are not shown in the topic slider and the slider is sorted in descending order.

Resolves #256

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Changes

  • Added a sorting on the TagRouter.get which where the tags now will be fetched and sent in descending order on the basis of posts associated with them.
  • In the font-end while fetching the tags using fetch-topic hook a filter has been added which filters the posts and shows only the ones with more than 0 posts.
  • To achieve the above the backend now sends 3 objects id, name and count which is the count of the number of posts in each topic. this enables us to filter them and can also be used for implementing other features like topic post count etc. The interface was also modified to accept a count.

Screenshots/Recordings

Checklist before requesting a review

  • have performed a self-review of my code
  • I assure there are no similar/duplicate pull requests regarding the same issue
  • My changes follow the project's coding guidelines and best practices
  • Code is formatted properly and lint check passes successfully
  • have made corresponding changes to the documentation (if applicable)

Additional Notes

The reason for such is hybrid approach is because when the backend route was implementing the filter to send only topics with > 0 posts other components which are using that route were affected for example the component which lets you select which topic a post should be associated with etc.

Copy link

vercel bot commented Jul 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
medium-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 27, 2024 7:27pm

@aadeshkulkarni
Copy link
Owner

@vverma022 - The tags slider isn't shown even though the API returns data.

Screenshot 2024-09-04 at 12 22 50 PM

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.

Bug | Topics with 0 posts
2 participants