Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

[BUG] irrelivant link #5202

Closed
himanshu1221 opened this issue Mar 2, 2023 · 17 comments · Fixed by #6095
Closed

[BUG] irrelivant link #5202

himanshu1221 opened this issue Mar 2, 2023 · 17 comments · Fixed by #6095
Assignees
Labels
💻 aspect: code undefined 🛠 goal: fix undefined 🔢 points: 2 undefined 🏁 status: ready for dev You can asked for this issue to be assigned (if not already assigned)

Comments

@himanshu1221
Copy link
Contributor

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

@himanshu1221 himanshu1221 added 🚦 status: awaiting triage Waiting for maintainers to verify (please do not start work on this yet) 🛠 goal: fix undefined labels Mar 2, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2023

It's great having you contribute to this project

Welcome to the community 🤓

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
Copy link
Contributor

what could be the reasons for this

@Aadarsh805
Copy link
Member

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

@Aadarsh805
Copy link
Member

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

#3311

@ChinmayMhatre
Copy link
Member

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
Copy link
Contributor

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

@kumarsonsoff3
Copy link
Member

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
Copy link
Member

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

@ChinmayMhatre
Copy link
Member

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 eddiejaoude added 💻 aspect: code undefined 🏁 status: ready for dev You can asked for this issue to be assigned (if not already assigned) 🔢 points: 2 undefined and removed 🚦 status: awaiting triage Waiting for maintainers to verify (please do not start work on this yet) labels Mar 20, 2023
@eddiejaoude
Copy link
Member

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
Copy link
Contributor

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
Copy link
Member

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
Copy link
Member

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

@AJcodes42
Copy link
Contributor

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
Copy link
Member

ChinmayMhatre commented Apr 13, 2023

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
Copy link
Member

eddiejaoude commented Apr 14, 2023

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

AJcodes42 added a commit to AJcodes42/LinkFree that referenced this issue Apr 15, 2023
AJcodes42 added a commit to AJcodes42/LinkFree that referenced this issue Apr 18, 2023
eddiejaoude pushed a commit that referenced this issue Apr 19, 2023
* fix: fade deleted links #5202

* fix: discard deleted links #5202
eddiejaoude added a commit that referenced this issue Apr 19, 2023
* fix: old links removed from dashboard #5202 (#6095)

* fix: fade deleted links #5202

* fix: discard deleted links #5202

* fix: coding standards

---------

Co-authored-by: Ajay Singh <ajaysingh942@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
💻 aspect: code undefined 🛠 goal: fix undefined 🔢 points: 2 undefined 🏁 status: ready for dev You can asked for this issue to be assigned (if not already assigned)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants
@eddiejaoude @AJcodes42 @himanshu1221 @ChinmayMhatre @kumarsonsoff3 @abhijain2003 @Aadarsh805 and others