-
Notifications
You must be signed in to change notification settings - Fork 217
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: behavior of dropdown toggle in 'Recent Changes' sidebar #8782
imprv: behavior of dropdown toggle in 'Recent Changes' sidebar #8782
Conversation
else { | ||
setDropdownOpen(prevState => !prevState); | ||
} | ||
}, []); |
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 的プログラムではなく pure js っぽい解になってしまっている
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.
以下をもとに、reactstrap ではなく、react bootstrap を利用した実装に変更しました。
https://getbootstrap.jp/docs/5.3/components/dropdowns/#%e8%87%aa%e5%8b%95%e3%81%a7%e9%96%89%e3%81%98%e3%82%8b
@@ -182,12 +192,12 @@ export const RecentChangesHeader = ({ | |||
<> | |||
<SidebarHeaderReloadButton onClick={() => mutate()} /> | |||
|
|||
<UncontrolledButtonDropdown className="me-1"> | |||
<UncontrolledButtonDropdown className="me-1" isOpen={dropdownOpen} toggle={handleDropdownToggle}> |
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.
isOpen を制御するのなら Uncontrolled ではないコンポーネントを使うべきなのでは?)
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.
変更しました。
0cfca97
to
e4d7d87
Compare
…n in RecentChangesSubstance.tsx
e4d7d87
to
22c1244
Compare
<UncontrolledButtonDropdown className="me-1"> | ||
<DropdownToggle color="transparent" className="p-0 border-0"> | ||
<div className="me-1"> | ||
<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.
これはあえて reactstrap 由来のコンポーネントを使っている?
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.
修正しました。
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
#141636: サイドバー「最新の変更」の三点リーダー内ドロップダウンのトグル押下後の挙動の修正
┗ #145347 実装
Demo