- 19 Apr, 2016 1 commit
-
-
Christof Dorner authored
Fix error in session.js when an /app request fails
-
- 18 Apr, 2016 3 commits
-
-
Sean Hammond authored
Retry requests to /api endpoint
-
Robert Knight authored
Do not expect to be able to parse valid session data out of responses with 5xx status codes - eg. gateway errors, internal server errors.
-
Christof Dorner authored
Convert admin to package
-
- 15 Apr, 2016 1 commit
-
-
Sean Hammond authored
Fix KaTeX font urls
-
- 14 Apr, 2016 11 commits
-
-
Nick Stenning authored
Dispatch markdown editor input changes from $apply() block
-
Robert Knight authored
The input event handler's callback was not invoked inside an $apply() block, so the $digest function was never called to propagate the changes in vm.setEditText() in annotation.js. This happened to work previously because ngModel's $setViewValue() was called to apply input changes, which internally uses $scope.$apply(). This commit wraps the input events from the markdown editor with $apply but debounces them. Since $apply() triggers every single watcher in the application, running it on every keystroke causes noticeable lag otherwise. Fixes #3212
-
Christof Dorner authored
Replace homebrew background workers with Celery
-
Robert Knight authored
Handle requests to the /api endpoint that fail with network errors in the same way as failed requests to the /app endpoint by retrying the request with exponential backoff until it succeeds. Otherwise, if the request fails then `store.(Annotation|Search)Resource` are not populated and code that tries to make API requests fails.
-
Robert Knight authored
When a request to the session endpoint fails with a network error, avoid trying to parse the response in process()
-
Robert Knight authored
Tidy up the 'resolve' object to use `// @ngInject` and add a comment to clarify what it is for.
-
Robert Knight authored
Update package.json with the version as-formatted by npm
-
Robert Knight authored
Previously the 'watch-css' task updated H's SCSS files when they changed but did not reprocess vendor CSS files such as the icomoon font automatically.
-
Robert Knight authored
The vendor KaTeX CSS file looks for font URLs in the 'fonts/' directory relative to the location of katex.min.css. Rewrite these URLs so that they are fetched from '/assets/fonts' instead of '/assets/styles/fonts' Note that the CSS references both WOFF and WOFF 2 format fonts but We only include the .woff version.
-
Nick Stenning authored
Add Postgres UpdateAnnotationSchema
-
Nick Stenning authored
Markdown editor input refactor and additional tests
-
- 13 Apr, 2016 6 commits
-
-
Robert Knight authored
The editor is only used from the <annotation> component which never sets this input.
-
Robert Knight authored
This simplifies the implementation of the <markdown> component slightly, and makes its inputs more consistent with other recently written components. - Replace use of 'ngModel' with 'text' input property and 'onEditText' output event. - Add tests for preview state. - Add tests for rendering and editing annotations that have no text. - Optimize editor initialization by not creating the toolbar's DOM elements until the user starts editing the annotation, via using ng-if rather than ng-show to hide the toolbar in view mode.
-
Robert Knight authored
Displaying local file names in the Groups document list
-
Nick Stenning authored
Add deleting of annotations from new search index
-
Sean Hammond authored
Convert h.features to package
-
Christof Dorner authored
Add the skeleton of a functional test suite
-
- 12 Apr, 2016 5 commits
-
-
Sean Hammond authored
Remove routes_mapper fixture and use configurator routes
-
chdorner authored
-
Nick Stenning authored
Re-implement collapsible excerpt overflow state checking
-
Robert Knight authored
In addition to the content changing, the window resizing and media loading, another way that the excerpt's overflow state can change is if it or a parent element's visibility changes. Since there isn't a generic, performant way to watch the visibility of DOM elements, the change here adds a scope watch which tests for the presence of the 'ng-hide' class used by the ng-show and ng-hide directives on parent elements, since that is the only method of changing visibility that we actually need to support at the moment.
-
Robert Knight authored
Excerpts update their overflow state outside of the Angular $digest cycle. The usual way to deal with this is to wrap the update in a $scope.$apply() call. However, this triggers a full $digest cycle, which we want to avoid if many excerpts update their state at the same time - eg. if we have a large number of annotation cards. This commit instead explicitly invokes the $digest _only_ in the affected annotation card and then only if the collapsible state of an annotation body actually changed.
-
- 11 Apr, 2016 3 commits
-
-
Robert Knight authored
This makes it possible to write isolated tests for just the overflow state and content style recalculation aspects of <excerpt> components. It also simplifies the <excerpt> component tests by making it easier to reason about when the excerpt's overflow state will have been recalculated and the directive's state updated accordingly.
-
Robert Knight authored
rAF is not available in PhantomJS 1.x but is supported by all of our target browsers (IE >= 10).
-
Robert Knight authored
Previously the overflowing state of the excerpt was computed implicitly by the overflowing() method, which was called from several other controller functions. There were several problems with this approach: 1. Since this method calls Element.scrollHeight, it triggered an expensive synchronous layout flush. 2. In certain situations, this could trigger a loop where the overflowing flag was continually flipped (see #2960) 3 It was unpredictable when the overflowing state would be recomputed. This commit instead opts for a different approach which is more explicit about when the state is recomputed, based on the assumption that the <excerpt>'s content size is a function of: 1. The inputs to the <excerpt>'s content (eg. the text of a quote, the body of an annotation) 2. The sidebar window's size 3. The dimensions of any embedded media The content size is then computed and updated as follows: 1. When the <excerpt> is initially created, an async computation of the scrollHeight is scheduled. The calculation unfortunately needs to be async because the content may contain Angular directives which take several $digest cycles to fully process. 2. The <excerpt> listens for changes to the content's data (via a 'contentData' property), media 'load' events and window 'resize' events and recomputes the overflow state in response to any of these. There are a couple of other fixes here: - Use an optional boolean property for the 'enabled' input, rather than a function. The app passed a function to this property but the tests passed a boolean. Fixes #2960
-
- 08 Apr, 2016 3 commits
-
-
Robert Knight authored
Replace node page router
-
chdorner authored
-
chdorner authored
We don't need all the client-side routing part, we only need to be able to selectively run certain JavaScript code depending on which site the user is at the moment. This implementation is not as advanced as the one from the `page` package, or what is possible with the `url-pattern` package. But we don't need any fancy URL matching at the moment, once we do we can revisit and maybe introduce something like `url-pattern` instead of just a crude `document.location.pathname === path`.
-
- 06 Apr, 2016 7 commits
-
-
Robert Knight authored
Add tests for authentication policy
-
Nick Stenning authored
Scroll to annotation when clicking at bottom of collapsed quote
-
Nick Stenning authored
Fix 'Location' sort order for annotations
-
Nick Stenning authored
Use require() for templates
-
Robert Knight authored
For consistency with how other transforms are specified, specify the stringify transform in package.json instead of in code in the create-bundle.js script and the Karma config.
-
Robert Knight authored
Since components now require() their own templates, it is no longer necessary to use a preprocessor to load them.
-
Robert Knight authored
Include Angular component templates as strings in the app bundle using the stringify Browserify transform and use them from directives using 'template' instead of 'templateUrl'. This is faster, because it avoids going through the async $http machinery to load templates, but it is also synchronous, which generally means fewer surprises due to async template loading and specifically in the context of the <excerpt> directive will be useful as it will make it possible for the <excerpt> directive to measure the height of its content in the link function, because all components inside the exercept's content will have been fully resolved at that point.
-