-
Notifications
You must be signed in to change notification settings - Fork 18
Conversation
…named addChildren(), removeChildren() -> registerChildren(), deregisterChildren().
…te#children (ViewCollection->Array). Implemented Template#getViews() generator.
…oring in View and Template classes.
…in the component to wrap it in a single #element.
src/iframe/iframeview.js
Outdated
|
||
return new Promise( ( resolve, reject ) => { | ||
deferred = { resolve, reject }; | ||
} ); |
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.
Why not just
render() {
return new Promise( resolve => {
this.on( 'loaded', resolve );
super.render();
} ) ;
}
?
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.
If tests are passing, I think it is the right way to render an IframeView
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 meant: you're probably right 😋
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 works fine but I think we don't need to resolve this promise outside of the promise scope. deferred
variable doesn't have too much sense here. But it's a detail :)
It's worth to mention about |
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.
Tests works 👌 (manual and unit). The code looks good as well. I've only found a few some really minor issues.
FYI: I've just pushed the fixes to the branches. |
Suggested merge commit message (convention)
Other: Implemented
View#render
method which replaces the#element
rendering upon the first reference and incorporates the#init
method functionality. Closes ckeditor/ckeditor5#5384. Closes ckeditor/ckeditor5#5403.From now on
View#setTemplate
andView#extendTemplate
methods are recommended as a shorthand forview.template = new Template( { ... } )
andTemplate.extend( view.template )
.BREAKING CHANGE: The
init()
method in various UI components has been renamed torender()
. Please refer to the documentation to learn more.BREAKING CHANGE: The
View#element
is no longer a getter which renders an element when first referenced. Use theView#render()
method instead.BREAKING CHANGE:
Template#children
property became anArray
(previouslyViewCollection
).BREAKING CHANGE:
View#addChildren
andView#removeChildren
methods became#registerChildren
and#deregisterChildren
.BREAKING CHANGE: The DOM structure of the
StickyPanelView
has changed along with the class names. Please refer to the component documentation to learn more.Additional information
This PR comes with a branch constellation centralized in https://github.com/ckeditor/ckeditor5/tree/t/ckeditor5-ui/262:
Merge commit message for related branches:
Misc
ContextualBalloon
for a while.