1. 23 Jul, 2020 1 commit
    • Robert Knight's avatar
      Avoid video embeds being cut off in narrow viewports · 8cee9051
      Robert Knight authored
      Previously video embeds were given a fixed with of 369px, which is close
      to the width available to annotation content at the sidebar's default width
      (~380px). On narrower viewports the video would get cut off.
      
      Fix this by setting the width of video embeds to `100%` and using a CSS
      hack [1] to set the height of the video such that the embed has a 16:9
      aspect ratio, which is what YouTube optimizes for.
      
       - Set `width: 100%` on `excerpt__content` and `markdown-view` so that
         the annotation content always fills the available width.
      
       - Add support for specifying a class name for embed containers when
         calling `replaceLinksWithEmbeds` and use that to give embeds rendered
         in `MarkdownView` a `width` of 100%.
      
       - Change `replaceLinksWithEmbeds` to wrap iframes with an aspect-ratio
         box (see [1]) which causes the iframe's height to be adjusted as the
         width changes to have a 16:9 aspect ratio.
      
         Adding this container required changes in `media-embedder-test` to
         allow the `<iframe>` to be wrapped in a container element.
      
      [1] https://css-tricks.com/aspect-ratio-boxes/
      8cee9051
  2. 22 Jul, 2020 2 commits
    • Kyle Keating's avatar
      Improve typechecking for several components and their dependencies · e76b5470
      Kyle Keating authored
      - TagList
      - TagEditor
      - MarkdownEditor
      - Excerpt
      - AutocompleteList
      - AnnotationBody
      e76b5470
    • Kyle Keating's avatar
      Improve typechecking for Stores (#2347) · 6c76613c
      Kyle Keating authored
      Add SidebarStore type. This is an aggregation of the base ReduxStore + each one of our stores baked in. The fist store added here is simply the Activity store (as a first example)
      
      There are some assumptions when making store types:
      
      1. It is assumed they are transformed in `createStore` where the selectors and actions are flattened.
      
      2. Some meta data (namely, the init method, namespace and update method) are refactored or removed.
      
      These transformations are implied through the typing which explicitly ignores these methods and structure of the raw store before the transformation in create-store.
      6c76613c
  3. 21 Jul, 2020 17 commits
  4. 20 Jul, 2020 19 commits
  5. 17 Jul, 2020 1 commit