Skip to content

[Share/Embed] Multiple modules not supported in link to sandbox (only embed) #3668

@jsejcksn

Description

@jsejcksn

🐛 bug report

Description of the problem

#1315 was implemented, which allows linking to multiple modules when sharing. Here's what the docs say:

Embed options

module: Which module to open by default. Multiple paths comma separated are allowed, in that case we show them as tabs

Multiple modules don't work when linking to a sandbox (paths beginning with /s/). They only work for links to embeds (paths beginning with /embed/).

Here are example links demonstrating this:

Sandbox:
https://codesandbox.io/s/481l76l2x9?module=/src/Todo/TodoController.js,/src/Todo/TodoList.js

Embed:
https://codesandbox.io/embed/481l76l2x9?module=/src/Todo/TodoController.js,/src/Todo/TodoList.js

Expected

Including multiple modules in a link to a sandbox opens those modules in editor tabs

Observed

Only the first comma-separated module path opens in a tab

(But works as expected for embeds)

Additional info

Perhaps it is intended that only some embed options will work for links to sandboxes and only some will work for links to embed views, but if that is the case, it is not documented.

Your Environment

Software Name/Version
Сodesandbox any
Browser any
Operating System any

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions