allen-cell-animated / website-3d-cell-viewer

Other
5 stars 5 forks source link

Refactor viewer app to allow direct state access when sharing #235

Closed ShrimpCryptid closed 2 months ago

ShrimpCryptid commented 4 months ago

Description

The page header's share button has no way to access state from inside of ImageViewerApp to include in a shareable URL. This feeds into a larger discussion about its design and architecture.

New suggested architecture, from Dan:

// website / standalone app
<LandingPage>
    <Header></Header>
</LandingPage>

<AppWrapper>
    <AppStateManager> // <=== "APP"
        <Header>
        </Header>
        <ImageViewerApp>
            // also gets embedded
        </ImageViewerApp>
    </AppStateManager>
</AppWrapper>

// embedded
<AppStateManager>
    <Header> // omit for embedding
    </Header>
    <ImageViewerApp>
        // also gets embedded
    </ImageViewerApp>
</AppStateManager>

// renaming
<ImageViewerApp>
    <Header>
    </Header>
    <ImageViewerComponent>
    </ImageViewerComponent>
</ImageViewerApp>

Based on a discussion with @frasercl and @toloudis on 4/29/24. Lmk if I'm missing any details!

ShrimpCryptid commented 3 months ago

Redux????

ShrimpCryptid commented 3 months ago