• Robert Knight's avatar
    Convert single annotation page content to Preact · 9690ba1c
    Robert Knight authored
    This is a pretty direct conversion of the `<annotation-viewer-content>`
    component from AngularJS to Preact.
    
    Much of the logic and tests are for non-UI logic, so could potentially
    be moved to a service in future.
    
    I encountered an odd issue with the `fetchThread` helper that required
    it to be put at the bottom of the file. Putting it at the top resulted
    in an error related to the `createElement` import at runtime.
    
    An issue relating to the highlighting of which reply the ID in the URL
    refers to is noted in the code. What should happen is that the reply
    that the ID in the URL refers to is visually highlighted. This is an
    existing regression from before this commit.
    9690ba1c
annotation-viewer-content-test.js 4.12 KB