- 17 May, 2017 8 commits
-
-
Sean Hammond authored
parter -> partner
-
Sean Hammond authored
Fix "Login" to "Log in" (consistent with how we spell it in the UI) and remove an incorrect full stop.
-
Sean Hammond authored
Consistent with how we spell it in the UI.
-
Robert Knight authored
`yarn publish` is currently an interactive command and therefore not suitable for use on a CI system. See https://github.com/yarnpkg/yarn/pull/3391 for details.
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
Annotator removal cleanup
-
Robert Knight authored
-
- 16 May, 2017 12 commits
-
-
Sean Roberts authored
-
Sean Roberts authored
Cleaning up: moving constructor to be first function in Guest class and removing unused wrapper html field
-
Sean Roberts authored
Remove dependency Annotator.js
-
Sean Hammond authored
Switch package management from npm to yarn
-
Sean Hammond authored
Fix refreshing access tokens when laptop suspends
-
Sean Hammond authored
This commit fixes an issue that refresh token requests were being sent too late if a laptop was suspended, even if the laptop was resumed again in time to do the refresh. For example if a laptop was suspended for 10 mins, then the refresh request would be sent 10 mins later than it should have been and the access token and refresh token would have already expired before the refresh request was attempted. The bug was due to a misunderstanding about how `window.setTimeout()` works: If you, say, use `setTimeout` to call a function in 10 minutes time, then wait 5 minutes, then put the laptop to sleep for an hour, then wake it up, **it will wait another 5 minutes and then call the function**. That is, the time that the laptop spent asleep does not count towards the timeout, it pauses the timer and then continues the timer again when the laptop wakes. This will also happen if the browser or OS suspends the tab or app. I've verified this behaviour in Chrome and Firefox on Linux, and it also agrees with [this StackOverflow answer](http://stackoverflow.com/questions/6346849/what-happens-to-settimeout-when-the-computer-goes-to-sleep/6347336#6347336) and [the HTML5 spec on `setTimeout`](https://www.w3.org/TR/2010/WD-html5-20101019/timers.html#timers): "wait until the Document associated with the method context has been fully active for a further timeout milliseconds (not necessarily consecutively)." This means that if you want to definitely call a function at a given time (say 55 mins in the future) you can't just use `setTimeout` to set a single timer for 55 mins like our code was doing - if the laptop is suspended during those 55 mins then the timer won't go off until 55 mins + however long the laptop was suspended for. To fix this change the code to repeatedly poll, every few seconds, whether the current time is later than the access token expiry time minus 5 minutes. If it is, then try to refresh the access token. I'm using repeated calls to `window.setTimeout()` to implement this, rather than one call to `window.setInterval()`, because with `setTimeout()` it's easier to do a couple of things that the previous implementation was already doing: 1. Not make any more refresh token requests while one is still in flight 2. Stop making further refresh token requests when one fails
-
Robert Knight authored
Update lockfile with result of running `yarn install` with yarn v0.23.2.
-
Robert Knight authored
-
Robert Knight authored
Package installation fails with Node v6.2 due to an incompatible "check-dependencies" package. See https://travis-ci.org/hypothesis/client/jobs/228937886
-
Robert Knight authored
There were a couple of issues with the initial Yarn lockfile created via `yarn import`: 1. `yarn check` reported several inconsistencies. 2. `phantomjs-prebuilt` needed to be upgraded to resolve a compatibility issue with Yarn. This commit resolves these issues by just removing and recreating the Yarn lockfile. In the process all dependencies have been upgraded to the latest versions compatible with the constraints in package.json.
-
Robert Knight authored
Yarn provides much faster package installation, better resilience to npm registry connection issues and most importantly for us, a much better lockfile format. This commit: 1. Replaces the npm shrinkwrap with the yarn lockfile using the following steps: 1. Checkout latest version of master 2. Remove node_modules folder and re-run `npm install` 3. Run `yarn import` to generate a lockfile 2. Modifies the Makefile, Jenkinsfile, package.json and .travis.yml scripts to run `yarn` instead of `npm`.
-
Robert Knight authored
-
- 15 May, 2017 3 commits
-
-
Robert Knight authored
-
Robert Knight authored
Clarify in tooltip what flag button does
-
Robert Knight authored
Branding updates
-
- 12 May, 2017 7 commits
-
-
Juan Corona authored
-
Sean Roberts authored
* master: Rename DO_{LOGIN,SIGNUP} to {LOGIN,SIGNUP}_REQUESTED Allow third-party annotation services to customize sign-up link handling
-
Sean Roberts authored
-
Sean Roberts authored
-
Sean Hammond authored
Allow publishers to customize "Sign up" link handling
-
Juan Corona authored
Increases coverage, tests calls spawned in annotator/main.js `appLinkEl.addEventListener('destroy`, `window.annotator.destroy();`
-
Juan Corona authored
-
- 10 May, 2017 1 commit
-
-
Juan Corona authored
This fixes the remaining failing tests. When compiled from coffeescript the initial `{}` value was at the prototype level instead of scoped at the function level. It looked like I was declaring it as an instance variable, but it was more like a class variable.. coffeescript is weird to me..
-
- 09 May, 2017 8 commits
-
-
Juan Corona authored
-
Juan Corona authored
Failing tests and what was fixed: 1. Sidebar was not closing when the user taps or clicks in the page. - Function that set up event handlers used to be called by the `Annotator` base class, now called directly in `Sidebar` 2. Config params used in the passed options to the sidebar iframe leaked a new property (`pluginClasses`) used by the refactoring - Filter that property in `Host` 3. `Guest` was missing `deleteAnnotation` function implementation that used to be in `Annotator` Now only 2 tests should be failing
-
Juan Corona authored
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
Use consistent past-tense naming for all events in `bridge-events`.
-
Robert Knight authored
Allow third-party annotation services to define a callback which is invoked to handle the "Sign up" link in the client, in a similar way to how the "Login" link is handled in this case.
-
Juan Corona authored
In order to avoid heavy refactoring some classes from Annotator were moved over to this codebase. This includes the class for the `Document` plugin and Annotator’s base class `Delegator`. The class `Guest` is now responsible for loading the remaining Annotator-style plugin modules. The base class for `Guest` is now `Delegator` instead of `Annotator`.
-
- 04 May, 2017 1 commit
-
-
Robert Knight authored
Improve error when flagging when logged out
-