Thanks to visit codestin.com
Credit goes to github.com

Skip to content

extensible-nav - New feature - #9554

Merged
fregante merged 10 commits into
mainfrom
extensible-nav
May 21, 2026
Merged

extensible-nav - New feature#9554
fregante merged 10 commits into
mainfrom
extensible-nav

Conversation

@fregante

@fregante fregante commented May 21, 2026

Copy link
Copy Markdown
Member

GitHub still ships the old UnderlineNav style, but here it is just in case they delete it in the future: https://gist.github.com/fregante/a718156c4187e42879a2033222394868 (the gist also includes the static HTML)

Current status

The .UnderlineNav class natively overflows, but we could already immediately consider wrapping the items on multiple lines instead.

Current page is preserved:

selected

Tasks

  • Add icons
  • Avoid race condition on slow connections
  • Actually remove the native nav after successful duplication
  • Listen to "active page" change

Comment thread source/features/extensible-nav.tsx
},
{
"id": "extensible-nav",
"description": "This is a core feature that enables other Refined GitHub features to extend or modify the repository navigation bar.",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The name is intentionally generic because this will eventually also apply to user/org profiles

Comment thread source/features/extensible-nav.tsx Outdated
Comment thread source/features/extensible-nav.tsx
Comment thread source/features/extensible-nav.tsx Outdated
@fregante
fregante marked this pull request as ready for review May 21, 2026 16:09

@fregante fregante left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Let's merge this and test it out for a while before the next release.

Comment on lines +2 to +3
/* TODO: Remove before shipping. Temporary indicator of successful replacement */
border-left: 1px solid var(--borderColor-muted, fuchsia);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm going to leave this small border in until just before release. The navs are so similar it's hard to tell if extensible-nav is working at all unless the More dropdown appears.

@fregante
fregante merged commit a4be9e7 into main May 21, 2026
14 checks passed
@fregante
fregante deleted the extensible-nav branch May 21, 2026 16:13
@Vangelis66

Vangelis66 commented May 21, 2026

Copy link
Copy Markdown

With this new feature enabled, a userstyle (Github Compact style) I've been using for ages becomes (mostly) broken 😞 ...

Before PR 9554/with new feature disabled:

extnavOFF

(this is the intended look of the userstyle)

After PR 9554 + new feature enabled (the default setting):

extnavON

Pardon me for asking, but is this something that should be addressed by the userstyle author?
For the time being, I had to disable extensible-nav in the extension's settings, but this is not a long term solution, especially seeing that this new feature is the backbone for future, eventual, #8867 fixes ...

Thanks.

Later addition:

I had to disable extensible-nav in the extension's settings,

Actually, I'm now seeing a very weird behaviour that I can't, for the life of me, make heads or tails of it; I re-enabled the above new feature and on most repos (and their sub-pages), the userstyle works as intended, e.g. on

https://github.com/snawoot-proxies-forks/opera-proxy
https://github.com/stunndard/golangwin7patch
https://github.com/Eclipse-Community/r3dfox-old/tags

But on select repos or select repo sub-pages, the userstyle becomes broken:

https://github.com/refined-github/refined-github
https://github.com/yt-dlp/yt-dlp-master-builds/tags

What is this? Some kind of race-condition, or what? ...

@fregante

fregante commented May 22, 2026

Copy link
Copy Markdown
Member Author

Thanks for the report. Yes at this point there's no compatibility layer with other user styles. We could add some classes so that they match, but since anyone can pick any selector it's unlikely we'll match every selector of every userstyle.

As for the second part, if the userstyle works, most likely the extensible-nav feature failed to run. I'll take a look at it later. I coded the feature in way that it won't touch the native nav if finds something unexpected.

@fregante

Copy link
Copy Markdown
Member Author

Yep, it's because I did not set up the Discussions and Projects icon. It's failing as expected

Screenshot 15

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.

Feature that regenerates the repo nav menu to make it extensible

2 participants