• Randall Leeds's avatar
    Move the heatmap outside the sidebar · 794c80ec
    Randall Leeds authored
    Inject the heatmap into the host frame using the default embed script.
    
    It will be possible after this to make vanilla embed codes available
    which can be used for headless operation or inserting the heatmap in
    guest frames.
    
    Fundamentally, the heatmap is altered to behave as though it's inside
    the same frame as the annotations. That makes it easier to access
    the highlights directly, rather than the pre-resolved jquery that
    was being serialized across the bridge before.
    
    Since it is now necessary for the reply counts to be known outside the
    sidebar, the bridge is changed to support updating annotations and the
    sidebar application is changed to bubble updates through ancestors.
    
    Since iframes cannot have visible overflow the z-index constraints
    required to have the heatmap still appear attached to the sidebar
    dictated that the controlbar move outside as well.
    
    Adds query parameters when embedding to create embed codes that have
    no plugins loaded. This is useful for custom embeddings.
    
    Lastly, I took this opportunity to improve the up/down buckets with the
    help of the jquery scrollintoview plugin, which should ensure that
    this function works even in situations with nested scrollable panes.
    
    Also, closes #464.
    794c80ec
controllers.coffee 33.1 KB