1. 23 Mar, 2020 3 commits
    • Robert Knight's avatar
      Re-phrase a comment per PR feedback · 1a0ebb8b
      Robert Knight authored
      1a0ebb8b
    • Robert Knight's avatar
      Specify status code when closing WebSocket connection from the client · fdedc956
      Robert Knight authored
      Fix browser warnings about an abnormal disconnection when the WS
      connection is closed normally by calling `socket.close()`.
      
      When `WebSocket#close` is called with no code, the browser will send a
      close frame to the server with no payload. This is valid. On the backend
      ws4py translates this into a 1005 status code, which is also correct.
      However, ws4py then responds with the server's close frame and instead
      of sending no payload, it sends a close frame with a payload that has a
      1005 status. This is not allowed by the spec and results in errors in
      the browser about an abnormal disconnection.
      
      Although the proper fix for this needs to happen on the server, the
      simplest solution right now is to set a status code in the client and
      ws4py will respond with the same status code in the server's close
      frame.
      
      As part of this, refactor the tests to clearly separate the tests for
      what happens when the browser/server closes the connection vs when the
      client closes the connection.
      fdedc956
    • Robert Knight's avatar
      Do not warn if WebSocket is closed due to navigation · c1057f81
      Robert Knight authored
      Don't warn if the WebSocket is closed with a "going away" code (1001).
      This is a "normal" closure and, per the WebSocket RFC [1], can happen
      when the browser navigates away from the current page.
      
      [1] https://tools.ietf.org/html/rfc6455#section-7.4.1
      c1057f81
  2. 20 Mar, 2020 5 commits
  3. 19 Mar, 2020 3 commits
    • Robert Knight's avatar
      Merge pull request #1933 from hypothesis/tune-virtual-thread-list-debouncing · a6901e0b
      Robert Knight authored
      Tune virtual thread list debouncing
      a6901e0b
    • Robert Knight's avatar
      Tune virtualized thread list debouncing · 8bd712e6
      Robert Knight authored
      When scrolling through a long list of annotations quickly, the sidebar
      could display blank space for a long period of time. This was happening
      because the debounced update function waited for a period of at least
      20ms with no "scroll" events, and a gap of that length could take some
      time to appear if there was a queue of scroll events being delivered.
      
      Fix the issue by adding an upper bound of 100ms after a scroll event before
      recalculating the list of visible threads.
      
      Also make sure to cancel any pending updates after the `detach` method
      is called.
      8bd712e6
    • Robert Knight's avatar
      Remove "invisible threads" logic · 75426f72
      Robert Knight authored
      This used to be required in order to run logic in the `<annotation>`
      component that saved new highlights to the server, in the case where the
      highlight's annotation card was off-screen. This is no longer required
      since that is now handled by the `autosave` service.
      75426f72
  4. 18 Mar, 2020 6 commits
  5. 17 Mar, 2020 16 commits
  6. 16 Mar, 2020 7 commits