incubator-answer icon indicating copy to clipboard operation
incubator-answer copied to clipboard

Display github icon & username in UserInfo

Open conr2d opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe.

Currently, the website in user info page shows the domain name of user's website.

Describe the solution you'd like

If user's website is hosted on a well-known service like github, it would be good if it can show the service icon and username like @conr2d.

Describe alternatives you've considered

Customizing additional user info items can be provided as a feature of administration.

conr2d avatar Jul 10 '23 09:07 conr2d

The current temporary solution is to write GitHub information in the "about me" section.

fenbox avatar Sep 11 '23 08:09 fenbox

The solutions I propose are as follows -

  1. Pattern match the website URL with well knows hosting providers and conditionally render the corresponding icons. Relevant code in repository

    Implementation details:

    In the above code, the icon name needs to be changed conditionally.

  2. In case of GitHub hosting, GitHub username can be found from the URL (As far as I understand the subdomain section of github.io in the website URL should work). Relevant code in repository

    Implementation details:

    We can add a div below the existing data.username and create a GitHub page link by concatenating github username with githul base URL. We can additionally give the user the option to add custom GitHub profile URL instead of the one fetched from website, in case the website is hosted on some other GitHub account, for any particular reason, or disable the feature of extracting GitHub from website URL.

Please share your thoughts and feedback on these. If approved, I'm ready to proceed with implementation.

AdityaMayukhSom avatar Dec 31 '23 19:12 AdityaMayukhSom