Comment 1 for bug 2031173

Revision history for this message
Ines Almeida (ines-almeida) wrote (last edit ):

Interesting, thanks for reporting.

My current understanding is that when we render the patch file, we render it similarly to the diff section. This includes adding items with id=`diff-line-<line number>`, which conflicts with the ids of the real diff items.

When we then try to render the inline-comments, we then get the item with id `diff-line-<line>` but that returns the patch item instead of the actual diff item. See `lib/lp/code/javascript/branchmergeproposal.inlinecomments.js` for where inline-comments a rendered: `Y.one('#diff-line-' + comment.line_number).insert(comments_tr, 'after');`

To fix this, we would need to rework how the patch files are rendered so they don't use the same item IDs as the real diff.
See `lib/lp/code/templates/branchmergeproposal-diff.pt`.