• Eduardo Sanz García's avatar
    Convert Notebook into a react component · 265fed83
    Eduardo Sanz García authored
    Notebook class creates the container element and instantiates the preact
    component NotebookModal.
    
    NotebookModal listens to the openNotebook event sent through the
    eventBus and hides and shows the modal accordingly.
    
    The creation of the iframe is a costly operation: it involves several
    backend calls and the rendering of it in the DOM. Therefore, we delay
    the creation of the iframe element until the NotebookModal listens for
    the `openNotebook` event.
    
    The useEffect's cleanup of the NotebookModal componente has significant
    effects because it resets the overflow CSS property of document.body.
    
    As pointed by @robertknight, `render(null, container)` destroys the
    component triggering the useEffect's cleanup function.
    265fed83
Name
Last commit
Last update
..
integration Loading commit data...
adder-test.js Loading commit data...
annotation-counts-test.js Loading commit data...
annotation-sync-test.js Loading commit data...
bucket-bar-test.js Loading commit data...
empty.html Loading commit data...
features-test.js Loading commit data...
guest-test.js Loading commit data...
highlighter-test.js Loading commit data...
notebook-test.js Loading commit data...
pdf-sidebar-test.js Loading commit data...
range-util-test.js Loading commit data...
selection-observer-test.js Loading commit data...
sidebar-test.js Loading commit data...
sidebar-trigger-test.js Loading commit data...
toolbar-test.js Loading commit data...