Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show author of PR/issue in link tooltip #597

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion webapp/src/components/link_tooltip/link_tooltip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ export const LinkTooltip = ({href, connected, show, theme}) => {
if (data) {
let date = new Date(data.created_at);
date = date.toDateString();

let authorText = '';
if (data.user) {
authorText = ' by ' + data.user.login;
} else if (data.owner) {
authorText = ' by ' + data.owner.login;
}

return (
<div className='github-tooltip'>
<div
Expand All @@ -97,7 +105,7 @@ export const LinkTooltip = ({href, connected, show, theme}) => {
{data.repo}
</span>
{' on '}
<span>{date}</span>
<span>{date + authorText}</span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have the username be a clickable link to the user's GitHub profile?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mickmister Is this a blocking comment?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hanzei Yes this is a blocking comment

</div>

<div className='body d-flex mt-2'>
Expand Down