1. 03 Feb, 2016 3 commits
    • Robert Knight's avatar
      Fix client-side router on site · 2014c98d
      Robert Knight authored
      The JS for the group share page failed to load
      because of an incorrect comparison of the result
      of String.match() against a number and also
      because of an attempt to load Bootstrap
      unnecessarily on this pages.
      
      This commit fixes the issue and prepares us for
      adding new pages in future by:
      
       * Adding a client-side micro-router to simplify running
         page-specific JS
      
       * Only loading the Bootstrap components on pages that
         actually need it.
      
      Fixes #2867
      2014c98d
    • Robert Knight's avatar
      Merge pull request #2906 from hypothesis/optional-websocket · 315cfc6e
      Robert Knight authored
      Make connecting the WebSocket optional
      315cfc6e
    • Nick Stenning's avatar
      Make connecting the WebSocket optional · ec3d389f
      Nick Stenning authored
      In preparation for splitting the hosting of the WebSocket server into a
      separate process, make it possible to run the client without attempting
      to connect to the WebSocket.
      
      If the `websocketUrl` setting is missing, we will not attempt to
      connect.
      ec3d389f
  2. 01 Feb, 2016 1 commit
  3. 26 Jan, 2016 4 commits
    • Nick Stenning's avatar
      Merge pull request #2894 from hypothesis/increase-max-annot-body-size · 9fa71fc2
      Nick Stenning authored
      Double the truncation threshold height for annotations
      9fa71fc2
    • Nick Stenning's avatar
      Merge pull request #2887 from hypothesis/optimistic-save · 644e5daa
      Nick Stenning authored
      Prevent double-posting of new annotations
      644e5daa
    • Robert Knight's avatar
      Double the truncation threshold height for annotations · 4512582c
      Robert Knight authored
      As per https://trello.com/c/7QtpfMB5/ increase the threshold
      so that only very long annotation bodies are truncated.
      4512582c
    • Robert Knight's avatar
      Prevent double-posting of new annotations · f407141a
      Robert Knight authored
      When the user clicks the 'Post' button to create an annotation,
      optimistically switch the card back to View mode but display
      a 'Saving...' indicator in place of the Reply/Edit/Delete links.
      
      This makes the UI appear more responsive when the user clicks
      the Post button and also prevents an issue where the user could
      click 'Post' multiple times during the save and create multiple
      annotations.
      
       * Fix a possible inconsistency between the 'Post' button's enabled
         state and whether or not the save() function can succeed.
      
         The hasContent() and isShared() methods also already have tests,
         so this lets us remove several redundant tests.
      
       * Fix inconsistency in the return type of the save() function -
         always return a promise.
      
       * Treat negative status values as network errors as well as 0.
         If the server is unreachable, the real status value may be -1.
      
      Fixes #2864
      f407141a
  4. 25 Jan, 2016 2 commits
  5. 22 Jan, 2016 12 commits
  6. 21 Jan, 2016 8 commits
  7. 20 Jan, 2016 1 commit
  8. 14 Jan, 2016 5 commits
  9. 13 Jan, 2016 4 commits
    • Robert Knight's avatar
      Use raven-js for client-side error capture and reporting · 27e3c96c
      Robert Knight authored
      Capture exceptions reported via Angular's $exceptionHandler
      service and window.onerror and report them via Raven.
      
      The client currently uses the same Sentry DSN as the main
      application, which gets the DSN from the SENTRY_DSN
      environment variable.
      
       * Add a <script> tag to all pages on the site which
         defines a window.RAVEN_CONFIG variable which provides the DSN
         and release string needed to configure Raven JS on the client
      
       * Configure and setup RavenJS in the main site JS, Chrome
         extension and the sidebar.
      
         For the sidebar, Angular integration is configured
         using Raven's Angular plugin.
      
       * Configure the user ID associated with Sentry reports
         when the session state is received
      
       * Extract the code which builds the sidebar/extension
         config dictionary out of the template into
         its own module for easier sharing between the Chrome
         extension and the sidebar's code.
      27e3c96c
    • Nick Stenning's avatar
      Merge pull request #2859 from hypothesis/excerpt-hysteresis · 07bc28fd
      Nick Stenning authored
      Implement a hysteresis threshold in excerpts
      07bc28fd
    • Robert Knight's avatar
      Implement a hysteresis threshold in excerpts · ba672e41
      Robert Knight authored
      Allow the excerpt's contents to exceed the collapsed
      height by a threshold set with the 'overflow-hystersis' attribute
      before the excerpt's contents are truncated.
      
      This fixes a problem where the contents of an annotation
      body could exceed the threshold by only a couple of pixels,
      resulting in a 'More' link which resulted in only half a line
      of extra text being revealed.
      ba672e41
    • Nick Stenning's avatar
      Merge pull request #2855 from hypothesis/2823-fix-annotation-thread-collapsing · ce51f53e
      Nick Stenning authored
      Fix annotation thread collapsing
      ce51f53e