-
Notifications
You must be signed in to change notification settings - Fork 0
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
フィールド上のメッセージのUI #33
フィールド上のメッセージのUI #33
Conversation
ikura-hamu
commented
Jan 22, 2025
- ✨ メッセージアイコンを準備
- ✨ メッセージコンポーネント
- 💄 tailwindの色をpixi用にtypescriptに持ってくる
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.
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
client/src/pixi/theme.ts:21
- Ensure that the keys in the themeColors object are correctly mapped from the Tailwind config to avoid potential typos.
backgroundPrimary: colors["background-primary"],
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.
ザッとみて気になったとこだけ
useEffect(() => { | ||
if (!showMessage) return; | ||
if (textRef.current) { | ||
const { width, height } = textRef.current; | ||
setBubbleSize({ | ||
width: width + 20, | ||
height: height + 20, | ||
}); | ||
} | ||
}, [showMessage]); |
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.
余裕なかったらこのままでいいけど、setShowMessage
をラップして、setShowMessage(true)
するときにsetBubbleSize
するのがよさそう
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.
これshowMessage=falseのときtextRef.currentがnullなのでできなさそうです
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.
たしかに