-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Conversation
Check search panel visibility to adjust jslint mouse drag position
- Removed old comments
…t-panel-resize Conflicts: src/language/JSLintUtils.js src/search/FindInFiles.js
Thanks for submitting this code. We have an internal milestone that we're trying to hit this week, so I might not get to reviewing this code until next week. |
This is cool, but I'm seeing a couple problems with this on Win7. I posted a pic here: https://twitter.com/randyedmunds/status/250976078926077952/photo/1 (Let me know if the resolution got messed up and I can e-mail the pic). Notice in the upper (JSLint) panel that after increasing the height of the panel, I still see the same number of lines of JSLint errors displayed (with a vertical scrollbar). The number of lines viewed should be increased to fill the height of the panel. Notice the lower (Find in Files) panel that the number of lines are increased with the height, but on the lower end of the scrollbar, the down-arrow button is mostly off the screen. |
…gins Fixed missing toolbar.outerHeight() in _setHeight for jsLint
Hi! I think I messed up the jslint results panel resize when doing some cleaning before the pull request... fixed now :) About the other issue, scrollbars on Mac are somehow subtler so this was harder to spot than on windows. I was using |
Excellent. Both of the problems mentioned above are fixed. I am noticing another problem with releasing mouse capture. Do this:
Results: JSLint panel height starts decreasing as if mouse button was never released, so it seems to still have the capture. Expected: Obviously, releasing the mouse should stop the drag, but I'm not sure if I like how the entire editor can be covered up. I am wondering if enforcing a minimum height on the editor will fix both problems? |
@@ -50,5 +50,6 @@ | |||
|
|||
@z-index-brackets-sidebar-resizer: @z-index-brackets-ui + 2; | |||
@z-index-brackets-resizer-div: @z-index-brackets-sidebar-resizer + 1; | |||
@z-index-brackets-bottom-resizer: @z-index-brackets-ui + 2; |
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.
@z-index-brackets-bottm-panel-resizer would be more accurate.
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.
will fix...
I basically thought of this as a temporary fix while getting a crack at the tabbed panel solution discussed in https://groups.google.com/forum/?fromgroups=#!topic/brackets-dev/PqEbuhw7k6c. I feel, that would be the best way to go. We should of course improve this if it is to be made part of Brackets in the meantime. About the behavior you saw, I think it only happens when you release the mouse outside the Brackets window (also over the app toolbar). It also happens for the FiFs panel. I'll try to fix this later today. About enforcing a minimum height for the editor, I did try it, but it didn't convince me at all. There are lots of issues to be addressed for that: 1. Dependencies between panels We'd need to check the height of all visible panels to get the available space. I didn't want to create any dependencies between panels. Having a 2. Resizing the window
If we start resizing the whole window... what should happen when the minimum height for the editor is reached? Should the panel shrink to leave place for the editor?
If we start resizing the whole window, when reaching the minimum height for the editor, should the panels shrink? Should all panels shrink in the same proportion? Ones more than others? 3. Resizing the panels If we start resizing a panel and the maximum height for all panels is reached, should we stop all resizing or should other panels give height away for or it? 4. Opening panels If we try to open a panel and there is not enough space for the saved height of the panel, should we set it to the maximum available height? What if no space at all is left? I think solving all these issues may be a lot of work that could be better spent on the tabbed panel solution if that is the final goal. I'm willing to work in both directions in any case, so just point at what should we do, please :) |
This resizing code will still be needed if the tabbed interface is implemented. Enforcing a minimum height on the editor is just a suggestion for a possible solution, but it's not required. I does not seem to be worth the effort. But, the mouse not releasing the capture needs to be solved. Can the "dragleave" event be used to release the mouse at the point when mouse exits window? |
I think I'll check and fix this and refactor the resize as suggested. |
I've created a a new It scans the DOM on The process creates a promise that the resizable modules can use to get notifications of the resizing process using the Known Issues
|
Excellent! This is much better. Now that the high-level design is in place, I'm going to do one last review of the code details. |
@@ -23,7 +23,7 @@ | |||
|
|||
|
|||
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ | |||
/*global define, $, brackets, JSLINT, PathUtils */ | |||
/*global define, $, JSLINT, PathUtils, document, window */ |
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.
It looks like both document and window are no longer used and can be removed
@@ -0,0 +1,200 @@ | |||
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ |
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.
Copy the Adobe copyright header comment from any other .js file and paste it at the top.
Done with review. |
…t-panel-resize Conflicts: src/brackets.js src/language/JSLintUtils.js src/search/FindInFiles.js
@jbalsas I see you pushed some changes since my last comment, so I am just checking to see where we're at with this one. I want to get this change into master so I can use it! Also, there are conflicts with master, so you'll need to merge the latest changes to master to this branch. Thanks. |
@redmunds Yes, I added your final suggestions the other day in London (@peterflynn helped me with those ;)) Please, tell me if there's anything left to add. I'll merge the changes to master later tonight. |
…t-panel-resize Conflicts: src/search/FindInFiles.js
@jbalsas Glad I asked :) Please post a comment with @redmunds when passing something back so I don't wait unnecessarily. This looks good. 2 very minor other changes:
|
@redmunds Done and done ;) |
Looks good. Thanks for sticking with this one! Merging. |
This pull request provides a possible fix for issue #1122.
It adds resize functionality for the two existing bottom panels ("jslint errors" and "find in files").
Knwon issues
This issues could be solved but it will require to introduce some dependencies between panels or dom elements and betwen panels and the toolbar element.