This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Yes, this fixes the problem. But,
Resizer
module used to set 100 as the default minimum size -- not sure when or why that changed.It seems like a more complete solution would be to change Resizer.js line 166 from:
to
@peterflynn Since you commented on the bug, I'll ask you: can you think of any case that this would not be desirable?
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.
@redmunds I agree,
seems to be safer but I believe that
is a more general design. Furthermore, if the default value is 100 it is not posible to hide elements by dragging (e.g. the side panel) because:
So I think the default value should be 0.
(I'm new here and want to learn so I am open to any solution)
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.
Good catch! I think the default should be 100, but any panel should be able to override this with 0 (although dragging size to 0 is not a good way to hide panel as is shown in the bug), so this should be:
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.
I agree, but isn't it better to use DEFAULT_MIN_SIZE instead of a hard coded integer? (see comment below: src/utils/Resizer.js:167)
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.
Now that default panel height is 100, it's no longer necessary to pass 100 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.
Correct, but if we don't pass 100 as an argument here we shouldn't do that on the error panel (https://github.com/adobe/brackets/blob/master/src/language/CodeInspection.js#L387) nor the find-replace-panel (https://github.com/adobe/brackets/blob/master/src/search/FindReplace.js#L627) to keep consistency?
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's ok to leave it in, it's just not "necessary". I don't think it's worth updating that other code.