Changeset - 329c0584cba8
[Not reviewed]
default
0 3 0
Thomas De Schampheleire - 10 years ago 2015-06-18 08:46:07
thomas.de.schampheleire@gmail.com
comments: remove dysfunctional comment bubble on compare and file views (issue #84)

Several compare and file views would show a comment bubble when hovering
code lines, even though clicking on this bubble would not do anything.

Instead, make sure that the bubble only appears when the diff block is in a
class 'commentable-diff', which can be set from the appropriate places
(changeset and pullrequest views) where a click handler is also attached.
3 files changed with 8 insertions and 5 deletions:
0 comments (0 inline, 0 general)
kallithea/public/css/style.css
Show inline comments
 
@@ -5008,9 +5008,10 @@ table.code-difftable .unmod .code pre:be
 
    box-sizing: border-box;
 
}
 

	
 
tr.line.add:hover td .add-bubble,
 
tr.line.del:hover td .add-bubble,
 
tr.line.unmod:hover td .add-bubble {
 
/* comment bubble, only visible when in a commentable diff */
 
.commentable-diff tr.line.add:hover td .add-bubble,
 
.commentable-diff tr.line.del:hover td .add-bubble,
 
.commentable-diff tr.line.unmod:hover td .add-bubble {
 
    display: block;
 
    z-index: 1;
 
}
kallithea/templates/changeset/changeset.html
Show inline comments
 
@@ -158,13 +158,14 @@ ${self.repo_context_bar('changelog', c.c
 
    </div>
 

	
 
    ## diff block
 
    <div class="commentable-diff">
 
    <%namespace name="diff_block" file="/changeset/diff_block.html"/>
 
    ${diff_block.diff_block_js()}
 
    ${diff_block.diff_block(c.changes[c.changeset.raw_id])}
 

	
 
    % if c.limited_diff:
 
      <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}">${_('Show full diff anyway')}</a></h4>
 
    % endif
 
    </div>
 

	
 
    ## template for inline comment form
 
    ${comment.comment_inline_form()}
kallithea/templates/pullrequests/pullrequest_show.html
Show inline comments
 
@@ -341,6 +341,7 @@ ${self.repo_context_bar('showpullrequest
 
    </script>
 

	
 
    ## diff block
 
    <div class="commentable-diff">
 
    <%namespace name="diff_block" file="/changeset/diff_block.html"/>
 
    ${diff_block.diff_block_js()}
 
    %for fid, change, f, stat in c.files:
 
@@ -349,7 +350,7 @@ ${self.repo_context_bar('showpullrequest
 
    % if c.limited_diff:
 
      <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}">${_('Show full diff anyway')}</a></h4>
 
    % endif
 

	
 
    </div>
 

	
 
    ## template for inline comment form
 
    ${comment.comment_inline_form()}
0 comments (0 inline, 0 general)