ericcornelissen / pinned-tabs-for-atom

A package for the Atom text editor that allows you to pin tabs
https://atom.io/packages/pinned-tabs
MIT License
18 stars 3 forks source link

Adds weird unstyled icons to the tab bar #36

Closed bryan-havenly closed 7 years ago

bryan-havenly commented 7 years ago

I just installed this package and it added icons to my tab bar that I don't want. I went to hide them with CSS but they seem to somehow not appear in the DOM for the tabs.

screen shot 2017-08-02 at 9 09 46 am

Here's a screenshot of the inspector for the above tab

screen shot 2017-08-02 at 9 11 20 am

I'm not sure how to give reproduction steps because this happened for me by just installing pinned-tabs. I'm not using any other packages that provide tabs or icons besides the core tabs package. (Maybe it's useful to note that I don't have the file-icons package installed?) The theme I'm running is One Light, with no custom CSS at all.

bryan-havenly commented 7 years ago

Update: The icons are actually for the next tab, not the current one. I was able to hide them with this CSS:

// Disable icons from pinned tabs
.tab-bar .texteditor.tab .title:before {
  display: none;
}

I guess I can close this issue, though it seems weird that this extension would add tab icons instead of just providing the pinned tab functionality.

ericcornelissen commented 7 years ago

Thank you for reporting. And especially thanks for mentioning what theme you're running and that you don't have file-icons installed 👍

I'm glad you where able to solve this problem for yourself. Still, I'm going to try to fix the issue so it works correctly by default 🙂

bryan-havenly commented 7 years ago

Final update:

The only issue here is that file icons get added for unpinned tabs. Changing the selector for icons from .tab-bar .tab .title:before to .tab-bar .tab.pinned .title:before seems to be the solution. I'll work up a PR if I have time today.

ericcornelissen commented 7 years ago

Great! Thank you for find out what was wrong 😄