This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New Resizer APIs: show, hide and toggle #1838
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Might be nice to have a setMinSize API so panels can have something different from the default.
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 Yes... I was planning to add it next, as it's required to finalize the sidebar refactor.
Panels using the
makeResizable
API can already set a minimum height. For the other ones, I was thinking of using adata-minSize
attribute in the elements.Would that be enough or do we still need an API to change the minSize at runtime? I would expect minSize to be set only during initialization...
Should I add it now, or wait to do it with the sidebar refactor final step?
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 think data-minSize is probably a better solution because it eliminates the timing of calling an API method to set it. It's ok to wait until the sidebar refactoring.
Also, I'm writing an extension that uses the bottom-panel with the resizer and I ran into the problem where I had to call makeResizable is not automatically called because extensions are not yet loaded when htmlReady() is called. I think this is fixed if you use appReady() instead. Let me know if you want me to send you a copy of the extension.
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'll be adding the
data-minSize
event in the next iteration, then.About extensions, I also hit that same issue. I think scanning the DOM on
appReady
solves it in the case the extension adds the html to the DOM onhtmlReady
but not for any others.@redmunds Please, send me a copy of your extension. I'd love to see it! I'll try to see if the Resizer module can be improved somehow to get a better workflow.