1. 15 Nov, 2022 3 commits
  2. 14 Nov, 2022 14 commits
  3. 11 Nov, 2022 12 commits
  4. 10 Nov, 2022 11 commits
    • Lyza Danger Gardner's avatar
    • Robert Knight's avatar
      Wait for feature flag state before sending document info in VitalSource · f4a8a351
      Robert Knight authored
      In order to facilitate a seamless transition after a chapter navigation in
      VitalSource, it will be necessary for the Guest in the new frame to report
      document information based on the same `book_as_single_document` feature flag
      state as for the previous frame.
      
      Allow integrations to signal whether the Guest should wait to receive feature
      flags from the sidebar before sending document info via `documentInfoChanged`,
      and enable this for VitalSource. We don't enable this for all integrations
      because it adds latency on the critical path to fetching and displaying
      annotations.
      f4a8a351
    • Lyza Danger Gardner's avatar
      Convert ShareLinks to TypeScript · 10e81814
      Lyza Danger Gardner authored
      10e81814
    • Lyza Danger Gardner's avatar
      a3f465da
    • Lyza Danger Gardner's avatar
      Set text color in styled cluster highlights · 8d206e21
      Lyza Danger Gardner authored
      This gives us two assurances:
      
      1. Highlight background colors, if not amazing on dark backgrounds in
         HTML documents, are at least readable
      2. We know the exact contrast between foreground and background text in
         highlight elements —— think accessibility here in the future
      8d206e21
    • Lyza Danger Gardner's avatar
      Add an HTML document with dark background to the dev server · 18bff464
      Lyza Danger Gardner authored
      This will allow us to see how highlighting features work on inverted
      documents.
      18bff464
    • Lyza Danger Gardner's avatar
      Position highlight controls relative to content container offset · ab22fbf6
      Lyza Danger Gardner authored
      Fixed positioning is always relative to the viewport, so set the top
      position of the fixed-position highlight controls to take the integration's
      content container's vertical offset from the viewport into account.
      
      Translation: ensure that highlight controls are not obscured by PDFjs'
      top menu/controls bar.
      ab22fbf6
    • Lyza Danger Gardner's avatar
    • Lyza Danger Gardner's avatar
      Apply CSS classes to both `hypothesis-highlight` and SVG rect elements · 3fa481a1
      Lyza Danger Gardner authored
      These changes apply CSS classes SVG highlight rects, which will allow
      for clustered-highlight styling.
      
      With these changes:
      
      * `hypothesis-highlight` elements always have a `hypothesis-highlight`
        CSS class, similarly to how SVG highlight rects have always had a
        `hypothesis-svg-highlight` class.
      * CSS classes passed to `highlightRange` extend instead of replace CSS
        classes on `hypothesis-highlight` elements.
      * CSS classes passed to `highlightRange` are also added to
        `hypothesis-svg-element` rects.
      3fa481a1
    • Robert Knight's avatar
      Use same frame ID for each VitalSource content frame · 2c835031
      Robert Knight authored
      Use the same "vitalsource-content" frame ID for each VitalSource guest
      frame. When a chapter navigation occurs, this will enable the sidebar to
      associate the new guest, for the new chapter, with the `Frame` object in
      the store for the previous guest.
      
      This also gives the frame a more helpful human-readable ID for debugging
      purposes.
      2c835031
    • Robert Knight's avatar
      Make temporary VitalSource page loaded after navigation more realistic · eaa11014
      Robert Knight authored
      Make the temporary page loaded during a VitalSource chapter navigation
      more realistic by:
      
       1. Having a URL that is not `about:blank`.
       2. Having content with a `#page-content` element
      
      Change (1) enables the `onDocumentReady` helper to realize that the initial
      `about:blank` URL of the new chapter's iframe is about to navigate to a
      different URL (the URL of the temporary page). See the
      `hasBlankDocumentThatWillNavigate` function.
      
      Change (2) allows the `onDocumentReady` callback in `VitalSourceInjector` to
      detect that the temporary page is not the real chapter content, and skip loading
      the client into it.
      
      Together these two changes are steps towards more seamless handling of chapter
      transitions in the sidebar.
      eaa11014