material-extensions / material-icons-browser-extension

Browser Addon that enhances file browsers of version controls with material icons.
MIT License
499 stars 38 forks source link

Fix conflict with Refined GitHub #66

Closed fregante closed 1 year ago

fregante commented 1 year ago

2

Testable on:

Subfolders weren't affected:

Claudiohbsantos commented 1 year ago

Thank you for looking into this and proposing a solution! This works great. Removing the css override left a small bug where folder icons in the tree view of the new code view would appear duplicated after clicked QHqtdagvb0

I think the trivial solution for now is to replace only those icons when they follow the replaced icon. It's a bit of a bandaid fix but it should allow us to get this in asap. I'll just commit those changes as a follow up.

Thanks for the other refactors as well, much appreciated

fregante commented 1 year ago

Good to see this merged. Your comment made me figure out why the CSS “wasn’t working” in this case:

then quick-file-edit runs:

then quick-file-edit sees .old again:

If you have alternative solutions to the current patch let me know. I improved the compatibility further in https://github.com/refined-github/refined-github/pull/6627

I’m wondering if you really need a new element, I’m thinking you can apply the new icon as a background of the existing SVG:

<svg class="original octicon" style="background: url(new.svg)">
  <path g="…"/>
</svg>
path {
  display: none
}
jd-solanki commented 1 year ago

is it released on chrome store?

fregante commented 1 year ago

is it released on chrome store?

Not yet. See this live badge:

csandman commented 1 year ago

I’m wondering if you really need a new element, I’m thinking you can apply the new icon as a background of the existing SVG:

This was actually what I had mentioned as a possibility in my long comment about potential solutions to the problem. It seems like it should work, I just didn't have time to try it out.

Claudiohbsantos commented 1 year ago

@fregante @csandman the background swap seems reasonable to me, and would likely make these interactions with other extensions simpler. I mostly wanted to get a fix out asap to curb the issue on both repos. Now this can be tried with no urgency :). Since this patch seems to have essentially disabled quick-file-edit in subfolders on the new code view I think it is still worth trying to improve on it.

I'm gonna be stealing that live badge by the way, pretty handy to have visibility into the released version 🙏

@jd-solanki the fix was already submitted to the chrome store, now it just has to go through the usual review process on their end. That's usually faster than a week

fregante commented 1 year ago

Since this patch seems to have essentially disabled quick-file-edit in subfolders

No that was already broken I think. It's been fixed in https://github.com/refined-github/refined-github/pull/6627, as you can see in the gifs.

I mostly wanted to get a fix out asap to curb the issue on both repos.

Same 🙌

I'm gonna be stealing that live badge by the way, pretty handy to have visibility into the released version 🙏

Feel free to steal the whole markup from here, I've been reusing it in all of my extensions:

https://github.com/refined-github/refined-github#install