Skip to content

Commit

Permalink
Make PR title a PR link, remove PR number column
Browse files Browse the repository at this point in the history
  • Loading branch information
jdgarcia committed Oct 18, 2024
1 parent 709b828 commit 746a4d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
13 changes: 8 additions & 5 deletions src/popup/components/FocusView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,25 @@ const PullRequestRow = ({ userId, pullRequest, provider, draftCount = 0 }: PullR
return (
<>
<div className="pull-request">
<div className="pull-request-title truncate">{pullRequest.title}</div>
<div className="repository-name text-secondary truncate">{pullRequest.repository.name}</div>
<div className="pull-request-number">
<div className="pull-request-title truncate">
<ExternalLink
className="text-link"
className={pullRequest.url ? 'text-link' : undefined}
href={pullRequest.url || undefined}
onClick={() => {
if (!pullRequest.url) {
return;
}

// Since there is a decent chance that the PR will be acted upon after the user clicks on it,
// mark the focus view data as stale so that it will be refetched when the user returns.
void queryClient.invalidateQueries({ queryKey: [userId, 'focusViewData', provider] });
}}
title={`View pull request on ${ProviderMeta[provider].name}`}
>
#{pullRequest.number}
#{pullRequest.number} {pullRequest.title}
</ExternalLink>
</div>
<div className="repository-name text-secondary truncate">{pullRequest.repository.name}</div>
{deepLinkUrl && (
<ExternalLink href={deepLinkUrl} title="Open with GitKraken">
<i className="fa-brands fa-gitkraken icon text-link text-lg" />
Expand Down
5 changes: 1 addition & 4 deletions static/popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,11 @@ html {
margin-right: 12px;
}
.focus-view .pull-request-bucket .pull-request .pull-request-title {
width: 274;
width: 350px;
}
.focus-view .pull-request-bucket .pull-request .repository-name {
width: 148px;
}
.focus-view .pull-request-bucket .pull-request .pull-request-number {
width: 64px;
}
.focus-view .pull-request-bucket .pr-drafts-badge {
border: 1px solid var(--color-border-input);
border-radius: 12px;
Expand Down

0 comments on commit 746a4d3

Please sign in to comment.