diff --git a/src/lib/enhancers/github/githubEditComment.tsx b/src/lib/enhancers/github/githubEditComment.tsx index 4f6ea46..6a78d37 100644 --- a/src/lib/enhancers/github/githubEditComment.tsx +++ b/src/lib/enhancers/github/githubEditComment.tsx @@ -1,6 +1,6 @@ import OverType, { type OverTypeInstance } from 'overtype' import type React from 'react' -import type { CommentEnhancer, CommentSpot } from '@/lib/enhancer' +import type { CommentEnhancer, CommentSpot, StrippedLocation } from '@/lib/enhancer' import { logger } from '@/lib/logger' import { modifyDOM } from '../modifyDOM' import { commonGithubOptions } from './ghOptions' @@ -8,10 +8,6 @@ import { prepareGitHubHighlighter } from './githubHighlighter' export interface GitHubEditCommentSpot extends CommentSpot { type: 'GH_EDIT_COMMENT' - title: string - domain: string - slug: string - number: number } export class GitHubEditCommentEnhancer implements CommentEnhancer { @@ -19,30 +15,35 @@ export class GitHubEditCommentEnhancer implements CommentEnhancer - {slug} - PR #{number} - - ) + tableUpperDecoration(_spot: GitHubEditCommentSpot): React.ReactNode { + return N/A } tableTitle(_spot: GitHubEditCommentSpot): string { - return 'TITLE_TODO' + return 'N/A' } } diff --git a/src/lib/enhancers/github/githubIssueAddComment.tsx b/src/lib/enhancers/github/githubIssueAddComment.tsx index 70f7fed..2b1e1bb 100644 --- a/src/lib/enhancers/github/githubIssueAddComment.tsx +++ b/src/lib/enhancers/github/githubIssueAddComment.tsx @@ -31,6 +31,12 @@ export class GitHubIssueAddCommentEnhancer implements CommentEnhancer { { "for": "id=:rc3: name=null className=prc-Textarea-TextArea-13q4j focus-visible overtype-input", "spot": { - "domain": "github.com", - "number": 56, - "slug": "diffplug/gitcasso", - "title": "what about the draft?", - "type": "GH_ISSUE_ADD_COMMENT", - "unique_key": "github.com:diffplug/gitcasso:56", + "type": "GH_EDIT_COMMENT", + "unique_key": "github.com:diffplug/gitcasso:56:edit-body", }, - "title": "what about the draft?", - "upperDecoration": - - - - # - 56 - - diffplug/gitcasso - - , + "title": "N/A", + "upperDecoration": + N/A + , }, { "for": "id=:ra7: name=null className=prc-Textarea-TextArea-13q4j overtype-input", @@ -261,27 +243,13 @@ describe('github', () => { { "for": "id=issue-3429313834-body name=pull_request[body] className=js-comment-field js-paste-markdown js-task-list-field js-quick-submit js-size-to-fit size-to-fit js-session-resumable CommentBox-input FormControl-textarea js-saved-reply-shortcut-comment-field focus-visible overtype-input", "spot": { - "domain": "github.com", - "number": NaN, - "slug": "diffplug/gitcasso", - "title": "TODO_TITLE", "type": "GH_EDIT_COMMENT", - "unique_key": "github.com:diffplug/gitcasso:NaN", + "unique_key": "github.com:diffplug/gitcasso:58:edit-body", }, - "title": "TITLE_TODO", - "upperDecoration": - - diffplug/gitcasso - - - PR # - NaN - - , + "title": "N/A", + "upperDecoration": + N/A + , }, { "for": "id=new_comment_field name=comment[body] className=js-comment-field js-paste-markdown js-task-list-field js-quick-submit FormControl-textarea CommentBox-input js-size-to-fit size-to-fit js-session-resumable js-saved-reply-shortcut-comment-field overtype-input",