Skip to content
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

Merged

Conversation

maeshinshin
Copy link
Contributor

Task

#141636: サイドバー「最新の変更」の三点リーダー内ドロップダウンのトグル押下後の挙動の修正
#145347 実装

Demo

demo

@maeshinshin maeshinshin changed the title Imprv: behavior of dropdown toggle in 'Recent Changes' sidebar imprv: behavior of dropdown toggle in 'Recent Changes' sidebar May 1, 2024
else {
setDropdownOpen(prevState => !prevState);
}
}, []);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

react 的プログラムではなく pure js っぽい解になってしまっている

Copy link
Contributor Author

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}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isOpen を制御するのなら Uncontrolled ではないコンポーネントを使うべきなのでは?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

変更しました。

@maeshinshin maeshinshin force-pushed the imprv/141636-145347-sidebar-recent-changes-dropdown-toggle branch from 0cfca97 to e4d7d87 Compare May 7, 2024 01:32
@maeshinshin maeshinshin force-pushed the imprv/141636-145347-sidebar-recent-changes-dropdown-toggle branch from e4d7d87 to 22c1244 Compare May 8, 2024 08:11
<UncontrolledButtonDropdown className="me-1">
<DropdownToggle color="transparent" className="p-0 border-0">
<div className="me-1">
<Button
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これはあえて reactstrap 由来のコンポーネントを使っている?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修正しました。

Copy link

reg-suit bot commented May 8, 2024

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.

@yuki-takei yuki-takei merged commit 051d6be into master May 8, 2024
20 of 24 checks passed
@yuki-takei yuki-takei deleted the imprv/141636-145347-sidebar-recent-changes-dropdown-toggle branch May 8, 2024 12:02
@github-actions github-actions bot mentioned this pull request May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants