Skip to content

pr-filters - Support the new React PR list - #10156

Merged
fregante merged 5 commits into
refined-github:mainfrom
rasmusbe:pr-filters-react-pr-list
Oct 15, 2026
Merged

fregante merged 5 commits into
refined-github:mainfrom
rasmusbe:pr-filters-react-pr-list

Conversation

@rasmusbe

Copy link
Copy Markdown
Contributor

Add the draft filter to the Reviews menu and the Checks filter as a popover next to the filters, since the React filters cannot be cloned.

@fregante fregante left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This amount of code is most certainly never acceptable. If a smaller solution isn't possible then the feature will remain broken

@fregante

Copy link
Copy Markdown
Member

I think it's best to focus on issues tagged small Issues that new contributors can pick up rather than jump on complex features

@fregante
fregante marked this pull request as draft September 30, 2026 09:26
@rasmusbe

Copy link
Copy Markdown
Contributor Author

@fregante The original feature was already large (it cloned whole dropdowns), and the new React menus can't be cloned, so the replacement has to build its own UI. I can cut it down by putting the Checks filter as a group inside the Reviews menu instead of a separate popover, which removes most of the CSS. Would that size be acceptable, or should this stay closed until GitHub finishes the rollout?

@rasmusbe
rasmusbe requested a review from fregante September 30, 2026 09:39
@fregante

fregante commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Instead of recreating the popup via CSS, would you be able to just clone an existing popup? I think this is not possible since they're not rendered until open.

Adding them to a random other dropdown isn't reasonable. I'd lean more towards removing the Checks dropdown altogether.

Also let's drop the "draft PRs" separator in this version.

I see a lot of code to review (and change) so if you want to continue with this PR you'll have to expect a number of reviews still 😅

@rasmusbe

rasmusbe commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review. I have cut this down:

  • Removed the Checks dropdown
  • Removed the separator/heading
  • Removed the CSS file, so no popover code is left

What remains is adding the two draft options to the existing Reviews menu in the React list, by cloning one of its items when the menu opens. The diff is now one file, +47/−2.

@rasmusbe
rasmusbe marked this pull request as ready for review October 1, 2026 07:17
Comment thread source/features/pr-filters.tsx Resolved
Comment thread source/features/pr-filters.tsx Resolved
Comment thread source/features/pr-filters.tsx Resolved
Comment thread source/features/pr-filters.tsx Resolved
@rasmusbe

rasmusbe commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, all four inline comments are addressed in 2cb96c2 (I replied in each thread). CI is green.

The diff is now pr-filters.tsx only: +50/−2, no CSS. The Checks dropdown and the draft heading are removed, and the two draft options are cloned into the existing Reviews menu when it opens.

One note: the new links are real <a href>, but GitHub navigates without a reload and leaves the menu open, so I kept a small onClick that sends Escape to close it. Happy to drop it if you'd rather live with the open menu.

@rasmusbe
rasmusbe requested a review from fregante October 1, 2026 08:06
@fregante fregante added the bug label Oct 1, 2026

@fregante fregante left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good! Much more reasonable. We just need to update the readme description for the feature.

One drawback of removing the divider is that this becomes strange to see since it exposes we're reusing a dropdown for a different purpose:

Image

Not a big deal. What do you think?

One problem I see is this however, I think you replace the wrong item with a link because now the external item can still be selected (in addition to the Anchor) but it cannot be acted upon (no Enter)

Image

@rasmusbe

rasmusbe commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks! In c97f55b:

  • The link is now the menu item itself (role="menuitemradio" on the <a>), so there is one focus stop per option and Enter follows the link
  • The readme description now only mentions the Draft PR filter, since Checks only exists in the old list

About the missing divider: I'd leave it. It looks slightly odd, but it keeps the change small.

@fregante

Copy link
Copy Markdown
Member

Sorry for the delay! One issue is that the items cannot be selected with Space. I'm not sure if it just needs a minor dom update or if we must include a custom event listener for that.

Anyway it's a minor issue, you can address it separately if you'd like. The PR already works so I'll merge it.

@fregante
fregante merged commit faab4e8 into refined-github:main Oct 15, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants