• Randall Leeds's avatar
    Consolidate style and naming of highlight state · 1b497e2b
    Randall Leeds authored
    Rename some things to be consistent about how we treat highlight
    states.
    
    - Use blue highlights for focus no matter whether active highlights
      are on or off.
    - Use `setFocused` instead of `setActive` when setting the focus.
    - Rather than `setViewerFocus` and `setFocusedHighlights` have
      symmetrical RPC calls named 'focusAnnotations` in both directions.
    - Get rid of the multiple highlight levels for focus. When showing the
      focus it's not important to darken inner highlights. The highlights
      visible mode still has multiple levels, all yellow.
    - Remove the "annotator-hl-temporary" styles since we never call
      `setTemporary` anymore.
    - Remove the "finalizeHighlights" event because nothing listens for it.
    - Rename the scope method `isFocused` to `hasFocus` because I have a
      general preference against participial adjectives. It is much easier
      to remember always to use the basic verb or noun meaning of focus,
      with no ending. `hasFocus`, `focusAnnotations`, etc.
    
    Removing dead code from our annotator branch and dropping the '-ed'
    suffix from class names is left out for simplicity of managing a single
    PR against one repo for the moment, but may be advisable.
    1b497e2b
controllers.coffee 11.3 KB