1. 21 Nov, 2019 3 commits
    • Robert Knight's avatar
      Remove src/styles/base.scss · d6dc4fa7
      Robert Knight authored
      This module was used by multiple SASS entry points (annotator, sidebar)
      even though each mixin or class within it was either trivial or only
      actually used by one of the entry points. Moving the mixins to the
      individual entry points will make it easier to run the migrator.
      d6dc4fa7
    • Robert Knight's avatar
      Hoist various imports to the entry point SASS files · 234207c4
      Robert Knight authored
      In preparation for running the sass-migrator tool, hoist several imports
      from included SASS files up to the entry points at
      src/styles/{annotator/annotator.scss, sidebar/sidebar.scss}.
      234207c4
    • Robert Knight's avatar
      Fix relative import path for reset mixin · a0e193aa
      Robert Knight authored
      This path was always wrong but happened not to break the build
      previously.
      a0e193aa
  2. 20 Nov, 2019 14 commits
  3. 19 Nov, 2019 15 commits
    • Kyle Keating's avatar
      Merge pull request #1509 from hypothesis/warn-on-non-whitelisted-origin · 804c0177
      Kyle Keating authored
      Warn in JSON-RPC server if message is dropped by origin filter
      804c0177
    • Lyza Gardner's avatar
      Merge pull request #1510 from hypothesis/remove-unused-styles · e73d1a82
      Lyza Gardner authored
      Remove (some) deprecated SCSS color variables
      e73d1a82
    • Lyza Danger Gardner's avatar
      Remove completely unused color variables · 613e92f7
      Lyza Danger Gardner authored
      `$color-cardinal` and `$gray-lightest` have no references in existing
      SCSS
      613e92f7
    • Lyza Danger Gardner's avatar
      Remove `$color-silver` SCSS color variable · 328f5be2
      Lyza Danger Gardner authored
      Also remove now-unused utility class for cancel buttons—this pattern
      is only used in one place and may be on the way out in general.
      328f5be2
    • Lyza Danger Gardner's avatar
      Remove `$color-silver-chalice` SCSS color variable · 36865dbb
      Lyza Danger Gardner authored
      Sub with `$grey-4`, which is identical (`#a6a6a6`). Part of consolidating
      CSS colors.
      36865dbb
    • Lyza Danger Gardner's avatar
      Remove `$color-seashell` SCSS color variable · f24eca2c
      Lyza Danger Gardner authored
      Sub with `$grey-1`, which is virtually identical (`$color-seashell` was
      `#f1f1f1`, `$grey-1` is `#f2f2f2`. Part of consolidating CSS colors.
      f24eca2c
    • Robert Knight's avatar
    • Robert Knight's avatar
      Improve readability of `Excerpt` implementation per CR feedback · cb895b14
      Robert Knight authored
       - Use `is` prefix for boolean vars consistently
      
       - Note that the inline controls are optional
      
       - Clarify units of numeric props
      
       - Use parens to clarify precedence in a couple of expressions. This
         required overruling Prettier's formatting of these.
      cb895b14
    • Robert Knight's avatar
      060b73e1
    • Robert Knight's avatar
      Convert `Excerpt` component to Preact · d1485d0b
      Robert Knight authored
      Convert the `Excerpt` component to Preact. Rather than convert the
      existing implementation verbatim, this is a completely new implementation which
      should be easier to understand and use. Instead of requiring callers to
      provide an input property which represents the displayed data, which triggers a
      re-measurement if it changes, the new implementation observes the DOM
      directly for size changes.
      
      This component renders caller-provided content (ie. it accepts a `children`
      prop), which is not supported by the Preact <-> Angular bridge. Therefore it was
      also necessary to create components (`AnnotationBody`, `AnnotationQuote`) that
      encapsulate uses of `Excerpt` inside the `<annotation>` component.
      
       - Add `observe-element-size` utility module to watch for changes in
         the size of a DOM node using APIs available in the current browser
      
       - Add new `Excerpt` implementation and remove the old one
      
       - Remove `excerpt-overflow-monitor` utility that is not used by the new
         implementation
      
       - Add `AnnotationBody` component to render an annotation's markup body
         inside a (new) excerpt and convert the Angular template for
         `<annotation>` (annotation.html) to use it.
      
       - Add `AnnotationQuote` component to render an annotation's quote
         inside an excerpt and convert `annotation.html` to use it
      d1485d0b
    • Robert Knight's avatar
      Merge pull request #1477 from hypothesis/observe-element-size · d9abd85d
      Robert Knight authored
      Convert excerpt to Preact (1/n) - Add a utility to observe element size changes
      d9abd85d
    • Robert Knight's avatar
      Warn in JSON-RPC server if message is dropped by origin filter · 33b7c0af
      Robert Knight authored
      Address some confusion I encountered while testing
      https://github.com/hypothesis/lms/pull/1157/ where JSON-RPC messages
      from the lms app to the client would be silently dropped if the
      `rpcAllowedOrigins` config was not set correctly.
      
      Log a console warning when this happens to make the problem more
      obvious.  Before warning though, filter out non JSON-RPC messages
      because there are various other sources of "message" events which the
      client is likely to receive and which we don't want to result in warning
      spam.
      33b7c0af
    • Robert Knight's avatar
      Improve search input UX on mobile · 29f15b4a
      Robert Knight authored
       - Set an `action` on the form so that the virtual keyboard shows a
         submit button, which makes it easier to trigger a search
      
       - Use a larger font size for readability and to prevent iOS from
         zooming into the field on desktop websites
      29f15b4a
    • Robert Knight's avatar
      Improve mobile UX of markdown editor · 71d828a7
      Robert Knight authored
       - Increase the font size of the input field to make the text easier to
         read, and more importantly, stop iOS from zooming into the text field
         on mobile-optimized sites (ie. those with `<meta name="viewport"
         content="width=device-width, initial-scale=1">` in the host page)
      
       - Make the toolbar buttons bigger when using touch input and add space
         below the toolbar so that the browser can differentiate taps on the
         buttons from taps on text selection handles
      
       - Prevent toolbar overflowing annotation card on small screens.
         We use either horizontal scrolling or wrapping depending on the input mode
         (touch/non-touch). Scrolling saves vertical space, but could be inconvenient
         to use with a mouse or touchpad.
      
      fixup! - Update comments
      71d828a7
    • Robert Knight's avatar
      Merge pull request #1479 from hypothesis/annotator-toolbar-focus-ring · 73e0e81a
      Robert Knight authored
      Show focus ring on annotator toolbar buttons when using keyboard focus
      73e0e81a
  4. 18 Nov, 2019 8 commits