-
Notifications
You must be signed in to change notification settings - Fork 3
演習問題にSandpackによる実行環境を追加 #889
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
base: main
Are you sure you want to change the base?
Conversation
Deploying utcode-learn with
|
| Latest commit: |
27a8ecf
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://28fc5bf2.utcode-learn.pages.dev |
| Branch Preview URL: | https://code-sandpack.utcode-learn.pages.dev |
chvmvd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
途中までですが
後は、Pull requestのタイトルと説明欄を書いていただけると、ありがたいです 🙇
Pull requestの大まかな内容と差分だけからではわからない意図などを書いていただけるとレビューがしやすくなり助かります 🥰
| title: HTML | ||
| --- | ||
|
|
||
| import { Sandpack } from "@codesandbox/sandpack-react"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <Sandpack | ||
| template="static" | ||
| files={{ | ||
| "/index.html": firstCssHtml, | ||
| }} | ||
| options={{ | ||
| activeFile: "/index.html", | ||
| }} | ||
| /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
説明でコードと画像があり、ここでもコードとプレビューをつけると、重複してわかりにくいように思います。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
演習問題以外にあったので削除しました。
180a1df
| <Sandpack | ||
| template="static" | ||
| files={{ | ||
| "/index.html": yellowHelloCssHtml, | ||
| "/style.css": yellowHelloCssCss, | ||
| }} | ||
| options={{ | ||
| activeFile: "/index.html", | ||
| }} | ||
| /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Answerコンポーネントの外に出てしまっています。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
中に移動しました。
| <Sandpack | ||
| template="static" | ||
| files={{ | ||
| "/index.html": fooHtml, | ||
| }} | ||
| options={{ | ||
| activeFile: "/index.html", | ||
| }} | ||
| /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
もとからで申し訳ないですが、_samples/fooフォルダの中身が実際の教材とズレていそうですね。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
直しました。
| <ViewSource url={import.meta.url} path="_samples/weird-comparison" /> | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
この後の説明の答えを確認するためにCodeSandboxが置いてあったので、これを消すなら説明も変えた方が良さそうですね。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここはViewSourceがあった方が良さそうですね。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <Sandpack | ||
| template="static" | ||
| files={{ | ||
| "/index.html": answerWhileHtml, | ||
| "/script.js": answerWhileJs, | ||
| }} | ||
| options={{ | ||
| activeFile: "/script.js", | ||
| }} | ||
| /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
うーむ
これはどうしよう。
SyntaxError: Identifier 'i' has already been declared
となっている。

変更内容
@codesandbox/sandpack-reactを追加raw-loaderを使ってサンプルファイルを読み込むように変更削除したファイル
Sandpack導入に伴い、ViewSource用に存在していた一部のサンプルファイルを削除