EddieHubCommunity / BioDrop

Connect to your audience with a single link. Showcase the content you create and your projects in one place. Make it easier for people to find, follow and subscribe.
https://biodrop.io
MIT License
5.71k stars 3.94k forks source link

Fix tag totals and popular tags on map page #5470

Closed lmac-1 closed 1 year ago

lmac-1 commented 1 year ago

Description

At the moment, the popular tags and tag totals on the map page are generated using all LinkFree users. The map page only displays users that have their location set, so the total number for each tags and popular tags should take this into account.

At the moment it isn't so apparent, but when #5405 is fixed, it will be a bit confusing for the user.

Screenshots

Popular tags and tag totals for the search page (which uses all LinkFree users):

image

Popular tags and tag totals on the map page should be different to the search page as it is only displaying users with location set:

image

Additional information

No response

github-actions[bot] commented 1 year ago

It's great having you contribute to this project

Welcome to the community :nerd_face:

If you would like to continue contributing to open source and would like to do it with an awesome inclusive community, you should join our Discord chat and our GitHub Organisation - we help and encourage each other to contribute to open source little and often 🤓 . Any questions let us know.

lmac-1 commented 1 year ago

@eddiejaoude after seeing your LinkedIn post, could we potentially pair program on this together on Discord once you're all set up in Phuket? I have some ideas on how to solve this but not sure of the "best" way and would be cool to learn from you and the community.

eddiejaoude commented 1 year ago

Sure sounds good 👍

eddiejaoude commented 1 year ago

Hey Lucy, as we haven't managed to sync up on this yet with far timezones, we are blocking this issue. So I will unassigned for the moment.

lmac-1 commented 1 year ago

Sorry Eddie this fell off of my radar completely. I did have an idea about how to fix it by passing some query parameters when calling /api/discover/tags for the map scenario, and then building some logic around that. Would that be along the right lines for the fix?

If so, could I have a go at it? I can work on it tomorrow.

eddiejaoude commented 1 year ago

That might work, maybe something like /api/discover/tags?location=true so it only includes tags from people who would be on the map 👍

Vishrut19 commented 1 year ago

Is this issue still open?

lmac-1 commented 1 year ago

Yes @Vishrut19! I actually don't have time right now to work on this, so happy for someone else to pick it up. Eddie or one of the maintainers will need to assign it though.

SaraJaoude commented 1 year ago

Is this issue still open?

@Vishrut19 I will assign this to you now

Vishrut19 commented 1 year ago

Hey! Can you please explain this issue in a bit detail?

SaraJaoude commented 1 year ago

Hey! Can you please explain this issue in a bit detail?

@Vishrut19 whilst collaboration and asking questions is super important and something we value at EddieHub (we all get stuck at some stage!), one of the things we mention in our Contributing Guide is:

only request to be assigned an issue if you know how to work on it

Or if the Issue is unclear then please ask for clarification before you asked for it to be assigned to you.

Let's see if the community can help you get started with this, but if you are unable to start work on the Issue then we may need to unassign this from you.

Vishrut19 commented 1 year ago

Okay thanks for letting me know @SaraJaoude !

eddiejaoude commented 1 year ago

I think you can reduce the list before the calculation, to only profiles that contain a location

Vishrut19 commented 1 year ago

Sure I will do it first and then I will ask if I have more queries

Vishrut19 commented 1 year ago

And also to solve this issue! I think I should look in map.js file. Right @eddiejaoude or @lmac-1?

amandamartin-dev commented 1 year ago

And also to solve this issue! I think I should look in map.js file. Right @eddiejaoude or @lmac-1?

If you look earlier in the conversation you will see that the method Lucy and Eddie were considering is to manipulate the API logic so taht a query parameter can be passed. The relevant API can be found in the project here: pages/api/discover

Vishrut19 commented 1 year ago

Hey! Can someone tell me that is this a bug or what? When I am running the project locally and trying to go to the Map section. I can't see any tags.

Screenshot 2023-05-06 at 11 04 26 AM
eddiejaoude commented 1 year ago

Best to check your terminal and look at the logs for errors - it is probably easier to discuss in EddieHub Discord rather than here

Vishrut19 commented 1 year ago

Sure, I will check it and also if there is some issue I will ping you on EddieHub Discord Server

AJcodes42 commented 1 year ago

I would like to take this up.

Also I would suggest instead of creating /api/discover/tags?location=true as mentioned in https://github.com/EddieHubCommunity/LinkFree/issues/5470#issuecomment-1507897424, we can directly filter the tags in map.js as data.users is already having tag details also. We get user, locations and tag details from /api/users. There will be no need to call /api/discover/tags. This will save us a db hit as well to get the location details in tags.js. Let me know your views on this.

SaraJaoude commented 1 year ago

I would like to take this up.

Also I would suggest instead of creating /api/discover/tags?location=true as mentioned in #5470 (comment), we can directly filter the tags in map.js as data.users is already having tag details also. We get user, locations and tag details from /api/users. There will be no need to call /api/discover/tags. This will save us a db hit as well to get the location details in tags.js. Let me know your views on this.

@AJcodes42 thank you for putting your thoughts down. I can see that you have already been assigned https://github.com/EddieHubCommunity/LinkFree/issues/5945 so at this time we will not be assigning this to you.

We appreciate your enthusiasm to contribute but please familiarise yourself with the Working on an Issue (get it assigned to you) section of the Contributing Guide and only ask to be assigned 1 Issue at a time. This will help maintainers with managing the project.

AJcodes42 commented 1 year ago

Sure will take care of this moving forward.

AJcodes42 commented 1 year ago

I would like to work on this issue.

SaraJaoude commented 1 year ago

I would like to work on this issue.

@AJcodes42 I have assigned this to you

AJcodes42 commented 1 year ago

Raised pull reqeuest for this issue.