Repository navigation
quick-file-edit - Add the icon to the file tree sidebar - #10092
Conversation
| } | ||
|
|
||
| function linkifySidebarIcon(fileIcon: Element): void { | ||
| // The sidebar items aren't links, but their ID holds the path |
There was a problem hiding this comment.
aren't links
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
There was a problem hiding this comment.
Yeah, I went looking for a href for a while before giving up on it.
fregante
left a comment
There was a problem hiding this comment.
The irony of "Edit" being a real link but "View" being a button :(
Can you also verify that this doesn't happen?
Using https://github.com/homerchen19/github-file-icons and https://github.com/material-extensions/material-icons-browser-extension
|
No duplicates in either case. Either way, the sidebar ends up behaving like the directory listing in all three cases. |
|
It's all good, I just wanted to make sure we don't cause duplicate icons. Thanks for working on this! |
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
isSingleFileis now included.Tested with
npm test.Test URLs
The sidebar is only rendered above ~1012px of viewport width.
Screenshot
I used AI to help write the code. I tested it in the browser myself and I understand the change.