Skip to content

Commit 7db63a0

Browse files
committed
Update icon and use <draft> and <untitled> as our placeholders.
1 parent dfd0036 commit 7db63a0

File tree

5 files changed

+21
-29
lines changed

5 files changed

+21
-29
lines changed

src/lib/enhancers/github/GitHubIssueAppendEnhancer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export class GitHubIssueAppendEnhancer
9191
<IssueOpenedIcon size={16} />
9292
</span>
9393
<span>
94-
#{spot.number} |{" "}
94+
#{spot.number}{" "}
9595
<a
9696
href={`https://${spot.domain}/${spot.slug}`}
9797
className="truncate hover:underline"

src/lib/enhancers/github/GitHubIssueCreateEnhancer.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@ import { commonGitHubOptions, prepareGitHubHighlighter } from "./github-common"
1111

1212
const GH_ISSUE_CREATE = "GH_ISSUE_CREATE" as const
1313

14-
interface GitHubIssueCreateSpot extends CommentSpot {
14+
export interface GitHubIssueCreateSpot extends CommentSpot {
1515
type: typeof GH_ISSUE_CREATE
1616
domain: string
1717
slug: string // owner/repo
1818
title: string
1919
}
2020

2121
export class GitHubIssueCreateEnhancer
22-
implements CommentEnhancer<GitHubIssueCreateSpot>
23-
{
22+
implements CommentEnhancer<GitHubIssueCreateSpot> {
2423
forSpotTypes(): string[] {
2524
return [GH_ISSUE_CREATE]
2625
}
@@ -81,7 +80,7 @@ export class GitHubIssueCreateEnhancer
8180
<IssueOpenedIcon size={16} />
8281
</span>
8382
<span>
84-
New |{" "}
83+
&lt;draft&gt;{" "}
8584
<a
8685
href={`https://${spot.domain}/${spot.slug}`}
8786
className="truncate hover:underline"
@@ -94,7 +93,7 @@ export class GitHubIssueCreateEnhancer
9493
}
9594

9695
tableTitle(spot: GitHubIssueCreateSpot): string {
97-
return spot.title || "New Issue"
96+
return spot.title || "<untitled issue>"
9897
}
9998

10099
buildUrl(spot: GitHubIssueCreateSpot): string {

src/lib/enhancers/github/GitHubPrAppendEnhancer.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FeedPullRequestOpenIcon } from "@primer/octicons-react"
1+
import { GitPullRequestIcon } from "@primer/octicons-react"
22
import OverType, { type OverTypeInstance } from "overtype"
33
import type React from "react"
44
import type {
@@ -87,10 +87,10 @@ export class GitHubPrAppendEnhancer
8787
return (
8888
<>
8989
<span className="flex h-4 w-4 flex-shrink-0 items-center justify-center">
90-
<FeedPullRequestOpenIcon size={16} />
90+
<GitPullRequestIcon size={16} />
9191
</span>
9292
<span>
93-
#{spot.number} |{" "}
93+
#{spot.number}{" "}
9494
<a
9595
href={`https://${spot.domain}/${spot.slug}`}
9696
className="truncate hover:underline"

src/lib/enhancers/github/GitHubPrCreateEnhancer.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FeedPullRequestOpenIcon } from "@primer/octicons-react"
1+
import { GitPullRequestIcon } from "@primer/octicons-react"
22
import OverType, { type OverTypeInstance } from "overtype"
33
import type {
44
CommentEnhancer,
@@ -11,18 +11,17 @@ import { commonGitHubOptions, prepareGitHubHighlighter } from "./github-common"
1111

1212
const GH_PR_CREATE = "GH_PR_CREATE" as const
1313

14-
interface GitHubPrCreateSpot extends CommentSpot {
14+
export interface GitHubPrCreateSpot extends CommentSpot {
1515
type: typeof GH_PR_CREATE
1616
domain: string
1717
slug: string // owner/repo
1818
title: string
19-
head: string // `user:repo:branch` where changes are implemented
19+
head: string // `user:repo:branch ` where changes are implemented
2020
base: string // branch you want changes pulled into
2121
}
2222

2323
export class GitHubPrCreateEnhancer
24-
implements CommentEnhancer<GitHubPrCreateSpot>
25-
{
24+
implements CommentEnhancer<GitHubPrCreateSpot> {
2625
forSpotTypes(): string[] {
2726
return [GH_PR_CREATE]
2827
}
@@ -93,10 +92,10 @@ export class GitHubPrCreateEnhancer
9392
return (
9493
<>
9594
<span className="flex h-4 w-4 flex-shrink-0 items-center justify-center">
96-
<FeedPullRequestOpenIcon size={16} />
95+
<GitPullRequestIcon size={16} />
9796
</span>
9897
<span>
99-
New |{" "}
98+
&lt;draft&gt;{" "}
10099
<a
101100
href={`https://${spot.domain}/${spot.slug}`}
102101
className="truncate hover:underline"
@@ -109,7 +108,7 @@ export class GitHubPrCreateEnhancer
109108
}
110109

111110
tableTitle(spot: GitHubPrCreateSpot): string {
112-
return spot.title || "New Pull Request"
111+
return spot.title || "<untitled pull request>"
113112
}
114113

115114
buildUrl(spot: GitHubPrCreateSpot): string {

tests/lib/enhancers/__snapshots__/gh-ui.test.ts.snap

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ exports[`github ui > gh_issue:should render correct UI elements 1`] = `
1616
<span>
1717
#
1818
523
19-
|
2019
2120
<a
2221
className="truncate hover:underline"
@@ -53,7 +52,6 @@ exports[`github ui > gh_issue_edit:should render correct UI elements 1`] = `
5352
<span>
5453
#
5554
56
56-
|
5755
5856
<a
5957
className="truncate hover:underline"
@@ -97,7 +95,6 @@ exports[`github ui > gh_issue_edit_multiple:should render correct UI elements 1`
9795
<span>
9896
#
9997
3
100-
|
10198
10299
<a
103100
className="truncate hover:underline"
@@ -125,7 +122,7 @@ exports[`github ui > gh_issue_new:should render correct UI elements 1`] = `
125122
/>
126123
</span>
127124
<span>
128-
New |
125+
&lt;draft&gt;
129126
130127
<a
131128
className="truncate hover:underline"
@@ -149,14 +146,13 @@ exports[`github ui > gh_pr:should render correct UI elements 1`] = `
149146
<span
150147
className="flex h-4 w-4 flex-shrink-0 items-center justify-center"
151148
>
152-
<FeedPullRequestOpenIcon
149+
<GitPullRequestIcon
153150
size={16}
154151
/>
155152
</span>
156153
<span>
157154
#
158155
517
159-
|
160156
161157
<a
162158
className="truncate hover:underline"
@@ -188,14 +184,13 @@ exports[`github ui > gh_pr_edit:should render correct UI elements 1`] = `
188184
<span
189185
className="flex h-4 w-4 flex-shrink-0 items-center justify-center"
190186
>
191-
<FeedPullRequestOpenIcon
187+
<GitPullRequestIcon
192188
size={16}
193189
/>
194190
</span>
195191
<span>
196192
#
197193
58
198-
|
199194
200195
<a
201196
className="truncate hover:underline"
@@ -233,14 +228,13 @@ exports[`github ui > gh_pr_edit_multiple:should render correct UI elements 1`] =
233228
<span
234229
className="flex h-4 w-4 flex-shrink-0 items-center justify-center"
235230
>
236-
<FeedPullRequestOpenIcon
231+
<GitPullRequestIcon
237232
size={16}
238233
/>
239234
</span>
240235
<span>
241236
#
242237
5
243-
|
244238
245239
<a
246240
className="truncate hover:underline"
@@ -263,12 +257,12 @@ exports[`github ui > gh_pr_new:should render correct UI elements 1`] = `
263257
<span
264258
className="flex h-4 w-4 flex-shrink-0 items-center justify-center"
265259
>
266-
<FeedPullRequestOpenIcon
260+
<GitPullRequestIcon
267261
size={16}
268262
/>
269263
</span>
270264
<span>
271-
New |
265+
&lt;draft&gt;
272266
273267
<a
274268
className="truncate hover:underline"

0 commit comments

Comments
 (0)