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]: Filter by tag is not working as intended #341

Closed
4 tasks done
Parth18Shah opened this issue Jun 29, 2024 · 19 comments
Closed
4 tasks done

[Bug]: Filter by tag is not working as intended #341

Parth18Shah opened this issue Jun 29, 2024 · 19 comments
Assignees
Labels
bug Something isn't working gssoc GSSOC

Comments

@Parth18Shah
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Currently, adding a tag as a search filter is filtering posts by that tag as a keyword within the entire data. Instead, it should filter posts based solely on the tags assigned to them.

Expected behavior

Added tag will filter the posts with that tag assigned to it.

Add ScreenShots

No response

On which device are you experiencing this bug?

Windows

Record

  • I have read the Contributing Guidelines
  • I'm a GSSOC'24 contributor
  • I have starred the repository
@Parth18Shah Parth18Shah added the bug Something isn't working label Jun 29, 2024
Copy link

Thank you for creating this issue! 🎉 We'll look into it as soon as possible. In the meantime, please make sure to provide all the necessary details and context. If you have any questions or additional information, feel free to add them here. Your contributions are highly appreciated! 😊

You can also check our CONTRIBUTING.md for guidelines on contributing to this project.

@VaibhavArora314
Copy link
Owner

an API request is sent with tags in the usePosts hook which filters posts with at least one of the passed tags. I think this is the logic and keyword searching is done for the search text written by the user. if I am wrong, please correct me.

@Parth18Shah
Copy link
Contributor Author

Yes you're right but shouldn't we just search the keyword in the tags associated to the posts instead of a search across all of its details.

@VaibhavArora314
Copy link
Owner

VaibhavArora314 commented Jul 3, 2024

Yes you're right but shouldn't we just search the keyword in the tags associated to the posts instead of a search across all of its details.

we can search the text in tags as well with the description and the title, just modify the Prisma query for this
don't remove the filter option by tags

@Parth18Shah
Copy link
Contributor Author

Hey there, I believe that someone has fixed the bug I tried to describe above. Now, the filter by tags works as intended, filtering by tags associated with the posts and nothing else (name, description). So you could check and test to see if it still exists, and if it doesn't, then you could close it.

@VaibhavArora314
Copy link
Owner

VaibhavArora314 commented Jul 8, 2024

Hey there, I believe that someone has fixed the bug I tried to describe above. Now, the filter by tags works as intended, filtering by tags associated with the posts and nothing else (name, description). So you could check and test to see if it still exists, and if it doesn't, then you could close it.

you can work on this if you want since another bug is present now. the tags are shown incorrectly in options
image

@Parth18Shah
Copy link
Contributor Author

Sure, I can do it. Thanks. Could you confirm the tag filter inputted by you to get these results?

@VaibhavArora314
Copy link
Owner

Sure, I can do it. Thanks. Could you confirm the tag filter inputted by you to get these results?

actually, that allPosts.addTag was already present by default

@Parth18Shah
Copy link
Contributor Author

What does it mean? It doesn't make sense to be displayed, right?

@VaibhavArora314
Copy link
Owner

What does it mean? It doesn't make sense to be displayed, right?

yes, that's the issue. we need to remove it and if possible below selected tags in filter we can show some options for users to select tags from

@Parth18Shah
Copy link
Contributor Author

Can't we modify the placeholder to show some sample keywords that the users could use to filter by tag?

@VaibhavArora314
Copy link
Owner

Can't we modify the placeholder to show some sample keywords that the users could use to filter by tag?

yes, you can see how we are getting some of these on the home page and reuse that logic
image

@Parth18Shah
Copy link
Contributor Author

Got it

@Parth18Shah
Copy link
Contributor Author

I noticed that some bugs discussed here have already been resolved. So, I will be working on the following things over here:

  • Mainly add a few tags in the placeholder as an example
  • Modify the code layout not to show the previous and next button if no results are found
  • Modify the styling of the text on the posts displayed to avoid the dark blue/white strip behind the text

Could you please confirm if you want to keep the filter by tags case insensitive? Currently, we are storing the input tags in lowercase, which will skip over the posts that contain the same tags but with different characters capitalized. For example, a post with the tag 'Form' won't show currently if we filter by 'form' or even 'Form' tag.

@VaibhavArora314
Copy link
Owner

I noticed that some bugs discussed here have already been resolved. So, I will be working on the following things over here:

  • Mainly add a few tags in the placeholder as an example
  • Modify the code layout not to show the previous and next button if no results are found
  • Modify the styling of the text on the posts displayed to avoid the dark blue/white strip behind the text

Could you please confirm if you want to keep the filter by tags case insensitive? Currently, we are storing the input tags in lowercase, which will skip over the posts that contain the same tags but with different characters capitalized. For example, a post with the tag 'Form' won't show currently if we filter by 'form' or even 'Form' tag.

Sure go ahead. Just one question, which dark blue/white strip?

@Parth18Shah
Copy link
Contributor Author

image image

notice that there is a background strip behind the text 'Modal' and 'modal' that goes across the width .. although they aren't very visible, they aren't needed, and once you notice them, they seem to be distracting.

Could you please comment on the case insensitive part for the filtering?

@VaibhavArora314
Copy link
Owner

image image
notice that there is a background strip behind the text 'Modal' and 'modal' that goes across the width .. although they aren't very visible, they aren't needed, and once you notice them, they seem to be distracting.

Could you please comment on the case insensitive part for the filtering?

The filtering should be case insensitive and for the background, you can remove the strips.

@Parth18Shah
Copy link
Contributor Author

Understood, thanks for your response. Sorry for the delay in my response.

Copy link

github-actions bot commented Aug 8, 2024

Hello @Parth18Shah! Your issue #341 has been closed. Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working gssoc GSSOC
Projects
None yet
Development

No branches or pull requests

2 participants