- 24 Nov, 2015 2 commits
-
-
Sean Hammond authored
Do the concatenating of these loadAnnotations() instead of in multiple places that call it.
-
Sean Hammond authored
Fixes #1916. Get rid of "Message not found" messages on the /stream page. Problem: The stream requests the most recent n annotations from the search API, but what it actually gets is the most recent n annotations _and replies_. In some cases a reply may be in this set while the parent annotation that it is a reply to is not. When that happens, the frontend just displays "Message not found" in place of this thread (parent annotation and replies). Solution: Change the semantics of the search API: only return the top-level annotations (not reply annotations) in "rows". Replies are always filtered out from the Elasticsearch query results. "total" (and "limit" and "offset") only apply to these top-level annotations. Additionally, always do a second Elasticsearch query to get _all_ reply annotations to the matching top-level annotations, and return these in a new "replies" key in the API response. This means that whenever the frontend calls the search API, it always gets back all of the replies to all of the annotations that it gets, so it always has the complete threads and feeds them all into the threading code, which can safely assume that it has the complete threads and no longer produces any "Message not found" messages.
-
- 23 Nov, 2015 3 commits
-
-
Robert Knight authored
Faster database tests
-
Sean Hammond authored
Remove old feature flag data
-
Robert Knight authored
Don't log 404s to Sentry
-
- 20 Nov, 2015 3 commits
-
-
Robert Knight authored
Allow turning on debug query logging with an env var
-
Robert Knight authored
Remove the 'groups' feature flag
-
Nick Stenning authored
Merge pull request #2718 from hypothesis/2713-change-permissions-when-moving-annotations-btwn-groups Change perms when moving annotations btwn groups
-
- 19 Nov, 2015 3 commits
-
-
Sean Hammond authored
Keep the permissions of new annotations in sync with the group, when changing the focused group. This fixes an issue where a new (not yet saved to server) shared annotation in group Foo would become a private annotation if you changed the focused group to Bar. The issue is that model/@annotation.group gets changed to Foo, but model/@annotation.permissions still contains a permissions object with group Bar's ID in it, and as a result the permissions service thinks that it is a private annotation. The fix is to update both .group and .permissions when the focused group changes, and to update the drafts service _after_ doing this not before (otherwise a copy of the annotation containing the previous group's ID gets saved to the drafts service, and then later gets read from the drafts service and overwrites the correct data). Fixes #2713.
-
Nick Stenning authored
This is deployed and toggled on everywhere, so we can simplify our code by removing this feature flag. There's one small wrinkle here, which is that there are still two distinct designs for the "top bar" -- one for the sidebar and one for the stream. I've simplified this in this commit, and removed any reference to groups as a toggle for the two flavours of sidebar, but at some point we will probably want to unify the two experiences.
-
Nick Stenning authored
Replace angular-websocket with a minimal WebSocket wrapper & fix push notifications after reconnection
-
- 18 Nov, 2015 6 commits
-
-
Robert Knight authored
When the socket is closed, the 'socket' instance is null.
-
Robert Knight authored
streamer.connect() exposed the WebSocket instance as a private _socket property on the response for use in the tests. This removes the need for that by capturing the most recently constructed FakeSocket instance in the constructor.
-
Robert Knight authored
The additional dependencies in websocket.js (EventEmitter, util, retry) resulted in an increase in bundle size from 541K to 555K vs. master. Reduce the size by using 'tiny-emitter' instead of EventEmitter and 'inherits' directly instead of the large 'util' package. This reduces the bundle size of app.min.js to 546K
-
Nick Stenning authored
Python 3 compatibility
-
Nick Stenning authored
Don't update timestamps of unsaved annotations
-
Sean Hammond authored
Fix a bug where the updateTimestamp() function in AnnotationController would try to update the @timestamp property of new annotations that have no model.updated timestamp because they haven't been saved to the server yet. This result in nonsense values being generated and updateTimestamp() being called multiple times per second for each unsaved annotation.
-
- 09 Nov, 2015 2 commits
-
-
Nick Stenning authored
Save permissions to drafts service
-
Nick Stenning authored
Delete unsaved drafts on sign out
-
- 06 Nov, 2015 2 commits
-
-
Robert Knight authored
When reconnecting to the push notification service after a disconnection, re-send the configuration messages that specify the client ID (this is a per-session ID) and the current annotation filter. Without both of these, the client will not receive future notifications.
-
Robert Knight authored
We used to have our own WebSocket wrapper, which was replaced in cf410d0bd2127973739208ef94b2df59cc0b720e with angular-websocket, since that provided the functionality that we needed on top of WebSockets, namely: * Integration with Angular $scope by wrapping onmessage callbacks with $scope.$apply() * Automatic reconnection in the event of a disconnection * Queuing of messages sent prior to a connection being established. Unfortunately, angular-websocket also brings in a somewhat unnecessary dependency on the "ws" module. That got out of date and resulted in no longer being able to build H with the current version of Node. See https://github.com/AngularClass/angular-websocket/issues/47 This gave us either the choice of fixing angular-websocket or replacing the dependency. This commit removes the angular-websocket dependency in favor of our own WebSocket wrapper, but unlike before, we outsource the retry logic to the "retry" package. A benefit of this is that we get better logging of what is going on during automated reconnects.
-
- 05 Nov, 2015 6 commits
-
-
Sean Hammond authored
Easier to mock in tests.
-
Nick Stenning authored
Simplify the group share links
-
Sean Hammond authored
Fixes #2701.
-
Sean Hammond authored
-
Sean Hammond authored
Clean up debug helpers
-
Sean Hammond authored
Fixes #2716.
-
- 03 Nov, 2015 2 commits
-
-
Sean Hammond authored
Remove unused claim mail merge module
-
Nick Stenning authored
This got renamed in core-js without a semver-compliant version bump. Of course.
-
- 02 Nov, 2015 5 commits
-
-
Robert Knight authored
Appropriately encode the tab URL for a query string
-
Nick Stenning authored
Small design tweaks to the group share page
-
Sean Hammond authored
- Put a <br> between the document link text and the document hostname (if there is one) - Double the amount of vertical space between each <li> in the list of documents - Increase the number of characters after which document link text or hostname is truncated
-
Nick Stenning authored
Fix display of num replies on collapsed replies
-
Sean Hammond authored
When you collapse a reply that itself has replies an "n replies" link appears next to the username on the collapsed reply. A recent commit broke the display/alignment of this. Correct it. Fixes #2702.
-
- 30 Oct, 2015 6 commits
-
-
Nick Stenning authored
Avoid losing unsaved changes to new or existing annotations when switching groups
-
Robert Knight authored
* Avoid a loop over an array with a single entry * Avoid an unnecessary variable shared between multiple tests
-
Robert Knight authored
Update widget-controller following drafts service API change.
-
Robert Knight authored
When signing out whilst a group is selected and unsaved drafts were present, the following would happpen: 1. User prompted to discard drafts 2. User accepts prompt and draft store is cleared 3. Group focus changes and a new draft is created Fix this by only updating a draft when the group focus changes, not creating a new one if it has been removed
-
Robert Knight authored
The logic for handling this case in the controller is slightly indirect. The draft is discarded not when the call to update the annotation on the server succeeds but whenever the client is notified that an annotation update has been committed, signified via its 'updated' property changing. This happens both for saves triggered locally and also updates made in other H instances.
-
Robert Knight authored
-