-
Notifications
You must be signed in to change notification settings - Fork 141
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!: FloatAreaのresponseMessage属性の型を実装に合わせて調整する #5299
base: master
Are you sure you want to change the base?
Conversation
commit: |
}), | ||
[style, zIndex], | ||
) | ||
const styleAttr = useMemo(() => ({ ...style, zIndex }), [style, zIndex]) |
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.
object化して再展開していますが、内部に属性がstyleのみだったため、あまり意味がありませんでした。
style={hoge} 形式で指定させることにして調整しました
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.
zIndex は効いてなかった?
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.
↑、あそういう意味ではなくて、設定する属性はstyle属性のみで { style: hoge }
のようなオブジェクトでmemo化する意味が薄い、という話でした。
もともとの処理としては {...styleProps}
の ような方法で
- 中身のキーは一つなので混乱するだけで意味が薄い
- オブジェクトの展開分コストが無駄
という感じです。
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.
> | ||
<Cluster gap={1}> | ||
{tertiaryButton} | ||
<div className="shr-ms-auto"> | ||
<Cluster gap={1} align="center"> | ||
{(responseMessage?.status === 'success' || responseMessage?.status === 'error') && ( |
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.
statusがsuccess, errorのもののみに絞っていますが
- processingなresponseMessageが表示されない
- 理由もわからない
という感じなのでそもそも型として受け取れないように調整しました
これにより、チェックロジックもシンプルに変更できます
}), | ||
[style, zIndex], | ||
) | ||
const styleAttr = useMemo(() => ({ ...style, zIndex }), [style, zIndex]) |
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.
zIndex は効いてなかった?
…e-refactoring-FloatArea
関連URL
概要
変更内容
確認方法