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.73k stars 3.95k forks source link

[BUG] irrelivant link #5202

Closed himanshu1221 closed 1 year ago

himanshu1221 commented 1 year ago

Description

an unknown link under the statistics page

that https://twitter.com/himanshu1221

Screenshots

Screenshot from 2023-03-02 16-36-04

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.

abhijain2003 commented 1 year ago

what could be the reasons for this

Aadarsh805 commented 1 year ago

that is very weird, I couldn't find that link anywhere in the files

Aadarsh805 commented 1 year ago

I found this link in an old patch by @himanshu1221, that means it's an old link which is not supposed to be here

https://github.com/EddieHubCommunity/LinkFree/pull/3311

ChinmayMhatre commented 1 year ago

The old links aren't removed from the backend I guess. I updated my profile to have a hashnode link and remove the dev.to link

image

While the dev.to link may not get more clicks, it still shows the previous ones.

image

I feel keeping the old ones seems okay as we could track the links previously clicked. What do ya'll think?

abhijain2003 commented 1 year ago

it means there is a problem in function implementation which handles link deletion

kumarsonsoff3 commented 1 year ago

Yeah, this shows the total stats (views, links, link clicks) of your profile. So it may include the past link clicks which are no longer available on your profile.

And I think it's okay, since it's showing the history of your profile from the day it was created it should include these all.

-- If there were a filter, for the past week, month, etc then it should filter the removed links out, as the days pass. ⏳

eddiejaoude commented 1 year ago

Great discussion! Yes historic links are displayed 👍

What about...?

ChinmayMhatre commented 1 year ago

Great discussion! Yes historic links are displayed 👍

What about...?

  • links not currently in the profile are faded slightly or shown in a separate list underneath the main list of link stats
  • when we add filters like: last 30 days, older links will not be displayed

a separate list seems like a good idea

eddiejaoude commented 1 year ago

is this issue open yet

@khanahmar please read the contributing guide to understand the labels rather than ask this on multiple issues https://github.com/EddieHubCommunity/LinkFree/blob/main/CONTRIBUTING.md

AJcodes42 commented 1 year ago

I tried looking into it. But was not able to find any mechanism to identify the links that have been deleted to show in separate list. If someone can guide on how we can identify the deleted link I would like to take this up. Applying filter for last 30days seems like a straight forward solution.

ChinmayMhatre commented 1 year ago

I tried looking into it. But was not able to find any mechanism to identify the links that have been deleted to show in separate list. If someone can guide on how we can identify the deleted link I would like to take this up. Applying filter for last 30days seems like a straight forward solution.

I have not gone tested this but I have gone through the code and noticed this:

If we check the data object that is passed and used in statistics.js. it comes from this api call

statistics.js

image

Note: This contains all previous links

If we navigate to the [username].js where only current links are displayed there is also a data object but it comes from getUserApi call.

[username].js

image image

Note : This contains current links.


To conclude, profile object from the getUserApi call exists in statistics.js as well. you can use data.links for all links and profile.links for current links and compare. (Please verify this I am not sure).

ChinmayMhatre commented 1 year ago

@AJcodes42 Please let me know if you need further help or if I didn't articulate my previous message correctly.

AJcodes42 commented 1 year ago

Thanks @ChinmayMhatre. I missed the getUserApi call in statistics.js. Could you please assign the issue to me and also let me know how the deleted links should get disabled.

ChinmayMhatre commented 1 year ago

Thanks @ChinmayMhatre. I missed the getUserApi call in statistics.js. Could you please assign the issue to me and also let me know how the deleted links should get disabled.

Unfortunately I can't assign you since I am not a maintainer but feel free to build the logic and create a PR, Eddie will assign it to you once he gets time.

Eddie has suggested this for displaying the deleted ones

"I think we can just grey/fade the links for now in the same list"

eddiejaoude commented 1 year ago

Great collab 👍 but just to clarify please read the contributing guide, PRs should not be started without being assigned as this causes confusion and extra work for everyone (also other maintainers can assign issues too) https://github.com/EddieHubCommunity/LinkFree/blob/main/CONTRIBUTING.md

For this issue let's not remove the links, I think it would be best to just fade them so people can still see historic links for now.

I will assign the issue to @AJcodes42