BioDrop icon indicating copy to clipboard operation
BioDrop copied to clipboard

Fix tag totals and popular tags on map page

Open lmac-1 opened this issue 3 years ago • 25 comments

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

lmac-1 avatar Mar 16 '23 02:03 lmac-1

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.

github-actions[bot] avatar Mar 16 '23 02:03 github-actions[bot]

@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.

lmac-1 avatar Mar 22 '23 16:03 lmac-1

Sure sounds good 👍

eddiejaoude avatar Mar 23 '23 02:03 eddiejaoude

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.

eddiejaoude avatar Apr 13 '23 05:04 eddiejaoude

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.

lmac-1 avatar Apr 13 '23 16:04 lmac-1

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

eddiejaoude avatar Apr 14 '23 04:04 eddiejaoude

Is this issue still open?

Vishrut19 avatar Apr 17 '23 02:04 Vishrut19

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.

lmac-1 avatar Apr 17 '23 02:04 lmac-1

Is this issue still open?

@Vishrut19 I will assign this to you now

SaraJaoude avatar Apr 17 '23 02:04 SaraJaoude

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

Vishrut19 avatar Apr 18 '23 02:04 Vishrut19

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.

SaraJaoude avatar Apr 18 '23 04:04 SaraJaoude

Okay thanks for letting me know @SaraJaoude !

Vishrut19 avatar Apr 18 '23 05:04 Vishrut19

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

eddiejaoude avatar Apr 18 '23 05:04 eddiejaoude

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

Vishrut19 avatar Apr 18 '23 05:04 Vishrut19

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

Vishrut19 avatar Apr 18 '23 07:04 Vishrut19

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

amandamartin-dev avatar Apr 26 '23 21:04 amandamartin-dev

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

Vishrut19 avatar May 06 '23 05:05 Vishrut19

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

eddiejaoude avatar May 06 '23 05:05 eddiejaoude

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

Vishrut19 avatar May 06 '23 06:05 Vishrut19

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.

AJcodes42 avatar May 18 '23 12:05 AJcodes42