-
Notifications
You must be signed in to change notification settings - Fork 350
feat: 音声書き出し時にキャラクターごとの音声ライブラリ利用規約を案内する #2737
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
Open
Hiroshiba
wants to merge
54
commits into
VOICEVOX:main
Choose a base branch
from
Hiroshiba:3つの関数を1つに共通化する
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
The head ref may contain hidden characters: "3\u3064\u306E\u95A2\u6570\u30921\u3064\u306B\u5171\u901A\u5316\u3059\u308B"
Open
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
eac25b6
fix(dialog): ダイアログのキャンセル処理を修正
Hiroshiba d45361a
refactor(toolbar): ダイアログ関連の音声生成処理をリファクタリング
Hiroshiba 2855feb
stash
Hiroshiba 4d45ac9
立ち絵を表示できるようにしたけど縦幅の範囲がなんかおかしい
Hiroshiba 22a8bdc
feat(dialog): キャラクターポリシーダイアログのポリシー表示をマークダウン対応に変更
Hiroshiba ee0b62d
Merge remote-tracking branch 'upstream/main' into 3つの関数を1つに共通化する
Hiroshiba cd724de
chore(plan): 利用規約同意機能の実装計画ファイルを削除
Hiroshiba 54b7f1f
feat(dialog): ライブラリ利用規約ダイアログを実装
Hiroshiba e52d030
feat(dialog): 利用規約ダイアログのポリシーにリンクを追加
Hiroshiba 5d1fbba
refactor(dialog): "accepted" を "confirmed" に変更
Hiroshiba 7e5c3ea
feat(dialog): 音声ライブラリ利用規約ダイアログを実装
Hiroshiba 9f4195b
refactor(dialog): "accepted" を "confirmed" に変更
Hiroshiba 81f7ad3
refactor(ui): 利用規約ダイアログの名前を変更
Hiroshiba 0caf990
refactor(dialog): 音声ライブラリの確認済みキーに関するリファクタリング
Hiroshiba fcc2e06
宣言場所を変更
Hiroshiba d174741
refactor(dialog): 音声ライブラリ関連の変数名を利用規約に基づく名称に変更
Hiroshiba ec33ee1
Merge remote-tracking branch 'upstream/main' into 3つの関数を1つに共通化する
Hiroshiba 56cde12
refactor: 音声書き出し時のダイアログ表示部分を共通化
Hiroshiba 2b7455e
Merge branch 'refactor--音声書き出し時のダイアログ表示部分を共通化' into 3つの関数を1つに共通化する
Hiroshiba 2f6f85e
refactor(dialog): テストキャラクターのIDを動的に生成するように変更
Hiroshiba 60d3fa2
test: e2eテスト書いた。
Hiroshiba fa0453c
Merge branch 'main' into 3つの関数を1つに共通化する
Hiroshiba 9f35c1e
Merge branch 'main' into 3つの関数を1つに共通化する
Hiroshiba b9c0f33
feat(dialog): 音声ライブラリポリシーダイアログに確認済みキャラクターIDを追加
Hiroshiba eaa14e4
refactor(dialog): 利用規約確認済みキャラクターIDの保存処理をリファクタリング
Hiroshiba 9aadae4
feat(dialog): キャラクターポリシーリストに役割属性を追加
Hiroshiba 65fef8a
feat(tests): 音声ライブラリ利用規約確認のテストを追加
Hiroshiba 7c35f05
style(utils): コメントの表現を修正
Hiroshiba dde269f
feat(tests): 設定マイグレーションのスナップショットに termConfirmedCharacterIds を追加
Hiroshiba 469cdb5
feat(tests): 音声ライブラリ利用規約確認ダイアログの処理を追加
Hiroshiba e9d97de
refactor(tests): 利用規約確認ダイアログの処理をリファクタリング
Hiroshiba 25c9f62
[update snapshots]
Hiroshiba 8ca04fb
(スナップショットを更新)
github-actions[bot] e2996d4
chore(tests): スナップショットを更新
Hiroshiba 819cdc4
Merge remote-tracking branch 'upstream/main' into 3つの関数を1つに共通化する
Hiroshiba 5ed4c69
Merge remote-tracking branch 'upstream/main' into 3つの関数を1つに共通化する
Hiroshiba 3dee0c7
feat(dialog): 音声ライブラリ利用規約ダイアログの表示機能を追加
Hiroshiba fb8e4f7
feat(ui): 音声ライブラリ利用規約確認アクションを追加
Hiroshiba ec74738
feat(ui): 利用規約確認アクションの戻り値を変更し、TermConfirmedAudioKeyの配列を返すように修正
Hiroshiba 517251b
[update snapshots]
Hiroshiba 87ff470
(スナップショットを更新)
github-actions[bot] cfd6a17
feat(store): 利用規約確認ダイアログ表示機能を追加し、未確認キャラクターの処理を実装
Hiroshiba 3512d21
Update src/store/audio.ts
Hiroshiba a28fac5
fix(ui): トーク音声書き出し完了通知の取得方法を修正
Hiroshiba d5ae1f5
Apply suggestion from @Hiroshiba
Hiroshiba 539c7cf
Merge remote-tracking branch 'origin/3つの関数を1つに共通化する' into 3つの関数を1つに共通化する
Hiroshiba e0578a0
test: 極端に長いURLを表示するストーリーを追加 [update snapshots]
Hiroshiba a6ca0ff
(スナップショットを更新)
github-actions[bot] d111ec1
fix: 極端に長いURLが折り返されるようにする [update snapshots]
Hiroshiba 430a43e
(スナップショットを更新)
github-actions[bot] 715e527
Merge branch 'main' into 3つの関数を1つに共通化する
Hiroshiba 85abe09
feat: sevenc-nanashiさんのレビューコメントに対応
Hiroshiba 680a498
[update snapshots]
Hiroshiba 656a2e1
(スナップショットを更新)
github-actions[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| import { userEvent, within, expect, fn } from "storybook/test"; | ||
|
|
||
| import { Meta, StoryObj } from "@storybook/vue3-vite"; | ||
| import VoiceLibraryPolicyDialog from "./VoiceLibraryPolicyDialog.vue"; | ||
| import { SpeakerId as toSpeakerId } from "@/type/preload"; | ||
| import { getPortraitUrl } from "@/mock/engineMock/characterResourceMock"; | ||
| import { uuid4 } from "@/helpers/random"; | ||
|
|
||
| const testCharacterAId = toSpeakerId(uuid4()); | ||
| const testCharacterBId = toSpeakerId(uuid4()); | ||
| const testCharacterCId = toSpeakerId(uuid4()); | ||
|
|
||
| const meta: Meta<typeof VoiceLibraryPolicyDialog> = { | ||
| component: VoiceLibraryPolicyDialog, | ||
| args: { | ||
| modelValue: false, | ||
| characterPolicyInfos: [ | ||
| { | ||
| id: testCharacterAId, | ||
| name: "テストキャラクターA", | ||
| policy: | ||
| "markdownテスト。**太字**。\\\n改行。\\\n[リンク](https://example.com)", | ||
| portraitPath: getPortraitUrl(0), | ||
| }, | ||
| { | ||
| id: testCharacterBId, | ||
| name: "テストキャラクターB", | ||
| policy: Array(50).fill("長いテキスト").join(""), | ||
| portraitPath: getPortraitUrl(1), | ||
| }, | ||
| ], | ||
| onOk: fn(), | ||
| onHide: fn(), | ||
| "onUpdate:modelValue": fn(), | ||
| }, | ||
| tags: ["!autodocs"], // ダイアログ系はautodocsのプレビューが正しく表示されないので無効化 | ||
| }; | ||
|
|
||
| export default meta; | ||
| type Story = StoryObj<typeof meta>; | ||
|
|
||
| export const Opened: Story = { | ||
| name: "開いている", | ||
| args: { | ||
| modelValue: true, | ||
| }, | ||
| }; | ||
|
|
||
| export const LongUrl: Story = { | ||
| name: "極端に長いURL", | ||
| args: { | ||
| modelValue: true, | ||
| characterPolicyInfos: [ | ||
| { | ||
| id: testCharacterCId, | ||
| name: "テストキャラクターC", | ||
| policy: | ||
| "極端に長いURLのテスト。https://example.com/very/long/path/to/some/policy/document/that/has/many/nested/directories/and/a/very/long/filename/with/query/parameters?param1=value1¶m2=value2¶m3=value3¶m4=value4¶m5=value5¶m6=value6¶m7=value7¶m8=value8¶m9=value9¶m10=value10", | ||
| portraitPath: getPortraitUrl(2), | ||
| }, | ||
| ], | ||
| }, | ||
| }; | ||
|
|
||
| export const Ok: Story = { | ||
| name: "確認ボタンを押す", | ||
| args: { ...Opened.args }, | ||
| play: async ({ args }) => { | ||
| const canvas = within(document.body); // ダイアログなので例外的にdocument.bodyを使う | ||
|
|
||
| const button = canvas.getByRole("button", { name: /確認して続行/ }); | ||
| await userEvent.click(button); | ||
|
|
||
| await expect(args["onOk"]).toBeCalledWith([ | ||
| testCharacterAId, | ||
| testCharacterBId, | ||
| ]); | ||
| }, | ||
| }; | ||
|
|
||
| export const Cancel: Story = { | ||
| name: "キャンセルボタンを押す", | ||
| args: { ...Opened.args }, | ||
| play: async ({ args }) => { | ||
| const canvas = within(document.body); // ダイアログなので例外的にdocument.bodyを使う | ||
|
|
||
| const button = canvas.getByRole("button", { name: /キャンセル/ }); | ||
| await userEvent.click(button); | ||
|
|
||
| await expect(args["onHide"]).toBeCalledWith(); | ||
| }, | ||
| }; | ||
|
|
||
| export const Closed: Story = { | ||
| name: "閉じている", | ||
| tags: ["skip-screenshot"], | ||
| }; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.