Skip to content

playgroundにバージョン切り替えを追加 #17

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

Merged
merged 9 commits into from
Jan 8, 2025

Conversation

uzmoi
Copy link
Member

@uzmoi uzmoi commented Jan 6, 2025

Close #12

いらないバージョンを読み込まなくて良いようにdynamic importをしている。
<select />で選ぶようにしたが、/// @ 0.19.0の形式のコメントにも対応したい。

@kakkokari-gtyih
Copy link
Collaborator

draftだけど動作することを確認したのでapprove

@uzmoi
Copy link
Member Author

uzmoi commented Jan 7, 2025

/// @ 0.19.0のコメントは↓を書けば動きはしたが、コード入力中にローディングが挟まってエディタからフォーカスが外れるため見送り。

watch(code, (newCode, oldCode) => {
    const newCodeVersion = utils.getLangVersion(newCode);
    if (
        newCodeVersion != null &&
        versionModules.has(newCodeVersion) &&
        newCodeVersion !== utils.getLangVersion(oldCode)
    ) {
        version.value = newCodeVersion;
    }
});

@uzmoi uzmoi marked this pull request as ready for review January 7, 2025 16:35
@kakkokari-gtyih kakkokari-gtyih merged commit 9dc3321 into aiscript-dev:main Jan 8, 2025
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.

Playgroundページの複数バージョン対応
2 participants