Remove notes id while initialising notes component

What does this MR do and why?

notesIds is being used for maintaining the list of already posted notes. This dependency can be removed by checking the already posted notes on client side itself. Moreover, to get notes to render from $notes instead of using $notes.get(0), identify the element node to render. This will avoid an error from the renderGFM if the server sends comment or text nodes at 0th position.

How to set up and validate locally

Following two areas are affected by the code changes:

  • Commit detail page > Comments
  • Snippets detail page > Comments

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #391603 (closed)

Edited by Rajan Mistry

Merge request reports

Loading