Skip to content

highlight-non-default-base-branch - Disable on stacked PRs - #9890

Merged
fregante merged 5 commits into
refined-github:mainfrom
AbhiPanseriya:fix/pr-list-metadata-wrapping
Jul 30, 2026
Merged

fregante merged 5 commits into
refined-github:mainfrom
AbhiPanseriya:fix/pr-list-metadata-wrapping

Conversation

@AbhiPanseriya

@AbhiPanseriya AbhiPanseriya commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Test URLs

https://github.com/carousell/rgh-stacked-pr-sandbox/pulls?q=sort%3Aupdated-desc+is%3Apr+state%3Aopen+

Screenshot

without refined github it looks like this
image

before the fix when refined github is enabled
image

after the fix
image

@github-actions github-actions Bot added the bug label Jul 27, 2026
@github-actions github-actions Bot changed the title fix: make PR list to render the stacked PR correctly Make PR list to render the stacked PR correctly Jul 27, 2026
…m squeezing

GitHub's legacy issue-row metadata line is a `nowrap` flex container whose
children shrink. Appending the base-branch badge overflows it, so every item
shrinks below its intrinsic width and breaks mid-phrase: the stacked-PR
counter, the review state, the update time and the badge each split over two
lines.

Let the line wrap and keep its items at their intrinsic width instead.
@AbhiPanseriya
AbhiPanseriya force-pushed the fix/pr-list-metadata-wrapping branch from 0a3bee3 to 3e10d85 Compare July 27, 2026 18:12
@github-actions

Copy link
Copy Markdown

Please avoid force-pushing to this PR. It makes it harder for reviewers to track what changed since the last review.

Just push new commits on top of the branch instead — PRs are squashed on merge, so the commit history doesn't need to be clean.

@fregante

fregante commented Jul 28, 2026 •

Copy link
Copy Markdown
Member

What does it look like without Refined GitHub? What feature is causing this issue, if any?

Also test URLs are required or else I can't verify the problem nor the fix

@@ -0,0 +1,12 @@
.js-issue-row:has(.rgh-base-branch) .d-flex.text-small.color-fg-muted {

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.

I don’t think it's Refined GitHub doing this, so the code should be self-contained in github-bugs.css, not touch unrelated JS features.

It seems that this rule is avoiding the whole PR row just because this feature has run on it, which seems like a weird exclusion.

@AbhiPanseriya

Copy link
Copy Markdown
Contributor Author

What does it look like without Refined GitHub? What feature is causing this issue, if any?

Also test URLs are required or else I can't verify the problem nor the fix

I've updated the description, for the test url I can't share my private repo, let me create one public repo where we can test this one.

@fregante

fregante commented Jul 28, 2026 •

Copy link
Copy Markdown
Member

Thank you for the screenshot! This has been a recurring problem in the PR list, it seems that their new widget + highlight-non-default-base-branch trigger it.

Since you're using stacked PRs, I wonder if it makes sense to just hide the branch in this case instead. As the name suggests, highlight-non-default-base-branch aims at highlighting that the PR isn't "direct to main". The "stacked PR" indicator already does that.

For example:

  for (const link of prLinks) {
+   if (elementExists('that stacked PR icon'))
+     continue

and later:

+ if (prs.length === 0) 
+   return

@AbhiPanseriya

Copy link
Copy Markdown
Contributor Author

Thank you for the screenshot! This has been a recurring problem in the PR list, it seems that their new widget + highlight-non-default-base-branch trigger it.

Since you're using stacked PRs, I wonder if it makes sense to just hide the branch in this case instead. As the name suggests, highlight-non-default-base-branch aims at highlighting that the PR isn't "direct to main". The "stacked PR" indicator already does that.

For example:

  for (const link of prLinks) {
+   if (elementExists('that stacked PR icon'))
+     continue

I see, yeah it makes sense, let me work on it and hide it, thanks so much for clarity

@fregante fregante changed the title Make PR list to render the stacked PR correctly highlight-non-default-base-branch - Disabled on stacked PRs Jul 28, 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.

purrfect

This PR has been catproved

@fregante fregante changed the title highlight-non-default-base-branch - Disabled on stacked PRs highlight-non-default-base-branch - Disable on stacked PRs Jul 28, 2026
@AbhiPanseriya AbhiPanseriya changed the title highlight-non-default-base-branch - Disable on stacked PRs highlight-non-default-base-branch - Skip stacked PRs Jul 28, 2026
@AbhiPanseriya AbhiPanseriya changed the title highlight-non-default-base-branch - Skip stacked PRs highlight-non-default-base-branch - Disable on stacked PRs Jul 28, 2026
@github-actions github-actions Bot changed the title highlight-non-default-base-branch - Disable on stacked PRs highlight-non-default-base-branch - Disable on stacked PRs Jul 28, 2026
@AbhiPanseriya

Copy link
Copy Markdown
Contributor Author

purrfect

This PR has been catproved

let me also create a test repo to test first

@AbhiPanseriya

AbhiPanseriya commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor Author

@fregante have updated the description and screenshot, added a test link, I've tested myself, you can try testing it from your side (you need to zoom a bit since there is no CI checks on the PR, layout is breaking at 175% zoom for me on 14 inch screen)

@AbhiPanseriya

Copy link
Copy Markdown
Contributor Author

@fregante can we merge this one if it looks good?

@fregante

Copy link
Copy Markdown
Member

A new release isn't coming for a while, so I'll leave this open to give an opportunity for others to disagree

AbhiPanseriya and others added 2 commits July 30, 2026 15:13
Addresses review comment on refined-github#9890: the sandbox used to verify the
stacked-PR fix should be linked so it can be retested later.
@fregante
fregante enabled auto-merge (squash) July 30, 2026 10:11
@fregante
fregante merged commit 6359f63 into refined-github:main Jul 30, 2026
13 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