mdx-editor / mdx-editor/editor
Run button is not present if Preview component is not set.
Open
Nobody has claimed this yet.
feature request/enhancement
- Dominant language
- TypeScript
- Stars
- 3.7k
- Forks
- 307
- Avg merge
- 14h 22m
- Merged PRs (30d)
- 5
Description
Given the following sandpackConfig
const sandpackConfig = {
defaultPreset: "default",
presets: [
{
name: "default",
meta: "live",
label: "TypeScript",
sandpackTemplate: "vanilla-ts",
sandpackTheme: "light",
snippetFileName: "/index.ts",
snippetLanguage: "ts",
initialSnippetContent: [
'import "./styles.css";',
'document.getElementById("app").innerHTML = `<h1>Hello world</h1>`;',
].join("\n"),
},
],
panes: {
console: true,
preview: false,
},
};
I guess the need for the solution where we pass down the Sandpack Panels as components instead of just flags is surfacing, as this setting is something we'd have to change on the SandpackCodeEditor by adding showRunButton prop.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the SandpackCodeEditor handling of the sandpackConfig.panes.preview setting and the Run button. Reproduce the configuration shown with preview disabled, then make the intended Run control available without a Preview component and verify the behavior in the relevant editor tests or example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100