You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's fantastic! I'm glad they copied the exact style too.
We need to be careful when removing this feature because the behaviors might be different and definitely the "non-default branch blue highlight" is missing. So at the very least we need to introduce a new non-default-branch feature or something
extract non-default-branch feature from default-branch-button;
Highlights non-default-branch, potentially CSS only, using a selector like in the hotfix
Oh got it, it doesn't work for any folder. This is most likely because folders don't exist in git and they implemented it naively. It would be good to report it to them.
Activity
fregante commentedon Sep 5, 2025
That's fantastic! I'm glad they copied the exact style too.
We need to be careful when removing this feature because the behaviors might be different and definitely the "non-default branch blue highlight" is missing. So at the very least we need to introduce a new
non-default-branchfeature or somethingfregante commentedon Sep 5, 2025
I'm not seeing it yet, can you find a selector that matches our button IF there's a native button next to it? Most likely something like:
or
depending on the final structure. I'll add a CSS hotfix to hide it for now.
FloEdelmann commentedon Sep 5, 2025
Unfortunately, it's not that easy 🥲
fregante commentedon Sep 5, 2025
Can you post the DOM of the 3 buttons?
FloEdelmann commentedon Sep 5, 2025
HTML
fregante commentedon Sep 5, 2025
Try this in your CSS field
FloEdelmann commentedon Sep 5, 2025
Yep, that works 👍🙂
25.8.27 `default-branch-button` CSS hotfix
fregante commentedon Sep 5, 2025
Hotfix sent.
Next:
default-branch-buttonnon-default-branchfeature fromdefault-branch-button;Highlights non-default-branch, potentially CSS only, using a selector like in the hotfix
default-branch-buttonI sent some feedback to GitHub as well: https://github.com/orgs/community/discussions/172354#discussioncomment-14317974
kidonng commentedon Sep 6, 2025
It seems the native one only shows in file tree and for files, i.e. RGH still offer this one next to the breadcrumb:
And folders:
1 remaining item
fregante commentedon Sep 6, 2025
So let's only do this.
I'm updating the hotfix because the selector is hiding our button (the only button) here:
25.8.27 `default-branch-button` restore button in one case
kidonng commentedon Mar 25, 2026
We now also have a native button for folders in addition to files, but somehow it's wrong about whether the folder exists or not:
Not sure if this is a bug or limitation on their side.
fregante commentedon Mar 25, 2026
Can you provide a test link? It's weird that they'd be wrong about it.
There are several ways we can go about it:
kidonng commentedon Mar 25, 2026
https://github.com/refined-github/refined-github/tree/unread-in-backgr0und/source
fregante commentedon Mar 25, 2026
Oh got it, it doesn't work for any folder. This is most likely because folders don't exist in git and they implemented it naively. It would be good to report it to them.
fregante commentedon Mar 25, 2026
How about this: we replace their button only if it's dimmed/disabled.
So the logic would look something like:
I don’t think a disabled button is ever useful, it's better to lead the user to the 404 page and there they can find more actions for the file.
This way the feature will continue to exist as an enhancement of the native button.