Skip to content

Commit

Permalink
Private replies by superusers
Browse files Browse the repository at this point in the history
  • Loading branch information
edemaine committed Dec 17, 2023
1 parent a0d0c46 commit 4735d84
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ To see every change with descriptions aimed at developers, see
As a continuously updated web app, Coauthor uses dates
instead of version numbers.

## 2023-12-17

* Superusers can now make private replies (e.g. for student feedback)
from the "Reply/Attach" dropdown.

## 2023-12-14

* `\begin{tabular}` improvements:
Expand Down
18 changes: 15 additions & 3 deletions client/message.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -1477,7 +1477,7 @@ export uploaderProps = (callback, inputRef) ->
onInput: (e) ->
callback e.target.files, e

export ReplyButtons = React.memo ({message, prefix}) ->
export ReplyButtons = React.memo ({message, prefix, can}) ->
attachInput = useRef()
defaultPublished = useTracker ->
autopublish()
Expand Down Expand Up @@ -1657,6 +1657,18 @@ export ReplyButtons = React.memo ({message, prefix}) ->
</Dropdown.Item>
</li>
}
{if can.super and not message.private and not privateReply
<li>
<TextTooltip placement="left" title="Start a new #{adjectives}child message of this one, visible only to coauthors and those explicitly given access#{once}, initially set to coauthors of the message you're replying to.">
<Dropdown.Item href="#" data-privacy="private" onClick={onReply}>
<button className="btn btn-info btn-block replyButton">
{prefix}
Private Reply
</button>
</Dropdown.Item>
</TextTooltip>
</li>
}
</Dropdown.Menu>
<input className="attachInput" type="file" multiple ref={attachInput}
{...inputProps}/>
Expand Down Expand Up @@ -2878,7 +2890,7 @@ export WrappedSubmessage = React.memo ({message, read}) ->
</button>
}
{if can.reply
<ReplyButtons message={message} prefix="New "/>
<ReplyButtons message={message} prefix="New " can={can}/>
}
</div>
</div>
Expand All @@ -2892,7 +2904,7 @@ export WrappedSubmessage = React.memo ({message, read}) ->
</div>
<div className="panel-body panel-secondbody hidden-print clearfix">
{if can.reply and not read
<ReplyButtons message={message} prefix="New "/>
<ReplyButtons message={message} prefix="New " can={can}/>
}
<span className="message-title">
<a className="btn btn-default btn-xs linkToTop" aria-label="Top" href="##{message._id}">
Expand Down

0 comments on commit 4735d84

Please sign in to comment.