1. 16 Sep, 2014 6 commits
    • Aron Carroll's avatar
      Make the quote italic to break up the card text · 39cc55d9
      Aron Carroll authored
      This was part of an earlier card refactor but was put aside until we'd
      tested it with the text diffs. These have been removed for the moment
      so it seems like a good time to try this style out.
      39cc55d9
    • Aron Carroll's avatar
      Make the replies toggle red when hovering the thread · 306d14e3
      Aron Carroll authored
      This makes it consistent with the annotation timestamp. The next step
      is to make all actions focus when the card is hovered.
      306d14e3
    • Aron Carroll's avatar
      Remove italic styling on the replies text · 99fc6236
      Aron Carroll authored
      99fc6236
    • Randall Leeds's avatar
      Move share and reply back inside the annotation · 76c3d2f5
      Randall Leeds authored
      Move the edit and delete actions back down to the bottom of the
      annotation alongside the share and reply actions.
      
      Improve the experience when searching and composing by adding a
      freeze function to the thread filter so that edits can freeze their
      filter in a deactivated state in order to always match the filter.
      This change keeps edits visible all the time and keeps the reply
      and show more counts accurate.
      
      Make the annotation and thread markup a bit more semantic and use
      this to tweak some margins now that the reply count is below the
      actions.
      
      Drop the "<nobody>" placeholder for unattributed annotations and
      instead just opt not to show the username or privacy and highlight
      indicators.
      
      Change the markdown directive to use an attribute and tighten up
      the collapsed thread styles.
      76c3d2f5
    • Randall Leeds's avatar
      Add a directive for tracking nested aggregates · 2e08adab
      Randall Leeds authored
      Rather than continuing to track the message counts in the thread
      controller, make a separate deep-count directive that exports a
      getter / setter from its controller that can be used to query and
      increment counters that bubble aggreggations up to any deep-count
      directive above.
      
      Instead of firing a `threadCollapse` event when threads collapse
      and canceling it from the annotation directive when the annotation
      is being edited, the deep-count directive is used to track the
      total number of messages in a thead, the number of matches found
      by the thread-filter directive, and the number of annotations that
      are being edited.
      
      Remove most of the injectables from the thread controller and handle
      more of the DOM-specific bits in the link function. The controller
      becomes even simpler, but the directive needs tests now.
      2e08adab
    • Randall Leeds's avatar
      Introduce the threadFilter directive · c458a2e6
      Randall Leeds authored
      Create a new directive, threadFilter, that leverages the deep message
      count feature of the new thread directive, using the searchfilter
      and viewFilter services to keep track of the threads that match the
      search filters in real time.
      
      Close #960
      Close #1109
      c458a2e6
  2. 15 Sep, 2014 1 commit
    • Randall Leeds's avatar
      Optimize reply count updates · 04b11378
      Randall Leeds authored
      Rather than traversing all the descendants at every digest of every
      level of every thread, propagate updates from leaf nodes to parents
      by giving each thread access to its parent thread controller. Digests
      are only ever performed at the top level and are debounced so that
      during progressive rendering of threads the number of digests is
      greatly reduced. Some adhoc experimentation yields a 50% reduction in
      digests during thread rendering on top of the performance gain by
      not traversing descendants in `messageContainer#flattenChildren` calls
      on every digest.
      
      To accomplish the debouncing, the render service now returns a cancel
      function making it have the same signature as `requestAnimationFrame`.
      04b11378
  3. 13 Sep, 2014 1 commit
  4. 12 Sep, 2014 23 commits
    • Randall Leeds's avatar
      Remove unused code · 4b600414
      Randall Leeds authored
      Card emphasis on highlight hover isn't supported by the sidebar
      right now and we no longer disable annotating in the sidebar.
      4b600414
    • Randall Leeds's avatar
      923cd7ed
    • Randall Leeds's avatar
      Simplify the render service · d1c0a45d
      Randall Leeds authored
      After I changed it so that it took a callback rather than a scope
      the data parameter became rather useless.
      d1c0a45d
    • Randall Leeds's avatar
      Refactor drafting and authentication interactions · 6c64bd65
      Randall Leeds authored
      Make changes to allow multiple top-level drafts, drafting before
      authenticating, keeping drafts while performing page searches,
      and replying to search results.
      
      - Factor out the userAuthorize option passed to the Permissions
        plugin into a local function in controllers.coffee.
      
      - Only load the Permissions plugin when logged in so that the
        plugin options do not leak information about the last logged in
        user and unattributed drafts have no user or permissions field.
      
      - When switching to highlight mode, show the sidebar and flash an
        info message informing the user that they will need to log in
        before annotations are saved, but don't prohibit highlighting.
      
      - Simplify the logic in the guest for highlight mode by offloading
        work to the annotation controller. The "inject" property is no
        longer needed. The annotation controller saves drafts of highlights
        if they have no user and persists them to the server as soon as
        the user is set.
      
      - When logging in, the app controller simply loops through all the
        drafts are publishes 'beforeAnnotationUpdated' to give the
        Permissions plugin a chance to fire.
      
      - When initializing the Store plugin, don't perform any search at
        all when not logged in. This change makes "single player" mode
        work even before logging in.
      
      - Allow hiding the sidebar when editing. Simplify the guest code
        that no longer needs to track the sidebar state by listening for
        'annotationEditorHide' and 'annotationEditorSubmit' and the
        corresponding sidebar code that fired these. They're nonsensical
        now because there isn't exactly one "editor".
      
      - Remove the concept of an 'ongoing edit' entirely, simplifying the
        sidebar code even further. Any number of edits are allowed and
        top level ones are not treated specially.
      6c64bd65
    • Randall Leeds's avatar
      Remove superfluous digest and bridge sync · 60504257
      Randall Leeds authored
      When the Store updates annotation data it only
      60504257
    • Randall Leeds's avatar
      Move showEditor out of the Bridge · 82c74147
      Randall Leeds authored
      82c74147
    • Randall Leeds's avatar
      Remove ephemeral properties from bridge whitelist · 5903d6c3
      Randall Leeds authored
      With this change, the show differences code is completely out for
      the moment, but there should be no more unexpected properties on
      annotations objects at all.
      
      Fix #1207
      5903d6c3
    • Randall Leeds's avatar
      ebd10baf
    • Randall Leeds's avatar
      Prune empties in threading plugin · 4feb920d
      Randall Leeds authored
      I had decided not to do this initially in order to show annotations
      that were missing. We'll have to decide how we want to show the holes,
      but it's much better if we prune the containers that aren't used so
      that we don't end up with empty threads sitting around all over the
      place.
      
      The only tricky thing is that when new annotations are loaded we must
      thread everything again or existing containers that were lifted up to
      the root will not attach themselves to newly loaded parents.
      4feb920d
    • Randall Leeds's avatar
      Even simpler page search · bac08b10
      Randall Leeds authored
      Improve the already much improved page search.
      
      - Rather than binding the render function to a thread, pass the
        render order list in the accumulator.
      - Instead of moreTop and moreBottom just use a single property, more.
      - More concise everything. What more can I say?
      bac08b10
    • Randall Leeds's avatar
      Fix browser history navigation on stream · c194a431
      Randall Leeds authored
      c194a431
    • Randall Leeds's avatar
      Refactor page search · 67469995
      Randall Leeds authored
      Refactor the page search rendering algorithm for fewer scope
      variables, simpler template expressions, camel case, support
      for holes in threads, less looping, conciseness and readability.
      67469995
    • Randall Leeds's avatar
      Combine Viewer and PageSearch controllers · 5736d80b
      Randall Leeds authored
      No longer change routes when the query changes between the Viewer
      and the PageSearch controller so that the filtering is near instant.
      5736d80b
    • Randall Leeds's avatar
      Drop annotator.discardDrafts helper · 42c8ac83
      Randall Leeds authored
      The annotator service is not a dumping ground for helper functions.
      42c8ac83
    • Aron Carroll & Randall Leeds's avatar
      More view, sort, and threading refactoring · 1e5c93a3
      Aron Carroll &amp; Randall Leeds authored
      Clean up a number of issues.
      
      - Fix page search, especially for deep results.
      
      - Split thread directive into its own file.
      
      - Clean up the separation between CSS of threads and annotations.
      
      - Separate more actions menu for annotations from thread actions strip.
        Edit and delete in the former. Share and reply in the latter. Cleans
        up controllers quite a bit.
      
      - Refactor both thread and annotation directives.
      
      - Break out progressive rendering service.
      
      - Clean up template variables to use the controllerAs syntax to treat
        controller as the view model.
      
      - Clean up thread collapse prevention during editing.
      
      - Refactor threading to remove the thread property from annotations and
        take ownership of the thread root, removing the need to track many
        things about threading in the App controller.
      
      - Clean up annotation edit cycle and drop the ngModel usage (doesn't
        work well with objects since it does a shallow watch).
      
      - New thread and annotation directives come with full documentation in
        ngdoc style as supported by the dgeni documentation tool.
      
      - Preserve annotations, when appropriate, upon changing authentication.
        Fix #567.
      1e5c93a3
    • Randall Leeds's avatar
      00a7ab78
    • Randall Leeds's avatar
      Isolate the search directive · 4618141b
      Randall Leeds authored
      4618141b
    • Aron Carroll's avatar
      Remove raf.js from the karma config · a7a5aaec
      Aron Carroll authored
      a7a5aaec
    • Aron Carroll's avatar
      Fix display of page search results · 03ade9e7
      Aron Carroll authored
      Each controller for the viewer template must now define a
      shouldShowAnnotation method that accepts an annotation id and determines
      whether it should be displayed. This moves the logic out of the template
      and into the controllers.
      03ade9e7
    • Randall Leeds's avatar
      Overhaul the threading, sort, and view further · 957ad49c
      Randall Leeds authored
      Lots of changes to massively simplify things and make them much more
      performant.
      
      - The thread directive gets a few changes
        - Cleared up confusing tuple unpacking in favor of named properties
          in the render queue as per the suggestion of @aron
        - The replies and annotation are set at once. Since the replies in
          turn render lazily, this should be fast enough for all but an
          unwieldy number of threads. If we hit that wall, we'll have to do
          some filtering / pagination.
        - The directive is now triggered only on attributes and parses the
          attribute value to get the thread
      - The threads are rendered from a single thread root rather than using
        a global list of annotations that must be watched for its threads to
        be extracted. This results in a huge performance gain because this
        thread container has a stable set of children.
        - When the first `annotationsLoaded` callback arrives, we set a new
          root from the result of asking the threading plugin to thread them
        - Lots of hackery during store reloads goes away because we just nuke
          the thread root and reload
      - The application controller does not have to modify a root annotation
        set at all anymore
      - Use of the root scope in the controllers goes away entirely
      - The ongoing edit is now stored in the scope again so that it can be
        be pinned to the top of the thread list
      - The editor view and controller go away completely because the top
        level edit is now pinned to the top of the list, removing the need
        to re-render annotations between editing and viewing
      - The selected annotations are now a hash of annotation ids to true
        values if the annotation is selected, or null if the selection is
        empty
      - An ng-show is used to show/hide the selected/unselected annotations,
        further reducing re-renders
      - The view state is gone complete and now there is only sort
      - The sort is not applied programmatically in the controller, but a
        simple watch on the name of the sort is used to set the predicate
        and reverse settings as scope properties that feed into an orderBy
        filter on the thread list, reducing the number of extra watches we
        have to do and further reducing the code
      - The sort is no longer an animated dropdown, but sits at the top of
        the list always (I assume we can style this better, so have at it)
      - Unnecessary helper and logging functions are removed from the
        annotator service because silence is golden
      957ad49c
    • Randall Leeds's avatar
      Overhaul view and sort behavior · dc477032
      Randall Leeds authored
      Bring the view and sort controls closer in line with the latest
      design decisions.
      
      - Start in Document view and Location sort.
      - When in Document view and Location sort, use dynamic bucket.
      - When in any sort other than location, disable dynamic bucket.
      - When in Location sort, all comments always appear at the bottom.
      - Remove the Screen and Comment views.
      - Remove the focus annotation state that was triggered by expanding
        a top level annotation; there is only hover emphasis now.
      - The `showViewer` call always goes to Selection view.
      - Using multi-select (Cmd or Ctrl Click on tabs and highlights) will
        trigger the Selection view, or switch back to the Document view
        if the selection is empty.
      - Page search always searches the whole document.
      - Leaving the page search switches back to the Document view.
      
      Additionally, many cleanups were made as a result.
      
      - No need to track focused state or comments in the client frames.
      - No need to pass the view name in `updateViewer` or `showViewer`.
      - No need to pass the focus purpose in `updateViewer`, `showViewer`,
        or `toggleViewerSelection`.
      - Drop various helper functions around focus.
      - No need to manually unshift or push newly created or streamed
        annotations into the view.
      - The viewer template uses threads at the top repeater, like the
        page search template.
      - The app controller maintains all the annotations on the root scope,
        the current selection shadowing it on the application scope, and
        a cheap, identity watch that retreives the threads.
      - The page search can use a cheap watch on the threads to refresh.
      - The reply list of each annotation is no longer set on the annotation
        object.
      - The thread directive now watches the thread children and keeps them
        sorted, rather than the annotation directive.
      - The recursive `buildReplyList` function is no longer needed.
      - Scattered use of the root scope is much reduced.
      - Drop requestAnimationFrame polyfill because angular has its own.
      - Drop the recursive directive, splitting out thread.html and using
        using ng-include for recursion.
      - Use a single render queue for all threads and sequence updates on
        animation frames, resulting in smooth, progressive rendering.
      - Combine the viewer and page_search templates.
      dc477032
    • Randall Leeds's avatar
      Revert "Move the infinite scroll into stream controller" · 14c216b8
      Randall Leeds authored
      This reverts commit f8107e08c4f89fe41a2825693225609bcd5e17b4.
      14c216b8
    • Randall Leeds's avatar
      b33f2921
  5. 11 Sep, 2014 3 commits
  6. 10 Sep, 2014 4 commits
  7. 08 Sep, 2014 2 commits