Repository navigation
MDX 내 React 기반 라이브 컴포넌트 데모 임베드 - #205
Open
hyoseong1994 wants to merge 1 commit into
Open
hyoseong1994 wants to merge 1 commit into
hyoseong1994 wants to merge 1 commit into
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Ready View logs |
daleui | 018d68d | Commit Preview URL | Oct 14 2026, 12:01 AM |
hyoseong1994
force-pushed
the
28-mdx-live-demo
branch
2 times, most recently
from
October 13, 2026 23:57
b32bc54 to
184059e
Compare
Add a `preview` flag for code fences in docs MDX. A remark plugin parses the fence into live JSX and keeps the original fence for Expressive Code, so the rendered demo and the shown code come from one source. The two are shown as CodeTabs panels, which keeps copy-to-clipboard and highlighting on Expressive Code's own code block. Inline editing is intentionally out of scope: it would ship a browser JSX compiler on every docs page.
hyoseong1994
force-pushed
the
28-mdx-live-demo
branch
from
October 14, 2026 00:01
184059e to
018d68d
Compare
hyoseong1994
marked this pull request as ready for review
October 14, 2026 00:11
Member
|
고생하셨습니다. 다만 몇 가지 수정을 제안드립니다. 다른 디자인 시스템에서는 MDX 내 라이브 데모를 어떻게 구현하는지 살펴봤습니다.
이 PR에서는 예제를 별도 TSX 파일로 작성하고, MDX에서 참조하는 방식을 제안드립니다.
이렇게 하면 작성 시 예제 파일 하나가 추가되지만, 일반 React 코드와 동일하게 실행되면서 코드 표시도 같은 파일을 기준으로 유지할 수 있을 것 같습니다. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
문서 MDX에서 실제 달레 UI 컴포넌트를 라이브로 렌더링하는 인프라입니다. (closes #28)
코드 펜스에
preview를 붙이면 remark 플러그인이 프리뷰 JSX + 원본 코드 펜스로 묶습니다. 펜스를 그대로 남기므로 Expressive Code 하이라이팅이 유지되고, 보이는 코드와 렌더링 결과가 같은 문자열에서 나옵니다.프리뷰와 코드는 기존
CodeTabs를 재사용한 탭으로 나뉩니다. 코드 탭이 평소의 코드 블록과 같으므로 복사 버튼도 Expressive Code 기본 동작을 그대로 씁니다. 인라인 편집은 브라우저용 JSX 컴파일러 비용이 커서 지원하지 않고, 펜스 안에는 JSX만 쓸 수 있습니다(import·설명이 섞이면 빌드 실패). 작성 규칙은CONTRIBUTING.md에 적었습니다.테스팅
bun run lint·bunx tsc -b·bun run format·bun run coverage(156 통과, 신규 파일 100%) ·bun run build통과/docs/button에서 라이트·다크 모드와 두 탭을 확인했고, 프리렌더 HTML에도 실제Button마크업이 들어갑니다체크 리스트