Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upSet group and visibility of reply to that of parent #2650
Conversation
seanh
added
the
WIP
label
Oct 21, 2015
seanh
self-assigned this
Oct 21, 2015
seanh
added some commits
Oct 21, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
seanh
removed
the
WIP
label
Oct 21, 2015
seanh
removed their assignment
Oct 21, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
This is done, who wants to review it? @nickstenning @robertknight |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
seanh
Oct 21, 2015
Contributor
This should also fix the problem with replying in the stream. No matter what group you had focused last time you used the sidebar, replies in the stream should get the same group as their parents
|
This should also fix the problem with replying in the stream. No matter what group you had focused last time you used the sidebar, replies in the stream should get the same group as their parents |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
nickstenning
Oct 22, 2015
Contributor
This looks great. Nice and clean. One minor thing: the publish-annotation-btn directive no longer needs an isNew param, so that can be removed (from the directive, its tests, and annotation.html).
|
This looks great. Nice and clean. One minor thing: the |
robertknight
reviewed
Oct 22, 2015
| @@ -691,6 +751,44 @@ describe("AnnotationController", -> | ||
| it("creates the directive without crashing", -> | ||
| createAnnotationDirective({}) | ||
| ) | ||
| it("sets the permissions of new annotations from local storage", -> |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
robertknight
Oct 22, 2015
Contributor
here are only two cases here so it doesn't make much difference, but in general I prefer that when you have several tests with very similar logic, they be expressed as:
var cases = [...]
cases.forEach(function (case) {
it('does something for case ' + case.name, function () {
// create variant using the case
});
}
robertknight
Oct 22, 2015
Contributor
here are only two cases here so it doesn't make much difference, but in general I prefer that when you have several tests with very similar logic, they be expressed as:
var cases = [...]
cases.forEach(function (case) {
it('does something for case ' + case.name, function () {
// create variant using the case
});
}
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
LGTM - Just the trivial comment nick mentioned. |
seanh commentedOct 21, 2015
Set the group and visibility of replies to that of their parents, when
replies are first created.
Also prevent the visibility setting of a reply from overwriting the
cached-in-local-storage visibility level. This prevents the following
problem:
setting is public)
instead of public, even though the user never did anything to change
the visibility from public to private, it was done automatically
because they replied to a private annotation.
Obviously changing the mode from private to public when replying to a
public annotation was also possible.
This means that if the user does change the visibility of a reply, we
don't cache that either:
setting is public)
(and the value cached in the local storage is already the same anyway)
private
defaulting to public, will not have changed to private mode