File tree Expand file tree Collapse file tree 4 files changed +5
-23
lines changed
Expand file tree Collapse file tree 4 files changed +5
-23
lines changed Original file line number Diff line number Diff line change @@ -68,9 +68,8 @@ function SpotRow({ commentState, onClick }: SpotRowProps) {
6868 >
6969 < TableCell className = 'p-3' >
7070 < div className = 'flex items-center gap-2' >
71- < span className = 'text-lg' > { enhancer . tableIcon ( commentState . spot ) } </ span >
7271 < div className = 'font-medium text-sm text-foreground overflow-hidden text-ellipsis whitespace-nowrap' >
73- { enhancer . tableTitle ( commentState . spot ) }
72+ { enhancer . tableRow ( commentState . spot ) }
7473 </ div >
7574 </ div >
7675 </ TableCell >
Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ export interface CommentEnhancer<Spot extends CommentSpot = CommentSpot> {
4141 * exactly once since pageload before this gets called.
4242 */
4343 enhance ( textarea : HTMLTextAreaElement , spot : Spot ) : OverTypeInstance
44-
45- tableIcon ( spot : Spot ) : string
46- tableTitle ( spot : Spot ) : ReactNode
44+ /** Returns a ReactNode which will be displayed in the table row. */
45+ tableRow ( spot : Spot ) : ReactNode
4746}
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ export class GitHubIssueAddCommentEnhancer implements CommentEnhancer<GitHubIssu
5555 } ) [ 0 ] !
5656 }
5757
58- tableTitle ( spot : GitHubIssueAddCommentSpot ) : React . ReactNode {
58+ tableRow ( spot : GitHubIssueAddCommentSpot ) : React . ReactNode {
5959 const { slug, number } = spot
6060 return (
6161 < span >
@@ -64,12 +64,4 @@ export class GitHubIssueAddCommentEnhancer implements CommentEnhancer<GitHubIssu
6464 </ span >
6565 )
6666 }
67-
68- tableIcon ( _ : GitHubIssueAddCommentSpot ) : string {
69- return '🔄' // PR icon TODO: icon urls in /public
70- }
71-
72- buildUrl ( spot : GitHubIssueAddCommentSpot ) : string {
73- return `https://${ spot . domain } /${ spot . slug } /issue/${ spot . number } `
74- }
7567}
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ export class GitHubPRAddCommentEnhancer implements CommentEnhancer<GitHubPRAddCo
5959 } ) [ 0 ] !
6060 }
6161
62- tableTitle ( spot : GitHubPRAddCommentSpot ) : React . ReactNode {
62+ tableRow ( spot : GitHubPRAddCommentSpot ) : React . ReactNode {
6363 const { slug, number } = spot
6464 return (
6565 < span >
@@ -68,12 +68,4 @@ export class GitHubPRAddCommentEnhancer implements CommentEnhancer<GitHubPRAddCo
6868 </ span >
6969 )
7070 }
71-
72- tableIcon ( _ : GitHubPRAddCommentSpot ) : string {
73- return '🔄' // PR icon TODO: icon urls in /public
74- }
75-
76- buildUrl ( spot : GitHubPRAddCommentSpot ) : string {
77- return `https://${ spot . domain } /${ spot . slug } /pull/${ spot . number } `
78- }
7971}
You can’t perform that action at this time.
0 commit comments