Skip to main content

create_floater_block

Function create_floater_block 

Source
async fn create_floater_block(
    state: &AppState,
    source_tab_id: &str,
    meta: &MetaMapType,
) -> Result<String, String>
Expand description

Create the block through the reducer (NOT wcore-direct) so it lands in state.blocks — the tear_off_block saga’s pre-condition checks the reducer-canonical block map. The BlockCreated event also carries the meta, which persist_subscriber::apply_block_created writes into the mstore Block so the editor renders with its file + tree state. We skip layout placement, so the block never renders docked before the saga moves it into the floating workspace (no flash).