Working together

Comments on lines of code that travel with the repository

Ask about a line of code where it is, answer in the same place, and let the comments go into Git with the code, so the review is there for whoever clones the project next.

The code view with convert.js open: comment markers in the margin beside lines 8 and 16, and the comment on line 8 open, with Thandi’s request and Sipho’s answer, and Reply, Resolve and Delete
A comment on line 8 of convert.js, with its answer.

A review of code usually happens somewhere else: in a pull request on a website, in an email, in a chat. Scriptorium Coder 1.10 lets you comment on a line where it is, in the code view, and keeps the comments with the code, so they go wherever the project goes, with or without a website.

Comment on a line

Open a code file in the project, click the line you want to ask about, and press New comment on the Review tab, or Ctrl+Alt+M. Type the comment and post it. A marker appears in the margin beside the line; click it to open the comment.

The code view with convert.js open and comment markers in the right margin beside lines 8 and 16
Markers in the margin show which lines have comments.

A comment works as it does in a document: Reply adds an answer under it, Resolve marks it done, and Delete takes it away. Each one is signed with your name and the time.

Kept beside the file

A code file cannot hold comments of its own without changing the code, so they are kept in a small file beside it, named after it:

src/convert.js
src/.convert.js.comments.json

It holds each comment’s line, the words of that line when the comment was made, and the thread, written exactly as a document’s comments are. Because it is an ordinary file in the project, Git keeps it: commit it with the code and everyone who pulls the project gets the comments too.

When the file changes somewhere else, after a pull or in another editor, and the line moves, the comment finds its line again by its words.

Resolve them as you commit

When you change the lines someone commented on and commit, the commit box offers to resolve those comments with it:

The Commit box: the message Say which units the converter takes, the two files to commit, and a tick box to resolve the comments on the lines this commit changes
The commit box offers to resolve the comment on the line this commit changes.

Tick Resolve the comments on the lines this commit changes, and each of them is resolved with a note, “Resolved in a commit:” and the commit’s message, so whoever asked can see what answered them. Only the comments on the lines that changed are offered, and the box is never ticked for you: leave it, and they stay open.

Documents too

The README, the report and the other documents of a project have the comments and suggested changes Scriptorium 3.69 brought: comments beside the page, and changes suggested for the writer to accept or reject, kept in the Markdown file itself. See Comments and suggested changes in a Markdown document.