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

マルチエンジン:エンジン毎の設定を追加 #1146

Merged
merged 42 commits into from
Jan 28, 2023

Conversation

sevenc-nanashi
Copy link
Member

内容

タイトル通り。

関連 Issue

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

(なし)

その他

(なし)

@sevenc-nanashi sevenc-nanashi requested a review from a team as a code owner January 25, 2023 09:13
@sevenc-nanashi sevenc-nanashi requested review from Hiroshiba and removed request for a team January 25, 2023 09:13
@sevenc-nanashi sevenc-nanashi marked this pull request as draft January 25, 2023 09:13
src/background.ts Outdated Show resolved Hide resolved
src/store/type.ts Outdated Show resolved Hide resolved
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.

良いですね!!!
ちょっと全部見れてないのですが、問題が起こりにくいようにするコードの提案をいくつかコメントしました。

UIですが、実装を最速にする形を目指し、時間があればこだわっていくのが良いのかなと思いました!
なので現状からの提案の形はこんな感じになりそうです。

  1. 「エンジンの選択」を上に持っていく
  2. 「エンジンの選択」はマルチエンジン時のみ表示する
    • こうすると、デフォルトエンジンの個別設定をしたあと、全体設定しかできなくなるが、これはそういう仕様にする
    • 解消には「マルチエンジンじゃないときは継承する」処理を書けば良いけど、影響範囲が広いのでたぶんかなり大変
    • FIXMEコメントだけ書いておく
  3. 個々のサンプリングレートは変えられないようにする
    • そういうUIを作るより個々のサンプリングレートも変えられるようにしたほうが早いのであれば、そうしても良さそう。

@sevenc-nanashi
Copy link
Member Author

image
上に置いてみました。

src/type/preload.ts Outdated Show resolved Hide resolved
src/store/audio.ts Outdated Show resolved Hide resolved
src/store/setting.ts Outdated Show resolved Hide resolved
src/store/setting.ts Outdated Show resolved Hide resolved
src/store/setting.ts Outdated Show resolved Hide resolved
src/type/preload.ts Outdated Show resolved Hide resolved
@sevenc-nanashi
Copy link
Member Author

レビューされた部分を修正しましたー。

src/background.ts Outdated Show resolved Hide resolved
Co-authored-by: Hiroshiba <hihokaruta@gmail.com>
@@ -977,6 +975,7 @@ export type SettingStoreState = {
splitTextWhenPaste: SplitTextWhenPasteType;
splitterPosition: SplitterPosition;
confirmedTips: ConfirmedTips;
engineSettings: EngineSettings;
Copy link
Member

Choose a reason for hiding this comment

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

好みかもですが、他の〜sは複数の方を型定義してないので、合わせてこうすると揃うかもとか思いました。

Suggested change
engineSettings: EngineSettings;
engineSettings: Record<string, EngineSetting>;

(こうするとEngineSettingsは不要になりそう)
(まあコメントしてますがかなりどっちでも良いかもです!)

Copy link
Member Author

Choose a reason for hiding this comment

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

ストアで使ってますね

Comment on lines +1048 to +1052
}): Promise<void>;
};

CHANGE_USE_GPU: {
action(payload: { useGpu: boolean }): void;
action(payload: { useGpu: boolean; engineId: string }): Promise<void>;
Copy link
Member

Choose a reason for hiding this comment

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

Promise<void>じゃなくてvoidかも(たぶん勝手にPromise型になる)

Copy link
Member Author

Choose a reason for hiding this comment

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

けっこう色々なところでPromiseがついてますね

Co-authored-by: Hiroshiba <hihokaruta@gmail.com>
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!!!!!

とやかくコメントしてますがマイグレーションのとこ以外は修正有無どちらでもという感じです!
ありがとうございました!!

@raa0121 さんや @y-chan さんに動かしていただいたりコメントもらえると嬉しいかもです。
たぶんこちらの機能はあまりチェックされることなくrelease-0.14に入るので、なるべくチェックしておきたいためです。
もしお時間あれば 🙇‍♂️

Copy link
Member

@y-chan y-chan left a comment

Choose a reason for hiding this comment

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

LGTM!
全体設定がなくなってスッキリしたかなと思いますし、動作も問題なさそうでした!
一箇所だけ、全体設定削除に伴う変更忘れを見つけた(他にもあるかもだけど...)ので、指摘です!

Promise周りは、私が型付きVuexを作った時にどっちも許容するようにしたのが問題だったりするので、一旦無視で良いかなと...!

src/components/SettingDialog.vue Outdated Show resolved Hide resolved
@Hiroshiba
Copy link
Member

PRありがとうございました!!マージします!!

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.

6 participants