-
Notifications
You must be signed in to change notification settings - Fork 119
Improve performance of placing placeholder #390
Conversation
Can someone merge this? Dragging tabs is really slow and annoying. |
@Ben3eeE I believe I fixed the placeholder-not-disappearing issue you were experiencing. The |
Amazing 😍
Huh, I'm sure I didn't add anything when opening this. I must have been really confused if I did 😀 Edit: It is part of the original PR? https://github.com/atom/tree-view/pull/525/files#diff-22e094e871c347ed2946550500ecec83R56 On master doing ☝️ doesn't remove the placeholder. |
Ah you're right, I was only looking at the one comment's patch by accident. |
I did the same thing and was confused why I had added the extra case 😀 |
☝️ fixes most issues but I just encountered another one that I'm working on fixing. |
Looks like the resize handle is causing a dragleave event to be fired before the drag goes outside the tab bar since it's ~8px wide. What I would give for an event that fires when the element goes outside the area where the event handler is. |
Any progress on this? It's been excruciating moving tabs around.
Something like |
Ooh, that looks like it has potential. Thanks! |
@50Wliu I should've read more into your actual problem. It looks like you need to use |
@@ -284,24 +285,33 @@ class TabBarView | |||
false | |||
|
|||
onDragLeave: (event) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to do event.stopPropagation()
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dragLeave is uncancelable.
I have a hunch that the |
Any news on this? The sluggish drag and drop of tabs is extremely annoying. (in my case, the delay is about 5-10 seconds so my editor gets frozen for that amount of time!) |
@zinkkrysty No news. This is still blocked #390 (comment) |
Bump - this seems like a pretty high-profile issue (and makes Atom look bad when it comes to performance). Is there an issue that doesn't require an Electron upgrade? It sounds like that would be several months out :( |
Ok, I think this should work. Requires at least Atom 1.27.0-dev-c5dea46ac or higher. |
@50Wliu LGTM |
Oh my god, this problem was triggering me in so many levels and for so long... @Ben3eeE THANK YOU! |
@amilner42 same here. I'm experiencing this slowness on Quitting then opening in safe mode, the slowness goes away. Quitting from safe mode, then opening normally, the slowness is still gone. So maybe the problem worsens the longer Atom is open? |
Since atom/tree-view#525 is using code from the tabs package for placing the placeholder stealing the ideas from @BinaryMuse in atom/tree-view#525 (comment) seems to also work for tabs when there are many tabs open.
Before:
After:
To note is that the placeholder doesn't get removed when leaving the tab bar because of the change in the onDragLeave event also stolen from the tree-view PR.
Which is strange when dragging tabs to other panes: