File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 126126 {{template "repo/diff/conversation" dict "." $ "comments" $line.Comments}}
127127 </td>
128128 </tr>
129+ <button class="pull-request-diff-comments hidden"></button>
130+ <script class="pull-request-diff-comments">
131+ var $buttons = document.querySelector('button.pull-request-diff-comments');
132+ if ($buttons) {
133+ $buttons.click();
134+ }
135+ </script>
129136 {{end}}
130137 {{end}}
131138{{end}}
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import {
1919import { POST , GET } from '../modules/fetch.ts' ;
2020import { fomanticQuery } from '../modules/fomantic/base.ts' ;
2121import { createTippy } from '../modules/tippy.ts' ;
22+ import { initGlobalDropdown } from './common-page.ts' ;
2223
2324const { pageData, i18n} = window . config ;
2425
@@ -94,6 +95,13 @@ function initRepoDiffConversationForm() {
9495 }
9596 } ) ;
9697
98+ $ ( document ) . on ( 'click' , '.pull-request-diff-comments' , async ( e ) => {
99+ e . preventDefault ( ) ;
100+ initGlobalDropdown ( ) ;
101+ // post initiation cleaning up the buttons and scripts
102+ $ ( '.pull-request-diff-comments' ) . remove ( ) ;
103+ } ) ;
104+
97105 $ ( document ) . on ( 'click' , '.resolve-conversation' , async function ( e ) {
98106 e . preventDefault ( ) ;
99107 const comment_id = $ ( this ) . data ( 'comment-id' ) ;
You can’t perform that action at this time.
0 commit comments