Skip to content

Conversation

@fregante
Copy link
Member

@fregante fregante commented Jul 6, 2021

Closes #3857
Based on #4520

Test

Any draft PR

fregante/webext-detect#2

  • "Comment" button, repeatedly

https://github.com/fregante/webext-detect-page/pull/2/files

Screenshots

Screen Shot 14

Screen Shot

@fregante fregante force-pushed the comment-on-draft-pr-indicator branch from 6df91d6 to 6a3f2af Compare July 6, 2021 17:21
@fregante fregante changed the title Add comment-to-draft-pr-button feature Add comment-on-draft-pr-indicator feature Jul 6, 2021
@fregante fregante requested a review from yakov116 July 6, 2021 17:24
@fregante
Copy link
Member Author

fregante commented Jul 6, 2021

@yakov116 you mentioned the need for deduplicate, but I don't see it here. Can you double-check?

Copy link
Member

@yakov116 yakov116 left a comment

Choose a reason for hiding this comment

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

Does not stay after commenting. I think just doing deduplicate false will work
Video_2021-07-06_133522

@darkred
Copy link
Contributor

darkred commented Jul 6, 2021

I just want to clarify one thing:
the above issue is the exact I had with my PR:
without onNewComments the button wouldn't stay after updating,
and setting deduplicate: 'false' didn't help.

@fregante
Copy link
Member Author

fregante commented Jul 7, 2021

The "Close with comment | Comment" part is a partial that is updated independently of new comments. I used a node removal listener to track its replacement

gif

and setting deduplicate: 'false' didn't help.

deduplicate accepts selectors and false, not 'false'


export default async function onReplacedElement(selector: string, callback: VoidCallback): Promise<void> {
export default async function onReplacedElement(
selector: string,
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be changed to an object? Isn't it a boolean trap?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure I follow

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh you meant to comment on the callNow line since there's no boolean here 😃

Good point, changing

Copy link
Member

Choose a reason for hiding this comment

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

Sorry I was on mobile and selected the wrong line.

@fregante fregante marked this pull request as ready for review July 8, 2021 12:08
@fregante fregante merged commit 0830ef2 into main Jul 8, 2021
@fregante fregante deleted the comment-on-draft-pr-indicator branch July 8, 2021 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Indicator that you're about to comment on a Draft PR

3 participants