1. 11 Feb, 2022 4 commits
  2. 09 Feb, 2022 7 commits
  3. 08 Feb, 2022 9 commits
  4. 07 Feb, 2022 12 commits
  5. 04 Feb, 2022 4 commits
    • Eduardo Sanz García's avatar
      Show buckets in the bucket-bar for VitalSource · c3f6ebe9
      Eduardo Sanz García authored
      Background information
      
      Currently, the bucket-bar should display anchor positions only from a
      _single_ guest frame. This is because there is no merging mechanism for
      anchor positions from multiple guest frames.
      
      Before this PR
      
      * The host frame listened for `anchorsChanged` events from
      _all_ the guest frames.
      
      * Only _one_ guest frame sent this event. We referred to this guest
        frame as having the 'main' annotatable content.  The 'main'
        annotatable guest frame was identified by not having a
        `subFrameIdentifier` (a configuration option added to a guest frame
        when the Hypothesis client was injected). Hence, the 'main'
        annotatable guest frame was always the frame where the Hypothesis
        loaded initially (in contrast with the injection mechanism).
      
      In this PR
      
      We have reversed the logic of how the `anchorChanged` RPC
      events are send and received:
      
      * _Every_ guest frame sends `anchorsChanged` RPC events to the host
        frame.
      
      * The host frame chooses to listen to only _one_ guest frame for the
        `anchorsChanged` RPC events: the guest frame that connects first with
        the host.
      
      For non-VitalSource case, the first guest frame that connects to the
      host frame is the one where the Hypothesis client was initially loaded
      (doesn't contain `subFrameIdentifier` option).
      
      For the VitalSource, because of #4176, there is no guest frame in the
      host frame. This allows the guest frame in the book content, where the
      Hypothesis client was injected, to send anchor positions, and positions
      to be reflected in the host's bucket-bar.
      c3f6ebe9
    • Eduardo Sanz García's avatar
      Improve consistency on bucket hovering and focusing · 259d695e
      Eduardo Sanz García authored
      On #4069, we introduced a small improvement when hovering a left-pointed
      bucket: focus the corresponding annotation card, in addition to the
      anchor's highlight.
      
      In this PR, we introduce the same improvement to the up and down-pointed
      buckets.
      
      In addition, I have realised we handled `onBlur` but not `onFocus`
      events. I have added more complete support for keyboard navigation.
      
      I substituted `onMouseMove` for `onMouseEnter` because it is triggered
      less frequently.
      259d695e
    • Eduardo's avatar
      Apply suggestions from code review · 6ed8c93b
      Eduardo authored
      Co-authored-by: 's avatarRobert Knight <robertknight@gmail.com>
      6ed8c93b
    • Eduardo Sanz García's avatar
      Do not create a `Guest` instance in the VS container · 1b8e8a4d
      Eduardo Sanz García authored
      In order to not create an unnecessary `Guest` instance in the
      VitalSource container we needed to do the following:
      
      * The `VitalSourceContainerIntegration` is stripped down and converted
        to a class, `VitalSourceInjector`, that does not implement the
        Integration interface but is only responsible for injecting the client
        into content frames.
      
      * The host frame checks the VS frame role and either constructs a Guest
        or sets up the `VitalSourceInjector` as appropriate.
      
      * The `HypothesisInjector`-related logic in `Guest` is extracted out of
        that class and set up in the annotator entry point instead.
      1b8e8a4d
  6. 03 Feb, 2022 4 commits