Skip to content

Improved context ergonomics #2

@TylerBloom

Description

@TylerBloom

Currently, the WebTerminal's component Context is passed directly into the TerminalApp methods. While functional, this poses a few ergonomics problems.

First, creating callbacks is much more annoying. The return value of the callback's closure is implicitly converted into the component's message type; however, there is a layer of abstraction between the terminal app's message type and the web terminal message type. This requires the callback creator to either create their message type or construct a web terminal message. Ideally, this same implicit conversion behavior can be maintained.

Second, there is currently no way for the terminal app to access the terminal or the terminal backend. Ideally, this would be accessible via the context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions