• Robert Knight's avatar
    Move scroll container measuring into a layout effect · eaaddb46
    Robert Knight authored
    `ThreadList` was measuring the height and scroll offset of the scroll
    container inside the render function instead of a layout effect. As a result
    it could fail if the scroll container is rendered by a parent component
    and its DOM has not yet been created.
    
    This issue was uncovered when trying to change the app to call
    `router.sync()` before waiting for `groups.load()` to complete.
    
    A test expectation had to be changed becaused it turned out that the
    scroll container had the wrong height when it was measured in the
    previous way (it was measured as 0px instead of the expected 350px).
    eaaddb46
thread-list.js 6.82 KB