• 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
..
annotator Loading commit data...
mixins Loading commit data...
sidebar Loading commit data...
ui-playground Loading commit data...
reset.scss Loading commit data...
util.scss Loading commit data...
variables.scss Loading commit data...