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

fix: ドラッグアンドドロップでプロジェクトファイルやテキストファイルが読み込めなかったのを直す #2433

Conversation

Hiroshiba
Copy link
Member

@Hiroshiba Hiroshiba commented Dec 22, 2024

内容

の解決プルリクエストです。
一応このプルリクエストが先に必要です。

経緯はissue側のコメントに書いています。

解決方法として、ブラウザ側に持ってこられたFileはelectronの関数を使ってパスを取得できるぽかったので、その経路を用意しました。
ブラウザの時はこの関数が使えないので、代わりにそのままFileオブジェクトを渡せるようにしました。

関連 Issue

close #2431

その他

ついでにブラウザでのドラッグ&ドロップも動くようになったはず。便利。

@Hiroshiba Hiroshiba requested a review from a team as a code owner December 22, 2024 17:48
@Hiroshiba Hiroshiba changed the title LOAD_PROJECT_FILEのconfirmがずっと使われてないので消す fix: ドラッグアンドドロップでプロジェクトファイルやテキストファイルが読み込めなかったのを直す Dec 22, 2024
Comment on lines -689 to +694
action(payload: { filePath?: string }): void;
action(
payload:
| { type: "dialog" }
| { type: "path"; filePath: string }
| { type: "file"; file: File },
): void;
Copy link
Member Author

@Hiroshiba Hiroshiba Dec 22, 2024

Choose a reason for hiding this comment

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

filePathが指定されていなかったらダイアログが開かれる実装だったけど、ややこしいので経路を選べるようにしました。

@voicevox-preview-pages
Copy link

voicevox-preview-pages bot commented Dec 22, 2024

🚀 プレビュー用ページを作成しました 🚀

更新時点でのコミットハッシュ:82a7c9e

@Hiroshiba Hiroshiba marked this pull request as draft December 22, 2024 18:02
@Hiroshiba Hiroshiba marked this pull request as ready for review December 27, 2024 17:08
@Hiroshiba Hiroshiba force-pushed the ドラッグアンドドロップでプロジェクトファイルやテキストファイルが読み込めなかったのを直す branch from 4565d2c to 82a7c9e Compare December 27, 2024 17:11
@Hiroshiba Hiroshiba requested a review from Copilot December 27, 2024 17:12

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 13 changed files in this pull request and generated no comments.

Files not reviewed (8)
  • src/components/Talk/TalkEditor.vue: Evaluated as low risk
  • src/components/Talk/ToolBar.vue: Evaluated as low risk
  • src/components/App.vue: Evaluated as low risk
  • src/components/Menu/MenuBar/MenuBar.vue: Evaluated as low risk
  • src/components/Talk/menuBarData.ts: Evaluated as low risk
  • src/backend/electron/preload.ts: Evaluated as low risk
  • src/plugins/ipcMessageReceiverPlugin.ts: Evaluated as low risk
  • src/store/audio.ts: Evaluated as low risk
Comments suppressed due to low confidence (1)

src/type/ipc.ts:247

  • Changing filePath from optional to required might cause issues if there are any calls to LOAD_PROJECT_FILE without a filePath. Ensure that all calls to LOAD_PROJECT_FILE are updated accordingly.
args: [obj: { filePath: string }];
@Hiroshiba
Copy link
Member Author

たぶん大丈夫だと思うのでマージします!

@Hiroshiba Hiroshiba enabled auto-merge January 5, 2025 06:15
@Hiroshiba Hiroshiba added this pull request to the merge queue Jan 5, 2025
Merged via the queue into VOICEVOX:main with commit df4ad34 Jan 5, 2025
11 checks passed
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.

ドラッグアンドドロップでプロジェクトファイルが読み込めなくなってるかも?
1 participant