ProjectMirador / research-and-demos

Proofs of concept for Mirador 3
10 stars 8 forks source link

break out Window components further enabling conditional rendering ba… #93

Closed mejackreed closed 5 years ago

mejackreed commented 5 years ago

…sed off of manifest state.

Requires #92 to effectively test this.

Right now (before this PR) adding a window requires a manifest to have already been fetched. This PR breaks out Window functionality further to enable conditional rendering for various manifest states.

Composing the window now looks like:

<div className={ns('window')} style={this.styleAttributes()}>
        <WindowTopBar
          windowId={window.id}
          manifest={manifest}
        />
        <WindowBackground
          manifest={manifest}
        />
        {this.renderViewer()}
</div>

Inspired by #91, wanting the ability to add a window, without first having to fetch a manifest, or having the window reducer know that it needs to do so.