Skip to content

Implement mechanism for dynamic slot configuration #78

@arbrandes

Description

@arbrandes

Description

We need a mechanism for Apps (or routes, or components) to ask the shell for modifications to slots or widgets - in particular the header and footer - when they're mounted, and to remove them when they're unmounted.

This first immediate use case is allowing the Learner Dashboard App to display the expected header.

Suggested implementation strategy

An initial investigation suggests that using SiteContext to provide a setter to siteConfig would be enough. It would thus be possible for any child component to add slot configuration on mount (via useEffect(), []) with an empty dependency array), and remove it on umount (by returning a cleanup function from useEffect()).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions