Skip to content

quick-file-edit - Add the icon to the file tree sidebar - #10092

Merged
fregante merged 4 commits into
refined-github:mainfrom
exaltedo2:quick-file-edit-sidebar
Sep 19, 2026
Merged

fregante merged 4 commits into
refined-github:mainfrom
exaltedo2:quick-file-edit-sidebar

Conversation

@exaltedo2

Copy link
Copy Markdown
Contributor

Closes #10088

The sidebar file tree is a Primer TreeView and shares no markup with the
directory listing. Its rows aren't links, so the path comes from the item's ID,
and directories are skipped because only they are expandable.

Those icons aren't color-fg-muted, so they took the link color once wrapped.
The CSS keeps their original color and accents only the pencil.

The sidebar also appears on file pages, so isSingleFile is now included.

Tested with npm test.

Test URLs

The sidebar is only rendered above ~1012px of viewport width.

Screenshot

record record2

I used AI to help write the code. I tested it in the browser myself and I understand the change.

@github-actions github-actions Bot added the bug label Sep 17, 2026
Comment thread source/features/quick-file-edit.tsx Resolved
Comment thread source/features/quick-file-edit.tsx Resolved
}

function linkifySidebarIcon(fileIcon: Element): void {
// The sidebar items aren't links, but their ID holds the path

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.

aren't links

FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I went looking for a href for a while before giving up on it.

@fregante fregante mentioned this pull request Sep 18, 2026
1 task done

@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.

@fregante fregante added enhancement and removed bug labels Sep 18, 2026
@exaltedo2

Copy link
Copy Markdown
Contributor Author

No duplicates in either case.
Material Icons for GitHub works fine: it keeps the original svg and just sets a
background image on it, so the pencil shows in both the sidebar and the directory
listing.
GitHub File Icons replaces the icon with <span class="icon octicon-file ts-icon medium-blue">,
so there's no svg or img left and neither directoryListingFileIcon nor the
sidebar selector matches. No pencil anywhere, same as on main.

Either way, the sidebar ends up behaving like the directory listing in all three cases.
Happy to look into restoring File Icons support in a separate PR if you want.

@fregante
fregante merged commit 6caee71 into refined-github:main Sep 19, 2026
14 checks passed
@fregante

fregante commented Sep 19, 2026 •

Copy link
Copy Markdown
Member

It's all good, I just wanted to make sure we don't cause duplicate icons.

Thanks for working on this!

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.

quick-file-edit missing from sidebar

2 participants