1. 01 Apr, 2021 1 commit
    • Lyza Danger Gardner's avatar
      Add `!important` to two carefully-selected utility mixins · 6ee96180
      Lyza Danger Gardner authored
      This is the first time in my life I've ever found what seems like a
      potentially valid use case for `!important`: assuring that a utility
      class that establishes rhythm based on margins is able to do its job.
      
      Typically, our components should not be styling their own margins, but
      there are some cases where we do, e.g. the initial reset of button
      styles, which sets `margin: 0`. (Components should style their own
      padding, but margins are the domain of containing/parent elements).
      
      These two `!important` rules allow two utility mixins that are explicitly
      concerned with margins to trump the specificity of margin-resetting
      rules on descendent elements.
      
      See https://css-tricks.com/when-using-important-is-the-right-choice/
      6ee96180
  2. 31 Mar, 2021 7 commits
  3. 30 Mar, 2021 2 commits
  4. 29 Mar, 2021 24 commits
  5. 26 Mar, 2021 5 commits
    • Lyza Danger Gardner's avatar
      91fa33cd
    • Lyza Danger Gardner's avatar
      Add shared buttons components · f503edcc
      Lyza Danger Gardner authored
      Add shared button components in a temporary "shared/components"
      directory. The plan is to extract this to the `frontend-shared` package
      once it has been more further integrated into the client preact app(s)
      and the kinks are worked out. This will replace
      `src/sidebar/components/Button` and will be reusable in other apps
      f503edcc
    • Lyza Danger Gardner's avatar
      Update project typecheck configuration · a8bcbc96
      Lyza Danger Gardner authored
      Update project typecheck configuration so that typechecking may be
      additionally applied to the `dev-server` area of the project. This helps
      for typechecking usage of components in the "UI Playground" app.
      
      * Add `tsconfig.json` for `dev-server` area of project
      * Add "project references" at root level
        See https://www.typescriptlang.org/docs/handbook/project-references.html
      * Update `package.json` `typecheck` script
      a8bcbc96
    • Robert Knight's avatar
      Extract side-by-side functionality out of PdfSidebar class · 793d289c
      Robert Knight authored
      Move the functionality that PdfSidebar implements elsewhere and remove
      the class. This mainly consists of side-by-side mode, but there is also
      the logic to get the scrollable document container for use with the
      bucket bar. The PDF-specific logic has been moved to the `PDF` class in
      `src/annotator/plugin/pdf.js` and the generic logic has been moved to
      the `Sidebar` or `Guest` classes.
      
      This change is a step towards creating an common interface between the
      Guest/Sidebar and the document-type/viewer specific functionality. In
      future the `PDF` class will evolve into the implementation of this
      interface for PDFs. For HTML documents the logic is currently contained
      directly in the `Guest` class and this will be extracted out into a
      class that implements the same interface.
      
       - Move the PDF-specific parts of side-by-side mode into
         `PDF#fitSideBySide`
       - Move the generic parts of side-by-side mode into the `Sidebar` class.
         This will allow it to be reused for HTML documents or other document
         types in future
       - Move the logic for determining the scrollable container into
         `PDF#contentContainer`
       - Change the annotator setup code in `annotator/index.js` to always
         instantiate the `Sidebar` class, regardless of document type
      793d289c
    • Eduardo Sanz García's avatar
      Position the adder to the top-left corner on hide · b2b33c2e
      Eduardo Sanz García authored
      When the `adder` is hidden reposition the outer container to the
      top-left corner of the host page.
      b2b33c2e
  6. 25 Mar, 2021 1 commit