-
Notifications
You must be signed in to change notification settings - Fork 219
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
imprv: User group link in admin page #8855
Conversation
|
<span className="text-decoration-underline">{group.name}</span> | ||
{(hoveredIndex === index) && (<span className="material-symbols-outlined px-2 py-0">edit</span> | ||
)} | ||
</button> |
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.
DOM 構造について
DOM 構造的に Link の中に button があるのは違和感。
親コンテナの中に Link と button を子供として並列に入れて、
親コンテナに対する hover で button の表示・非表示をコントロールしたらいいと思う。
PageCreateButton あたりが参考になるはず。
ステート管理について
index を保持するのはあまりスマートではないので、ここは切り出して別コンポーネントにしよう。
このファイル内に定義してしまって構わない。
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.
これが考慮されていないと思う。
以下を別コンポーネントに切り出して index を props で渡す、という実装になるんじゃないかな。
<button
className="btn btn-link btn-edit-groups text-secondary py-0"
type="button"
key={group._id}
>
<span className="material-symbols-outlined pe-2 pt-2">group</span>
<span className="text-decoration-underline">{group.name}</span>
<span className={`material-symbols-outlined px-2 py-0 ${hovereditem === item ? '' : 'opacity-0'}`}>edit</span>
</button>
reg-suit detected visual differences. Check this report, and review them. 🔴🔴🔴🔴🔴🔴🔴🔴 🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵 What do the circles mean?The number of circles represent the number of changed images.🔴 : Changed items, ⚪ : New items, ⚫ : Deleted items, and 🔵 Passed items How can I change the check status?If reviewers approve this PR, the reg context status will be green automatically. |
TASK
https://redmine.weseek.co.jp/issues/140677
┗https://redmine.weseek.co.jp/issues/145630
修正前
修正後
修正後ホバー時