-
Notifications
You must be signed in to change notification settings - Fork 309
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
ソング:歌詞の一括入力を追加 #1952
ソング:歌詞の一括入力を追加 #1952
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
概ね良さそうでした!!! きれいな実装だと思います!
このPRの内容は実は以前課題があるよねと議論していたものだったので、そこは別で議論できればと思います 🙏
#1815 (comment)
(たぶんこの機能とUXのままマージできる・・・かも?)
Co-Authored-By: Hiroshiba <Hiroshiba@users.noreply.github.com>
Co-Authored-By: Hiroshiba <Hiroshiba@users.noreply.github.com>
Co-Authored-By: Hiroshiba <Hiroshiba@users.noreply.github.com>
Co-Authored-By: Hiroshiba <Hiroshiba@users.noreply.github.com>
Co-Authored-By: Hiroshiba <Hiroshiba@users.noreply.github.com>
レビューを反映しました。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
もうほぼ lgtm です!!
シンプルでいいコードだと思いました!
ちょっといくつかめちゃくちゃ細かい提案をしています。
もしよかったら!
Co-Authored-By: Hiroshiba <Hiroshiba@users.noreply.github.com>
レビューを反映しました。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!!
const onNoteLyricInput = (text: string, note: Note) => { | ||
splitAndUpdatePreview(text, note); | ||
}; | ||
|
||
const onNoteLyricBlur = () => { | ||
commitPreviewLyrics(); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ちなみにreactではemit側をon〜、引数指定側をhandle〜にしてたりします。
https://ja.react.dev/learn/responding-to-events#adding-event-handlers
ややこしくなったらそういうルールにしても良さそう。
反映しました。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
直ったと思います。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ちょっと挙動に問題がないか自信がないので、リファクタリングをお願いできると・・・・・ 🙇
これで良い感じになったはず? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!!
ちょっとこちらでいくつか変更させていただきます!
if (lastMatchEnd < text.length) { | ||
moraAndNonMoras.push(text.substring(lastMatchEnd)); | ||
} | ||
if (moraAndNonMoras.length > maxLength) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
こっちもついでにコメント書いてあげようかなと
if (moraAndNonMoras.length > maxLength) { | |
// 指定した最大要素数より多い場合は配列を削る | |
if (moraAndNonMoras.length > maxLength) { |
src/store/utility.ts
Outdated
export const convertKanaToHira = (text: string): string => { | ||
return text.replace(/[\u30A1-\u30F4]/g, (s) => { | ||
return String.fromCharCode(s.charCodeAt(0) - 0x60); | ||
}); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これ不要になりましたね
内容
タイトル通り。
関連 Issue
スクリーンショット・動画など
multi-mora.mp4
その他
モーラ分割とかの都合上長音対応も入ってます。