Codesandbox-client: Embedded sandbox shows only Preview on the width less than 816px

Created on 31 Dec 2019  路  3Comments  路  Source: codesandbox/codesandbox-client

馃悰 bug report

Description of the problem

When trying to add an embedded sandbox into the container with the width less than 816px, it shows the Preview tab only even if 'Editor+Preview' was selected

How has this issue affected you? What are you trying to accomplish?

I am trying to add sandboxed to the documentation based on VuePress and the main container there is 740px width (a good example could be https://router.vuejs.org/). I wonder if it's possible to show both editor+preview tab on this container width

Link to sandbox: link (optional)

Your Environment

| Software | Name/Version |
| ---------------- | ------------ |
| 小odesandbox |
| Browser | Chrome 79.0
| Operating System | MacOS Catalina

Embed

Most helpful comment

馃憢馃憢

Gonna ping @DannyRuchtie and @siddharthkp as they worked on the new embeds

All 3 comments

馃憢馃憢

Gonna ping @DannyRuchtie and @siddharthkp as they worked on the new embeds

馃憢

Yeah, we try to be smart (sometimes too smart) to use the space as well as we can. Under 800px, we start showing only preview.

You can override that behaviour by passing ?view=split which will then always show both editor and preview. You might want to combine that with &editorsize=60 which sets the starting position of editor to a percentage that you want like 60% instead of 50%

@siddharthkp thank you for the answer, that's exactly what I needed! Closing the issue 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

oliversturm picture oliversturm  路  3Comments

donavon picture donavon  路  3Comments

MarcelloTheArcane picture MarcelloTheArcane  路  3Comments

alansouzati picture alansouzati  路  3Comments

k15a picture k15a  路  3Comments