BioDrop icon indicating copy to clipboard operation
BioDrop copied to clipboard

[FEATURE] Allow hyperlinks in profile's bio section

Open vikasganiga05 opened this issue 2 years ago • 6 comments

Description

It will be a nice feature that allows users to add hyperlinks in their bio section. Users can add links to their previous & current works, contributions, etc.

Screenshots

A user profile data, Which has a link in bio :point_down:

{
  "name": "Eddie Jaoude",
  "type": "personal",
  "bio": "Founder of <a href='https://github.com/EddieHubCommunity'>@EddieHubCommunity</a>",
  "avatar": "https://github.com/eddiejaoude.png",
  "links": ["..."]
}

image

image

Additional information

My solution :-

In src/Components/Profile.js component, Check bio prop contains hyperlinks(anchor tags) using the below regex :point_down:

const regex = /<a[\s]+([^>]+)>((?:.(?!\<\/a\>))*.)<\/a>/gi;

If it does not contain hyperlinks render the bio. If it contains the hyperlink render a new component, which converts the string hyperlinks to the anchor tags.

vikasganiga05 avatar May 26 '22 14:05 vikasganiga05

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 May 26 '22 14:05 github-actions[bot]

Isn’t this the purpose of all the links and milestones under the bio though?

EmmaDawsonDev avatar May 29 '22 15:05 EmmaDawsonDev

Isn’t this the purpose of all the links and milestones under the bio though?

Yes, your right. But in some cases, the user decides to include links in his bio. Then it will render as a text. So, there are two ways we can fix this issue, allowing users to add links in their bio section or preventing them.

vikasganiga05 avatar May 31 '22 00:05 vikasganiga05

Isn’t this the purpose of all the links and milestones under the bio though?

Yes, your right. But in some cases, the user decides to include links in his bio. Then it will render as a text. So, there are two ways we can fix this issue, allowing users to add links in their bio section or preventing them.

Hey is this issue fixed or can I try this?

AakashRaj20 avatar Jul 17 '22 17:07 AakashRaj20

Isn’t this the purpose of all the links and milestones under the bio though?

Yes, your right. But in some cases, the user decides to include links in his bio. Then it will render as a text. So, there are two ways we can fix this issue, allowing users to add links in their bio section or preventing them.

I think what Emma means is that there is already a section for links below the bio section. Adding hypertext in the bio would maybe seem like redundancy in my opinion...

Njong392 avatar Aug 07 '22 17:08 Njong392

Yes, should i close this issue?

vikasganiga05 avatar Aug 07 '22 19:08 vikasganiga05

This is now allowed with the use of markdown in the bio 👍

eddiejaoude avatar Nov 06 '22 09:11 eddiejaoude