- 25 May, 2016 7 commits
-
-
Robert Knight authored
Re-implement the behavior to scroll newly created annotations into view in the sidebar so that the user can start editing them immediately. A complication with doing this given that the annotation list is virtualized is that if we want to scroll to the Nth visible annotation, we may not know the actual heights of the N-1 annotations above it. As a result of scrolling the list, some of the heights of those N-1 annotations may be updated from an estimate to an actual measured height, changing the Y offset that we want to scroll to in order to make the Nth annotation visible. There are a few strategies that we could use for dealing with this: 1. Forcibly render all N-1 annotations and measure their height. This is prohibitively expensive for long annotation lists. 2. Use a cheaper method to calculate the exact height of an annotation. Unfortunately we don't have a way to do this at the moment. 3. Use an iterative approach: a. Estimate the target position based on current known/guessed heights. b. Scroll to the estimated position, which will trigger re-rendering and possibly alter the known thread heights. c. Re-estimate the target position and if it changed, go to step b. This commit implements the third method.
-
Robert Knight authored
These elements are used purely to reserve space for offscreen threads which are not actually present in the DOM, so they should not occupy any space beyond that assigned to their 'height' inline style properties.
-
Robert Knight authored
Annotation cards have a small (~8px) margin at the bottom which needs to be taken into account when computing the height of each thread in order to accurately size the spacer element which reserves space for off-screen threads.
-
Robert Knight authored
Expand the class description to better explain how virtualization improves UI performance.
-
Robert Knight authored
Prior to this unsaved changes were lost when an annotation being edited was scrolled off-screen and the annotation component was destroyed. There was already a mechanism in place for persisting unsaved changes to a temporary store when switching accounts and when switching groups but this was only triggered when the signed in user changed or the focused group changed. This commit unifies the handling of all three cases by listening for the '$destroy' event which is fired whenever an <annotation> is about to be destroyed.
-
Robert Knight authored
Use transform3d() to force the top bar onto a new compositor layer so that it does not judder around when scrolling the window. The better fix here will be to make the body scroll rather than the whole window.
-
Robert Knight authored
Make the sidebar handle "large" (ie. 50+) numbers of annotation threads much better by virtualizing the thread list. Virtualizing means that we only instantiate <annotation-thread> components for threads which are either in or 'near' (above/below) the viewport. For the remaining offscreen threads space is reserved by a couple of <li> elements above and below the visible threads.
-
- 23 May, 2016 2 commits
-
-
Robert Knight authored
Following the introduction of the <annotation-thread> component this is now unused. This also removes the JWZ threading implementation since the functionality this provided is now implemented by `build-thread.js`
-
Nick Stenning authored
New threading 3/N - Render annotation threads using new threading infrastructure
-
- 13 May, 2016 10 commits
-
-
Robert Knight authored
Make the behavior of the new threading implementation consistent with that of the previous threading implementation by displaying the total number of visible annotations (+ replies) as the search result count.
-
Christof Dorner authored
Fix "Set changed size ..." error in websocket server
-
Nick Stenning authored
Postgres to ElasticSearch reindexer
-
Robert Knight authored
As noted in https://github.com/hypothesis/h/pull/3284#issuecomment-219031557 threads which have been explicitly collapsed need to have their expansion state reset when the filter query changes. This commit resolves this by moving the search query and sort UI state into the annotationUI Redux store and handles the state update in a SET_FILTER_QUERY action. This means that the rootThread module no longer maintains any primary state of its own, just state derived from the current annotationUI state.
-
Robert Knight authored
Given a thread like this: A- |- B |- C |- D |- E Where only 'B' matches the search filter, the rendered output should be: View 4 more in conversation |- B View two more in conversation
-
Robert Knight authored
Only annotations, not replies can be selected, so only filter top-level annotations against the selection map. This resulted in an issue where 'View N more in conversation' being shown where 'N' was the number of replies when selecting an annotation with replies in the page. See https://github.com/hypothesis/h/pull/3285#issuecomment-218734287
-
Robert Knight authored
This replaces the rendering of conversation threads using the new threading implementation. * Add <annotation-thread> component to render Thread objects generated by rootThread. * Expose the Thread generated by the `rootThread` service on the scope so that <annotation-thread> can render it. * Remove logic and tests in <annotation> for updating reply counts and thread states as these are no longer needed.
-
Robert Knight authored
This adds a service that listens for changes in the UI state and the set of loaded annotations and generates a thread structure in response, which can then be visualized by a view. This commit also adds a first integration test which wires together the non-visual parts of the new threading implementation. * Add 'annotations' to the UI state in annotationUI and update this when annotations are loaded or unloaded. * Add rootThread which listens for changes in the UI state and generates a new conversation thread structure in response. * Add an integration test which tests the wiring of the non-visual parts of the new threading implementation.
-
Robert Knight authored
This adds a service that listens for changes in the UI state and the set of loaded annotations and generates a thread structure in response, which can then be visualized by a view. This commit also adds a first integration test which wires together the non-visual parts of the new threading implementation. * Add 'annotations' to the UI state in annotationUI and update this when annotations are loaded or unloaded. * Add rootThread which listens for changes in the UI state and generates a new conversation thread structure in response. * Add an integration test which tests the wiring of the non-visual parts of the new threading implementation.
-
Christof Dorner authored
Move hypothesis-celery command to h.cli
-
- 12 May, 2016 7 commits
-
-
Robert Knight authored
Prune old and crufty migrations
-
Christof Dorner authored
Add a `hypothesis migrate` command
-
Nick Stenning authored
New threading 1/N - Begin to centralize UI state in annotationUI
-
Robert Knight authored
Since putting the annotationUI store into the desired state and asserting that the state is correct after interactions is quite straightforward, using the real object rather than a fake seems appropriate at present.
-
Robert Knight authored
Give this method a more obvious name and improve a couple of other documentation comments.
-
Nick Stenning authored
Fix updating annotation extras
-
Nick Stenning authored
Websocket docs fixes
-
- 11 May, 2016 4 commits
-
-
Robert Knight authored
This adds the initial infrastructure using Redux for centralizing the UI state as an immutable object accessible via `annotationUI.getState()` which is updated as a result of actions from the UI, network etc. For background on why we want to do this, see the design overview at https://github.com/hypothesis/h/pull/3176 Additionally this commit removes a couple of tests that checked for non-mutation of the selected/focused annotation maps and uses seamless-immutable instead which provides a better guarantee of this, but only in debug builds.
-
Sheetal Umesh Kumar authored
-
Sheetal Umesh Kumar authored
* Also remove duplicated variables in css.
-
Nick Stenning authored
Do not test annotation schema
-
- 10 May, 2016 7 commits
-
-
Sean Hammond authored
Convert h.script to a package
-
Nick Stenning authored
Views code for updating annotations in postgres
-
Robert Knight authored
* Add an 'h-tooltip' attribute directive which displays a tooltip above the associated element as soon as it is hovered and removes the tooltip on mouseout or when the associated element is destroyed. * Use the custom tooltip for buttons in the annotation card footer and remove the labels.
-
Nick Stenning authored
Move EventQueue into h.api and sandbox event notifies
-
Robert Knight authored
Remove extra margin set by first and last p in an annotation body.
-
Sheetal Umesh Kumar authored
-
Robert Knight authored
Sheetaluk/336 reply threading
-
- 09 May, 2016 3 commits
-
-
Robert Knight authored
Change display of datetimes on annotations
-
Sheetal Umesh Kumar authored
* Change the background of bucket bar. * Change margins, line height, font size, default state colour and hover state colour for different elements in the annotation card and the replies thread. Trello cards: https://trello.com/c/aXCXxzx2/327-update-the-visual-design-of-the-annotation-cards https://trello.com/b/o2ungX1n/current-sprint
-
Sean Hammond authored
When dealing with more than one second, minute or hour display secs, mins or hrs instead of sec, min or hr. In the case of secs it's always more than 1.
-