paulpflug / foldername-tabs

Adds foldernames to tabs..
MIT License
16 stars 6 forks source link

Tabs reset to standard look once you drag & drop (reorder) a tab #4

Closed bbhh closed 8 years ago

bbhh commented 9 years ago

The tabs look great, but once I drag and drop a tab to reorder my tabs, the tab look and feel resets to the standard look and feel. So, if a tab had a two-line display with folder on top and file on bottom, once I drag it, it becomes a one-liner like "filename - folder", or "filename" if no folder is needed to be displayed.

Great package, thanks for creating this! It looks especially nice with the Seti theme.

paulpflug commented 9 years ago

Thanks for reporting :+1: I appreciate your praise :smile:

I stumbled upon this already, but I think atom's API doesn't fire on reorder events. The workspace is ordered in panes which, them self have paneItems and what I see there are only creating and destroying events So currently there is no way of knowing when to redraw. you could create a Issue at the atom repository and request such events (they should exist really)

Once I can I will fix it..

jerone commented 8 years ago

Any update on this issue? The pinned-tabs package seems to activate the same issue as described here.

paulpflug commented 8 years ago

finally found a way :smile: should work in 0.1.7 (if it doesn't feel free to reopen)

jerone commented 8 years ago

Can't confirm this being fixed :disappointed: When reordering tabs the original state returns. No errors in the console.

However, when I close another tab, the reset-ed tab gets converted to foldername tab again. Almost there :smile:

Atom 1.5.0-beta1 Foldername Tabs 0.1.7 Material UI theme 0.8.1

jerone commented 8 years ago

Looking at Atom's tab code again I see no easy solution to hook into this.

One direction that might be interesting to try out is using a MutationObserver on the tab-bar...

paulpflug commented 8 years ago

Ok now I understand. I only looked on drag and drop between panes, this works now. But within one pane it doesn't...

paulpflug commented 8 years ago

there is a hook onDidMoveItem should work in 0.1.8 :smile:

jerone commented 8 years ago

That's awesome. Testing it now...

Edit: Confirmed working!

Ps. Would be great if you can update the changelog.