Skip to content

[web:engine] improve programmatic engine bootstrap API for multi-view #138906

@yjbanov

Description

@yjbanov

In multi-view mode implicitView is not needed, but it manages to sneak itself in anyway. For example, initializeEngineUi will initialize it. That makes testing multi-view awkward, where a test can't test pure multi-view, but has to account for an implicitView side-loading itself into the page. We should reshape the API such that you can bootstrap in any mode you want.

To tell us how this might work, here's a message from @mdebbar from a chat thread:

I want us to move to a world where implicitView is not created by default. Instead, it's only created when required (and we should minimize the situations that require an implicit view).

So tests ideally should all run without creating an implicit view. The few tests that absolutely need an implicit view can call ensureImplicitViewInitialized().

In such a world, the initialization sequence for tests shouldn't create the implicit view.

Tests do:

await bootstrapAndRun(); // no implicit view

And tests that need an implicit view:

await bootstrapAndRun(); // no implicit view
ensureImplicitViewInitialized(); // add implicit view

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority issues at the top of the work listengineflutter/engine related. See also e: labels.platform-webWeb applications specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions