- 01 Jul, 2016 7 commits
-
-
Nick Stenning authored
-
Robert Knight authored
Make `gulp watch` build CSS, files and images
-
Sean Hammond authored
Make `gulp watch` build the CSS, files and images initially (creating the output files if they don't exist yet, overwriting them if they do) and then watch the source files and re-build them when they change. This matches the existing `gulp watch` behaviour for scripts. This means you can just run `gulp watch` and have everything built, instead of having to run `gulp build watch`.
-
Sean Hammond authored
Fix annotation state not being updated when annotations are saved
-
Robert Knight authored
Annotations in the app's local state store were not being updated after a save was successfully committed on the server. Fixes hypothesis/h#2965
-
Sean Hammond authored
zen-observable update
-
Sean Hammond authored
Remove use of ngResource for search and annotation queries
-
- 30 Jun, 2016 13 commits
-
-
Robert Knight authored
Show direct links on stream page when available (FIRST!)
-
Alice Wyan authored
-
Robert Knight authored
The CHANGES file is part of the 'h' repo and no longer exists in the 'client' repo that was forked from it.
-
Alice Wyan authored
Move relevant tests to annotation-metadata-test.js, and fix a bug in annotation-metadata.js.
-
Robert Knight authored
Several aspects of ngResource make it sub-optimal for our needs: 1. It mutates the model object directly after making an API call, which does not fit well with usage in a Redux app where the UI state should be an immutable object. 2. The ngResource classes can only be constructed once the API description has been retrieved. At least one place in our code, which handled newly created annotations arriving from the page, failed to account for this. This commit therefore replaces use of ngResource for making API calls to the search and annotation endpoints with a simple wrapper around HTTP requests which makes a call and then returns the resulting object. The new wrapper will wait until the API description has been received before attempting to make an API call, avoiding problem (2) above. As a bonus, this brings us a step towards decoupling the JS API client from Angular so we could re-use it outside the app in future. * Replace ngResource with simple $http wrapper in store.js * Add tests for annotation update and deletion API calls * Change tests in annotation-test.js from `assert(predicate(actual, expected))` form to `assert.predicate(actual, expected))` form as this results in errors that are _much_ easier to debug when they fail.
-
Robert Knight authored
The primary change here is an update for zen-observable.
-
Robert Knight authored
Update to zen-observable v0.3.0 which implements several changes to the spec, the most notable of which is that Observable.{of, from, forEach} are now all synchronous [1]. To preserve the previous behavior of `selections()` where no events were emitted until the next tick of the event loop, add a delay before checking for the initial selection. [1] https://github.com/zenparsing/es-observable/issues/88
-
Sean Hammond authored
Trigger Angular digest cycle if necessary during Redux action dispatches
-
Robert Knight authored
This is no longer needed following the addition of middleware to the Redux store which triggers a digest following a UI state change if necessary. Also add a comment in the WebSocket code that we will be able to remove the $apply() call once session state has been moved to the Redux store.
-
Robert Knight authored
At various places in our code that receive external inputs (eg. WebSocket messages, messages from other frames etc.) we have to wrap that handling in a $scope.$apply() call or similar in order to trigger Angular's change detection cycle and sync UI components with the updated state of the app after handling that input. Since most changes to app state now happen as a result of a Redux action being dispatched, we can use Redux' built-in middleware mechanism for adding logic around app state changes.
-
Sean Hammond authored
Improve behavior when selecting pre-created annotations
-
Alice Wyan authored
-
Robert Knight authored
Selecting a pre-created annotation in the page resulted in a 'You do not have permission to see this annotation' being displayed because the selection mechanism only supports annotations which have a server-assigned ID. This commit improves that behavior by ignoring annotations without IDs when selecting annotations. It also fixes an issue in AnnotationUISync that prevents Annotation objects being replaced in the UI state after they are updated on the server. Previously AnnotationUISync would receive the tags of annotations that had been selected in the page and would then look up annotations in a cache maintained by AnnotationSync in order to get Annotation objects that could be passed to `annotationUI` functions which needed objects with an ID. Fixes #3547
-
- 29 Jun, 2016 18 commits
-
-
Alice Wyan authored
-
Alice Wyan authored
-
Alice Wyan authored
-
Nick Stenning authored
-
Nick Stenning authored
-
Nick Stenning authored
-
Nick Stenning authored
This pins the dependencies as defined in package.json to specific versions so that everyone builds the same bundles. See https://docs.npmjs.com/cli/shrinkwrap for details.
-
Nick Stenning authored
-
Nick Stenning authored
This serves two purposes: - The default `npm install && npm test` now suffices to run the test suite. This is what Travis and many other systems will do by default to build JavaScript projects. - It removes the need to do $(shell npm bin) hackery in the Makefile.
-
Nick Stenning authored
-
Nick Stenning authored
-
Nick Stenning authored
We ship only built assets at the moment, with all dependencies directly bundled, so all dependencies are now "development" dependencies -- i.e. not required by those installing the `hypothesis` package.
-
Nick Stenning authored
-
Nick Stenning authored
Simplified != FreeBSD, if we're being picky about it: https://spdx.org/licenses/
-
Nick Stenning authored
-
Nick Stenning authored
-
Nick Stenning authored
Fix #2965 (3/N) - Match annotations by ID or tag in drafts service and when removing annotations
-
Sheetal Umesh Kumar authored
Currently annotations, page notes, and orphans are all jumbled up in one view. We want to separate out these three objects from each other so that the user can better understand what each is, as well as their relationship to the document. Hide tabs for direct links and when search results are displayed. https://trello.com/c/OLdLTlLT/342-separate-annotations-and-notes Hide tabs behind feature flag.
-
- 28 Jun, 2016 1 commit
-
-
Robert Knight authored
After creating an annotation, we remove the pre-created annotation from the Redux store and replace it with the saved version from the server. In order to determine which pre-created annotation to remove when adding the version from the server, we need to match on local tag, since the version from the server has no ID - but it does have a local tag since that is copied across from the pre-to-post created version.
-
- 27 Jun, 2016 1 commit
-
-
Robert Knight authored
Set a maximum width on the annotation content to prevent it overflowing the card and set `overflow-wrap` on annotation quotes and bodies so that long words without any natural breakpoints are broken in the middle if necessary to prevent overflow. Fixes #3421
-