- 05 Jul, 2016 12 commits
-
-
Sean Hammond authored
Remove the ban on using console.log() in tests
-
Sean Hammond authored
Simplify request preparation in `store.js`
-
Robert Knight authored
This was intended to prevent console.{log,warn,...} calls accidentally being left in test code. However the result was very confusing for H developers who only occassionally worked with the H client test suite. This problem is better solved by a linter.
-
Sean Hammond authored
Upgrade PhantomJS from 1.x to 2.x
-
Sean Hammond authored
Fix new replies being moved to the newly focused group
-
Robert Knight authored
Use "log in"/"log out"/"sign up" consistently
-
Nick Stenning authored
-
Nick Stenning authored
-
Nick Stenning authored
-
Robert Knight authored
Unless there is a clear reason not to do so, it is generally preferred to use methods from the ECMA standard lib.
-
Robert Knight authored
Rather than using a $http request transform to preprocess the data, just pass the data object into the `stripInternalProperties` function directly.
-
Robert Knight authored
Previously the `group` and `permissions` properties of new replies were set _after_ creating the reply with `createAnnotation()`. This meant that the new reply did not have the correct group and permissions when it was filtered for the first time by the `buildThread()` function.
-
- 04 Jul, 2016 7 commits
-
-
Robert Knight authored
Work around a bug in Karma 1.10 [1] which caused console messages from tests not to be propagated to the terminal. A fix has been accepted upstream and this workaround can be removed when the next release of Karma is made. [1] See https://github.com/litixsoft/karma-mocha-reporter/issues/67
-
Robert Knight authored
Under PhantomJS 2.x `new URL(uri)` works, so the feature test in `polyfills.js` passes, but the resulting URL object is an apparently empty object. Properties such as `hostname` and `href` are missing for example. Load the URL polyfill explicitly in the Karma-specific polyfill module.
-
Robert Knight authored
Under PhantomJS 2.x, the output of `Date.toLocaleTimeString()` includes 'GMT+01:00', where the '+' needs to be escaped.
-
Robert Knight authored
* Upgrade Karma from v0.13 -> 1.10 * Upgrade from PhantomJS 1.9.x to latest 2.x This fixes an issue where the gulp process would hang after tests ran when using a current version of Node.
-
Robert Knight authored
Only new top level annotations should be moved to the new group when switching groups. Fixes hypothesis/h#3559
-
Sean Hammond authored
Simplify annotation component by removing duplicated state
-
Robert Knight authored
Remove site scripts and assets
-
- 01 Jul, 2016 16 commits
-
-
Nick Stenning authored
-
Nick Stenning authored
-
Nick Stenning authored
-
Robert Knight authored
The correct fix would be to remove new annotations with an empty draft in the reducer function that handles new annotations being created. That is not currently possible because drafts are not stored in the Redux store. Therefore this commit just manually de-registers the listener when <annotation> goes out of scope.
-
Robert Knight authored
-
Robert Knight authored
The `updateViewModel()` function was responsible for computing several pieces of data (links, document domain and title) used by the annotation template. Since we can now rely on vm.annotation being immutable, we can just compute this data lazily when we need it and use memoization to avoid unnecessary recalculation.
-
Robert Knight authored
Replace `updateDomainModel()` with a simpler function which returns a copy of the input annotation with the changes from the editor applied.
-
Robert Knight authored
These variables duplicated the information from the current draft for an annotation. Instead of restoring a draft when an annotation card is created and saving it when the annotation card is destroyed, just update the draft whenever the tags, text or privacy of the annotation is changed. The text/tags/privacy shown in the card are determined by `vm.state()` which merges the annotation and the draft. Removing these variables lets us also remove or simplify the tests that checked that everything remained in sync.
-
Robert Knight authored
Instead of maintaining a state flag indicating whether an annotation is being viewed, edited or created, derive that state from whether the annotation has an ID and whether it has an unsaved draft or not. In the process this commit simplifies the tests for reverting edits and adds a missing test that the annotation is deleted if new when clicking the Cancel button.
-
Robert Knight authored
As a step towards making <annotation> stateless or nearly-stateless and instead just a display of an annotation derived from the current annotation instance and its draft, remove the `domainModel` copy of `vm.annotation`.
-
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 5 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.
-