- 02 Nov, 2015 1 commit
-
-
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 15 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
-
Robert Knight authored
Refactor the drafts service to preserve unsaved edits when switching groups. This rewrites the drafts service so that it can preserve unsaved changes for new and existing annotations when switching groups. For each annotation, the drafts service now maintains an object containing the unsaved changes in addition to the model for the annotation which was being edited. * For new annotations, the annotation is moved to the current group when switching groups. * For edits to existing annotations, the unsaved changes are saved to the drafts service. * When an annotation card is created, switch to editing mode automatically if a draft is present. * Avoid automatically discarding the draft when an annotation is unloaded. This allows unsaved edits to existing annotations in a group to be restored when switching back to the group.
-
Nick Stenning authored
Avoid route reload on change
-
Nick Stenning authored
Fix search button not expanding search bar in Safari
-
Robert Knight authored
The search bar expands from 0 to 150px when the input is focused but in Safari the <input> will not accept focus via input.focus() if its max-width is _exactly_ 0px. Setting it to a near-zero +ve value instead avoids the problem. Fixes #2654
-
Robert Knight authored
Add request context to errors caught by Sentry
-
Nick Stenning authored
Merge pull request #2687 from hypothesis/github-2686-fix-invalid-permissions-when-creating-annotations-when-signed-out Set permissions of new annotations on login
-
Sean Hammond authored
-
Sean Hammond authored
Move the responsibility for creating the default permissions for new annotations according to the cached-in-local-storage shared/private setting into permissions.coffee, where it's with other permissions related stuff and can be tested more easily.
-
Sean Hammond authored
While signed out create a new annotation. You'll see a "You must sign in to create an annotation" card. This card is in fact an annotation in the client-side code, but one that has no user, no permissions, etc etc. If you sign in, you'll then see a full annotation card with editor open in place of the previous card, you can type an annotation and save it. Except that this will send invalid permissions to the server, which will happy save them (no validation) and then crash. The fix: On sign in, set the model.permissions of such annotations. This means that the Post dropdown will set itself correctly to shared or private and on posting the annotation the correct permissions will be sent to the server. Also fixed permissions.coffee to return null instead of invalid permissions when not signed in. Fixes #2686.
-
- 29 Oct, 2015 14 commits
-
-
Robert Knight authored
-
Robert Knight authored
Add documentation explaining what the threading service does and links explaining the 'jwz' message threading algorithm and a reference to the JS implementation that we are using.
-
Robert Knight authored
When the focused group changes, instead of reloading the whole view just unload the currently displayed annotations and then reload the annotations for the newly selected group(s) and any drafts of unsaved annotations. The only immediately 'visible' effect of the change is that switching groups now only results in a call to /search rather than network requests to fetch session state and features. In future this should make it easier to preserve state for the area below the top bar when switching groups.
-
Nick Stenning authored
Fix 'Post to' button not updating when an annotation's group changed & cleanup code
-
Robert Knight authored
The 'group' property on the scope used by the 'Post to' button was set when the component was instantiated but not updated if the group subsequently changed. Fix this and simplify the code by using the 'bindToController' facility from Angular 1.3.x to avoid copying properties from the directive's scope to the controller. This means that 'vm.group' expressions in the controller now update when the corresponding attribute changes.
-
Nick Stenning authored
Adjust annotation card style to fit groups design
-
Sean Hammond authored
Query tags field with a match query (use mapping analyzer)
-
Robert Knight authored
* Move the group name and scope indicator onto a line below the username * Make the group name a lighter gray in the default state * Adjust the margins around the group card * Use a consistent font size from the typography palette for all text in the annotation card header. * Remove the 'Only Me' text next to the lock badge. Along with everything else in the header this added too much noise. * Increase the spacing between the group name and the excerpt * Fix unnecessary margin above annotations with no quotes by hide the annotation quote list section if an annotation does not have quotes. * Add a minimum margin between the annotation heading and the editor T-148
-
Nick Stenning authored
Wait for feature flag data before loading sidebar view
-
Nick Stenning authored
Document link refactor
-
Robert Knight authored
Clear the features cache only when the logged-in user changes, rather than on any change to session data.
-
Robert Knight authored
Feature flags can affect the initial search query when the app loads. eg. If the groups feature is enabled then we will by default load annotations for the most recently used group, otherwise we'll load public annotations. Therefore, wait for the feature flags to be retrieved before loading the view. The feature flags endpoint is very fast so the behavior was correct most of the time previously but occassionally the app would load and fetch Public annotations before the feature data was available which would have resulted in fetching group annotations. At the same time, this clears the feature flag data when the current user changes and fixes an issue where switching from a non-groups enabled account to a groups-enabled account did not immediately update the UI. Fixes #2675
-
Nick Stenning authored
Fix exception when GROUPS_CHANGED event is broadcast during route load
-
Robert Knight authored
The <group-list> directive attempted to update itself in response to a group change notification without triggering a full digest cycle by using `$scope.$apply`. This was based on the incorrect understanding that $apply only dirty-checks the current scope downwards. In fact, in dirty-checks the root scope. Additionally, the logic was pointless since group list/focus changes happen in response to two types of events, both of which are triggered in the context of $apply: * An event handler when the user selects a group * A callback from angular-websocket when a WebSocket message is received.
-
- 28 Oct, 2015 6 commits
-
-
Nick Stenning authored
Avoid route reload on groups list change
-
Nick Stenning authored
Angular 1.4.x introduced a breaking change (undocumented in the upgrading guide as far as I can tell) to the way URL query parameters are handled in ajax requests. Specifically, semicolons in query parameter values are no longer encoded by default. This causes problems for us in request urls such as /api/search?uri=http:%2F%2Fexample.com/?id=4;display=print because Pyramid interprets the semicolon (correctly according to RFC3986) as a query string delimiter. This commit fixes the issue by overriding the default parameter serializer (although only for the ngResource objects in the store service) with a much more conservative one that encodes everything with `encodeURIComponent`. The bulk of the code here is a slightly modified version of the default serializer used by Angular.
-
Robert Knight authored
-
Robert Knight authored
Avoid maintaining a copy of the groups list and focused group states in the directive as per the discussion at https://hypothes-is.slack.com/archives/public/p1446048142004464
-
Nick Stenning authored
A style for anchor tags was moved from `common.scss` to `elements.scss`, and so we now need to include that here.
-
Sean Hammond authored
-
- 27 Oct, 2015 4 commits
-
-
Robert Knight authored
Remove the remnants of a defunct annotation pulse feature
-
Robert Knight authored
Remove the remnants of a once-functional visual diff feature
-
Robert Knight authored
-
Robert Knight authored
When the <groups-list> directive is instantiated, login is not complete and the groups list contains only the Public group. Once the login completes, the groups list was updated because GROUPS_CHANGED was not broadcast for the initial groups load. The reason for this was to avoid an unnecessary route reload in `AppController`. Resolve this by always firing the `SESSION_CHANGED`, `USER_CHANGED` and `GROUPS_CHANGED` events when they change, but include an additional piece of data indicating whether this is the first load or not. This is used in `AppController` to avoid an unnecessary route reload.
-