-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: existing-appsIntegration with existing apps via the add-to-app flowIntegration with existing apps via the add-to-app flowengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform team
Description
Get the code ready to support the multi-view embedding feature. Some changes:
- Accept a
hostElementsarray in the Engine configuration - Refactor the current View Embedder so it's not a singleton anymore.
- Each View should know how to embed itself, or have an Embedding Strategy associated with it. See this doc.
There's multiple assumptions made in the current view embedder that only one view is going to exist at a time (like the addSceneToSceneHost method, which need to be delegated to each view implementation).
For simplicity, the new design should be something similar to:
- The platform_dispatcher continues being a singleton that coordinates the engine (in the future, this should be an actual object that gets instantiated).
- The platform_dispatcher contains a
Map<ViewId, View>where all the views are cached for access later. - The platform_dispatcher can initialize new Views depending on their configuration (create the appropriate DOM structure for the view, create the view itself), and cache it in the view cache.
- The platform_dispatcher should receive a view Id for every view "operation".
- Operations should fetch a view by its id, and operate on it, rather than delegate it to the view_embedder. Look how the current implementation of
renderignores the passed-inview.
- Operations should fetch a view by its id, and operate on it, rather than delegate it to the view_embedder. Look how the current implementation of
- The platform_dispatcher contains a
Most of the above should be implementable in the current state of the engine, without having to wait for the full-blown multi-view setup (at least, to make it work in single-view with the refactored multi-view architecture).
statop, rfranklin03, oscarvaldes, BoHuCB, davidmigloz and 24 more
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: existing-appsIntegration with existing apps via the add-to-app flowIntegration with existing apps via the add-to-app flowengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform team