-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Add a maxsize check for filetree resize… #13026
Conversation
@ficristo I'm surprised this issue wasn't fixed long ago. Thanks for putting up a PR. Your code works as advertised. LGTM. @lucaslouca Brings up a good point in PR #10456:
You can hit this case even when sidebar is less than 100%. I was going to try out this code, but the remote branch seems to have been deleted, so I'm not sure if it actually fixes that case. Do you want to try to fix that in this PR? If not, this is worth merging anyway. |
With the new commit, it should take care of the window resize. |
@ficristo Nice. Works great. I have a minor suggestion, but feel free to merge PR as is. When window size is reduced, you enforce that leftSidebar.width is <= window.width - rightSidebar.width. Why don't you also apply the 80% to that calculation? This will maintain the same behavior as when dragging leftSidebar with. |
That only happens if there are enough files in WorkingSet to require scrollbars. That line is the shadow at bottom of WorkingSetView. The editor view is not getting refreshed. |
Triggering the |
@ficristo I think triggering those events is the correct fix, although |
I've added the call to |
return !$.isNumeric(value) && value.indexOf('%') > -1; | ||
} | ||
|
||
function _percetageToPixels(value, total) { |
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.
Your typo is percetageToPixels
-> percentageToPixels
. Also in all the function calls.
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.
Thank you for noticing! Fixed.
…s a percentage value
LGTM |
… and now it is possible to pass a percentage value.
It replaces #9122 and #12829
This fixes #6822, I'm sorry to take a starter bug but I thought it was open long enough that's time to fix it.
@redmunds could you review?