- 27 Nov, 2015 1 commit
-
-
Robert Knight authored
Any WebSocket messages submitted whilst the WS is disconnected should be re-sent when the WS reconnects. This was broken because upon a disconnect, the 'onclose' event handler first synchronously called reconnect(), resulting in a new WebSocket instance being created and then set 'socket' to null. This caused an error in sendMessages() after the 'onopen' event was triggered. Fix the problem by not using a null 'socket' var to represent a disconnected socket. Instead just use the WebSocket's readyState property.
-
- 25 Nov, 2015 2 commits
-
-
Nick Stenning authored
Merge pull request #2739 from hypothesis/trello-177-change-the-default-behavior-of-the-embed-to-highlights-on-by-default Enable highlights by default everywhere
-
Nick Stenning authored
Fix the missing threads in the stream
-
- 24 Nov, 2015 5 commits
-
-
Sean Hammond authored
This reverts commit 5a5b4e345c050a71e619fb5732426b2306f29e64.
-
Sean Hammond authored
Add a new, undocumented separate_replies=True option to the search API. If separate_replies=True option is _not_ given to the search API, then it reverts to its previous behaviour: _do_ include replies in the "rows" list returned. This is the same behaviour that the search API had befor: it returns both top-level annotations and replies in the one "rows" list, but without any guarantee that if some annotations/replies from a given thread are in the list then all annotations/replies from that thread will be in it. If separate_replies=True _is_ given then the API follows the new behaviour: "rows" contains top-level annotations only, and a separate "replies" list containing all replies to the annotations in rows is also inserted into the result.
-
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.
-
Sean Hammond authored
Enable highlights by default in the Chrome extension, bookmarklet and embed. They were already enabled by default in the Chrome extension and bookmarklet so this only changes the embed. Highlights are turned on by default in annotator/host.coffee if no showHighlights option is found. The extension and bookmarklet no longer need to set showHighlights: true as this is now the default. The embed (which was not setting showHighlights: true and so was getting the default setting of false) will now get the new default setting of true. For people embedding h into their own pages, they can turn off highlights by default by including: <script> window.hypothesisConfig=function(){return{showHighlights:false}}; </script>
-
- 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.
-