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

vuexのstoreの呼び出しをリテラル引数からDot記法へ: command.ts, preset.ts, engine.ts, project.ts, audio.ts #2180

Merged
merged 5 commits into from
Jul 27, 2024

Conversation

Segu-g
Copy link
Member

@Segu-g Segu-g commented Jul 27, 2024

内容

store内における関数の呼び出しにおいて、dispatch("ACTION1", payloads) のような引数におけるリテラル指定から actions.ACTION(payload) のようにdot記法によるアクセスに変更します。

  • store/command.ts
  • store/preset.ts
  • store/engine.ts
  • store/project.ts
  • store/audio.ts
    を変更しています。

storeの残りのsinging.tsはコンフリクトが多そうなので色々終わってからにしようと思います。

関連 Issue

スクリーンショット・動画など

その他

dispatch
actions

actions([\s\n]"([A-Z_])",?
actions.$1(

commit
mutations

mutations([\s\n]"([A-Z_])",?
mutations.$1(
の順に置換してその後眼力チェックしています。

Comment on lines -121 to +130
await this.dispatch("INSTANTIATE_ENGINE_CONNECTOR", {
engineId,
}).then(async (instance) => [
engineId,
await instance.invoke("engineManifestEngineManifestGet")({}),
]),
await actions
.INSTANTIATE_ENGINE_CONNECTOR({
engineId,
})
.then(async (instance) => [
engineId,
await instance.invoke("engineManifestEngineManifestGet")(
{},
),
]),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

何故かdispatchではなくthis.dispatchを使っていましたが、元PRでの言及もない上に変えても問題無いようなので修正しています。

@Segu-g Segu-g marked this pull request as ready for review July 27, 2024 17:11
@Segu-g Segu-g requested a review from a team as a code owner July 27, 2024 17:11
@Segu-g Segu-g requested review from Hiroshiba and removed request for a team July 27, 2024 17:11
Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!!

僕の方でも目で確認してみました、問題無さそう!

singing.tsのお気遣いありがとうございます!
マルチトラックプロジェクトのマージが完了したらぜひお願いできれば・・・!!

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.

2 participants