• Robert Knight's avatar
    Simplify the sidebar app side of sidebar <-> host frame messaging · 55093ebb
    Robert Knight authored
    Previously the communication between the sidebar and host frame was
    implemented by a shared AnnotationSync class, with a 'crossframe'
    service which abstracted the event bus on each side.
    
    This design however assumed that both sides wanted to listen to
    the same messages and react to them in similar ways. This is not
    the case, especially given the change to use Redux for state
    management in the sidebar app.
    
    This commit replaces the crossframe service and AnnotationSync class
    with a new 'frameSync' service which implements only the event
    listeners and sidebar -> page RPC calls that are actually needed.
    
    As a result, local annotation tags for annotations loaded via the API
    can now be assigned by the reducer in the Redux store, making this
    easier to test and getting us another step closer to making Annotation
    objects immutable in the sidebar app.
    55093ebb
widget-controller-test.js 14.3 KB