1. 16 Dec, 2021 10 commits
    • Robert Knight's avatar
      Limit line length in minified JS bundles · 2233d721
      Robert Knight authored
      Limit the line length in minified bundles to make them easier to examine in
      various tools which don't like very long source lines, and also mitigate an
      issue with stack traces in Firefox.
      
      Firefox stack traces report column numbers in Unicode code points whereas Sentry
      expects UTF-16 code units. If the input source contains Unicode characters which
      require multiple UTF-16 code units to represent then processed stack traces in
      Firefox will point to the wrong location.
      
      One of our dependencies (Showdown) contains a long string of emojis, which
      require multiple UTF-16 units to represent, and Terser by default tries to
      compress the code into as few lines as possible. The combined result of this is
      that stack traces from Firefox could end up being resolved to a location far
      from what is expected.
      
      Though it is not a complete fix for the issue, limiting the length of lines
      effectively mitigates this problem as only code nearby (on the same line as)
      these characters in the output is affected.
      
      I did also try Terser's `ascii_only` output option, but that increased the
      bundle size by 2% and has more potential for unexpected consequences elsewhere.
      2233d721
    • Robert Knight's avatar
      Remove all comments from minified JavaScript · 52da1f28
      Robert Knight authored
      By default Terser keeps certain comments [1] in minified output. Safari has a
      bug [2] that causes column numbers to be incorrectly reported in stack
      traces when a line contains inline comments. In minified code where the
      output is packed into a small number of lines, this can result in stack
      traces that map to the wrong source line. Stripping all comments from
      the output works around the issue.
      
      The effect on the size of the bundles is minimal. sidebar.bundle.js is
      about 2KB smaller with this change.
      
      Part of https://github.com/hypothesis/client/issues/4045
      
      [1] https://github.com/terser/terser#format-options
      [2] https://bugs.webkit.org/show_bug.cgi?id=221548
      52da1f28
    • Lyza Danger Gardner's avatar
      Extract RPC-related types into a new type module · 97ee3727
      Lyza Danger Gardner authored
      Extract RPC typing into its own module to avoid dependencies between
      the store and the RPC implementation. Clarify a few points in other
      types.
      97ee3727
    • Lyza Danger Gardner's avatar
    • Lyza Danger Gardner's avatar
    • Lyza Danger Gardner's avatar
      Define RPC payload typing in `cross-origin-rpc` · ada2f6a4
      Lyza Danger Gardner authored
      Move the typing for the parameter passed to the `changeFocusModeUser`
      RPC call into `cross-origin-rpc` and expand in preparation for
      supporting group filtering.
      ada2f6a4
    • Lyza Danger Gardner's avatar
      Add helper function for normalizing `groupid`s to `id`s · 971d844a
      Lyza Danger Gardner authored
      Add support for normalizing a set of GroupIdentifiers (which could be
      `id`s or `groupid`s or a mix) to  `id`s, for use with store layer logic.
      
      Needed to support filtering groups based on RPC calls from the LMS
      application, which sends `groupid`s.
      971d844a
    • Lyza Danger Gardner's avatar
      Restore user-focus state after changing focused group · 003d44e3
      Lyza Danger Gardner authored
      In grading mode, a student may belong to more than one group and the
      instructor may switch between groups when grading the student. Restore
      the applied user-focus filter when switching groups to maintain UI
      continuity.
      003d44e3
    • Lyza Danger Gardner's avatar
      Expand type descriptions on a couple of Group properties · 78f7899d
      Lyza Danger Gardner authored
      All Group objects have an `id`, some have a `groupid`. First party
      groups deal in `id`s only (aka `pubid`s), while LMS groups use
      `groupid`s as they include authority information and are unique across
      all authorities.
      78f7899d
    • Lyza Danger Gardner's avatar
      Show spinner in filter interface when loading · e92fe755
      Lyza Danger Gardner authored
      The only typical time that the filter interface is visible when loading
      is when loading groups for a focused student-user in grading mode.
      Other filtering happens client-side and doesn't involve loading.
      
      But when we ARE loading, don't show an inaccurate count (because we
      don't have all the results yet), show a spinner instead.
      e92fe755
  2. 15 Dec, 2021 7 commits
  3. 13 Dec, 2021 12 commits
  4. 10 Dec, 2021 2 commits
  5. 09 Dec, 2021 5 commits
  6. 08 Dec, 2021 4 commits