1. 04 May, 2020 3 commits
  2. 01 May, 2020 3 commits
  3. 30 Apr, 2020 4 commits
    • Kyle Keating's avatar
      Add visibility hidden to iframe when closed (#2095) · 88769409
      Kyle Keating authored
      Add visibility hidden to the sidebar iframe when its closed (and after it finishes animation). This prevents all interaction from the components of the sidebar.
      
      Add an optional coerce method to the hostPageSetting so that any incoming values can be coerced if needed. This may be required for values from from via that may only be a string type.
      
      openSidebar config value gets coerced to a boolean in the annotator settings (just like it does in the host-config).
      88769409
    • Robert Knight's avatar
      Add tests for `isFeatureEnabled` selector · dc682384
      Robert Knight authored
      dc682384
    • Robert Knight's avatar
      Re-work group auto-reload when logged in user changes · 971cb669
      Robert Knight authored
      Redo the automatic reload of groups when the logged-in user changes:
      
       - Ignore the initial change of user on startup if the user is logged
         in from a previous session. This generated an unnecessary additional
         API call on startup if the user had a login from a previous session
      
       - Replace the use of the deprecated `USER_CHANGED` Angular event in
         favor of reacting to store state changes using
         `watch(store.subscribe, ...)`
      971cb669
    • Robert Knight's avatar
      Add `hasFetchedProfile` selector · 39e89b24
      Robert Knight authored
      Change the representation of the un-fetched profile within the `session`
      store module to make it possible to determine whether the profile has
      been fetched yet or not and expose this information via a
      `hasFetchedProfile` selector. The `profile` selector continues to return
      a dummy "logged out" profile before the real profile is fetched. This
      simplifies some of the code that uses that selector.
      
      This makes it possible for services to distinguish between the user ID changing
      because the user logged in by clicking "Log in" and completed the login
      process vs. the user already being logged in from a previous session.
      39e89b24
  4. 28 Apr, 2020 10 commits
  5. 27 Apr, 2020 13 commits
  6. 24 Apr, 2020 3 commits
    • Robert Knight's avatar
      Remove unused Preact component wrappers · 6d73eef3
      Robert Knight authored
      Remove some Angular wrappers for Preact components which are no longer
      needed.
      6d73eef3
    • Robert Knight's avatar
      Fix thread list jumping when scrolling on mobile · 84996e44
      Robert Knight authored
      Re-measurement of the height of visible threads happened in an effect
      that depended only on the set of top-level threads, not the subset that
      were currently visible.
      
      On desktop, hover events would cause annotations to be focused as the
      user scrolled through the list, resulting in the root thread being
      recalculated regularly and hence the internal `threadHeights` state in
      `ThreadList` was usually accurate.
      
      On mobile however, hover events don't fire and therefore `threadHeights` was
      not updated as often as it should be. The mismatch between the actual
      rendered height of threads and the value in `threadHeights` caused the
      thread list to jump as a thread above the viewport was transitioned from a
      rendered to a non-rendered state. This issue can be reproduced in Chrome
      on desktop when the device type is set to "Mobile (Touch)" in dev tools.
      
      This PR fixes the issue by making recalculation depend on the set of
      _visible_ threads. In practice `visibleThreads` changes on most renders,
      however the amount of work the effect does if no measured heights
      changed is small, so this shouldn't be an issue.
      
      In addition to fixing this issue, this commit also adds a test for the
      overall behavior as the user scrolls through the list. Since correct
      behavior depends on complex interaction between the DOM, `ThreadList`
      and logic in two utility modules, we avoid mocking either the DOM or
      utilities in these tests.
      84996e44
    • Robert Knight's avatar
      Merge pull request #2078 from hypothesis/convert-stream-content · d50476db
      Robert Knight authored
      Convert stream content to Preact
      d50476db
  7. 23 Apr, 2020 4 commits