Repository navigation
pr-filters - Support the new React PR list - #10156
Conversation
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
left a comment
There was a problem hiding this comment.
This amount of code is most certainly never acceptable. If a smaller solution isn't possible then the feature will remain broken
|
I think it's best to focus on issues tagged
small
|
|
@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? |
|
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 😅 |
|
Thanks for the review. I have cut this down:
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. |
|
Thanks, all four inline comments are addressed in 2cb96c2 (I replied in each thread). CI is green. The diff is now One note: the new links are real |
fregante
left a comment
There was a problem hiding this comment.
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:
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)
|
Thanks! In c97f55b:
About the missing divider: I'd leave it. It looks slightly odd, but it keeps the change small. |
|
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. |
Test URLs
Screenshot