Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Solution overview

Scope

This design covers adding comments to both cloud and server macros and on draw.io diagrams only.

Zenuml graph macro
uuid7e41c903-a849-43c6-b7c5-141ffd41b640
updatedAt2020-10-04T09:44:29Z

Sequence diagrams

Add a comment

Zenuml sequence macro
uuidfe90a67c-a499-46e5-944b-aa3535684f19
updatedAt2020-10-04T09:45:42Z
@Starter(macro)
// get page Id from window.location
page = Confluence.getPage(pageId)


anchor = createAnchor(uuid) {
  p = findMacroPostion()
  newPage = updatePage(page, p, uuid)
}

Confluence.updatePage(pageId, newPage)

commentId = Confluence.createComment(pageId, anchor)

Save(commentId) {
  Confluence.updateContentProperty(commentId, anchorname)
}

Load comments

Zenuml sequence macro
uuid100f0427-8447-4159-89ad-ecaf22ade0d4
updatedAt2020-10-04T09:48:28Z
@Starter(Browser)
Macro.RenderComments() {
  comments = Confluence.getContentProerpty()
  foreach(comment) {
    commentId = comment.getId
    comment = Confluence.getComment(commentId)

    Render(comment) {
      // Comment can be resolved or deleted
      if(commentIsOpen) {
       show()
      }
    }  
  }
}