Repository navigation
clean-repo-sidebar - Restore feature - #9994
Conversation
| :is( | ||
| .BorderGrid-row:first-child h2, | ||
| [class*='SidebarSection-module__sidebarSection']:first-child > h2 | ||
| ) { |
There was a problem hiding this comment.
Most of these :is are not needed, you can just write the two selectors.
However I'd drop the old selectors now and just support the latest version instead. This means a lot of code can be deleted.
clean-repo-sidebar supports GitHub's React repository sidebarclean-repo-sidebar - Restore feature
|
Cleaned up with Claude, untested. How does it look? Also I noticed that the "report repository" link was not moved to the bottom in your screenshots. |
|
Looks good. I tested b005a8e in Firefox on YTubic, bin-dir, and yolo. Languages is hidden, the report link moves to the final section, and I saw no console warnings or errors. I replaced the stale after screenshot with one from the current build showing the report link at the bottom. |
| } | ||
|
|
||
| // Hide empty meta if it’s not editable by the current user | ||
| async function hideEmptyMeta(): Promise<void> { |
There was a problem hiding this comment.
I noticed this is gone, but we should still hide it. Is it hidden via CSS now?
You can add this to the test URLs at the bottom of the page: https://github.com/shadcn/Ant
There was a problem hiding this comment.
GitHub’s React sidebar changed this from .text-italic to a SidebarAbout-module__noDescription element. It wasn’t covered by the new CSS, so I restored the old permission-aware behavior in f07beb3. The observer removes it when the user can’t edit the repository metadata and leaves it visible for users who can. I also added shadcn/Ant to the test URLs and verified it there.
|
Thank you! |


Closes #9909
Tested in Firefox on:
GitHub's current repository sidebar uses React module classes and renders its sections asynchronously. Refined GitHub 26.8.8 still looks for
.BorderGrid-rowand.Progress-item, so the feature leaves the "About" and "Languages" headings visible and throws:This PR updates
clean-repo-sidebarfor GitHub's current sidebar. It observes each sidebar section so it handles the initial markup and React replacements without polling for optional elements.Runtime checks after React finished rendering:
Tests
Before with Refined GitHub 26.8.8
After with the current build
Console logs
The clean post-install console capture in
refined-after-console.jsonhas no sidebar selector error. Its only entries are the existingread:projecttoken scope messages, which are unrelated to this change.refined-before-console.json
refined-after-console.json