Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(codemirror): shift approach to remove placeholder #310

Merged
merged 1 commit into from
Jan 20, 2022

Conversation

danilowoz
Copy link
Member

@danilowoz danilowoz commented Jan 20, 2022

This shifts the approach used to replace the placeholder codebase to the CodeMirror editor. The previous implementation was using a React state which, for a moment, the editor didn't have any codebase at all. From now on, I brought back the previous implementation, which uses DOM API to remove the placeholder in the right moment of the CodeMirror is created, which is way faster than a React DOM flow.

@vercel vercel bot temporarily deployed to Preview – sandpack-theme January 20, 2022 10:33 Inactive
@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 12583ba:

Sandbox Source
Sandpack Blog Example 1 Configuration

@github-actions
Copy link

github-actions bot commented Jan 20, 2022

Size changes

sandpack-react

Total base Total current +/-
819 kb 819 kb ⚠️ +37 bytes (+0.00%)
Details
Dependency name / file Base Current +/-
index.js 21 kb 21 kb ⚠️ +37 bytes (+0.17%)
types.js 54 bytes 54 bytes ✅ 0 byte
@code-hike/classer 550 bytes 550 bytes ✅ 0 byte
@codemirror/closebrackets 54 kb 54 kb ✅ 0 byte
@codemirror/commands 62 kb 62 kb ✅ 0 byte
@codemirror/comment 12 kb 12 kb ✅ 0 byte
@codemirror/gutter 50 kb 50 kb ✅ 0 byte
@codemirror/highlight 59 kb 59 kb ✅ 0 byte
@codemirror/history 50 kb 50 kb ✅ 0 byte
@codemirror/lang-css 71 kb 71 kb ✅ 0 byte
@codemirror/lang-html 110 kb 110 kb ✅ 0 byte
@codemirror/lang-javascript 92 kb 92 kb ✅ 0 byte
@codemirror/language 58 kb 58 kb ✅ 0 byte
@codemirror/matchbrackets 54 kb 54 kb ✅ 0 byte
@codemirror/state 12 kb 12 kb ✅ 0 byte
@codemirror/view 54 kb 54 kb ✅ 0 byte
@codesandbox/sandpack-client 7 kb 7 kb ✅ 0 byte
@react-hook/intersection-observer 4 kb 4 kb ✅ 0 byte
codesandbox-import-utils 128 bytes 128 bytes ✅ 0 byte
react-devtools-inline 49 kb 49 kb ✅ 0 byte
react-is 824 bytes 824 bytes ✅ 0 byte

sandpack-client

Total base Total current +/-
10 kb 10 kb ✅ 0 byte
Details
Dependency name / file Base Current +/-
client.js 4 kb 4 kb ✅ 0 byte
file-resolver-protocol.js 777 bytes 777 bytes ✅ 0 byte
iframe-protocol.js 623 bytes 623 bytes ✅ 0 byte
index.js 4 kb 4 kb ✅ 0 byte
types.js 54 bytes 54 bytes ✅ 0 byte
utils.js 1 kb 1 kb ✅ 0 byte

@vercel vercel bot temporarily deployed to Preview – sandpack-docs January 20, 2022 10:35 Inactive
@vercel vercel bot temporarily deployed to Preview – sandpack-landing January 20, 2022 10:46 Inactive
@danilowoz danilowoz marked this pull request as ready for review January 20, 2022 11:02
@danilowoz danilowoz merged commit 4021b16 into main Jan 20, 2022
@danilowoz danilowoz deleted the fix/replacing-placeholder branch January 20, 2022 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant