Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Improved ContextualBalloon to deal with an async Views. #201

Merged
merged 6 commits into from
Apr 12, 2017
Merged

Improved ContextualBalloon to deal with an async Views. #201

merged 6 commits into from
Apr 12, 2017

Conversation

oskarwrobel
Copy link
Contributor

@oskarwrobel oskarwrobel commented Apr 11, 2017

Suggested merge commit message (convention)

Other: Improved ContextualBalloon to deal with an async Views. Closes ckeditor/ckeditor5#5340.


Related: ckeditor/ckeditor5-link#104

@oskarwrobel oskarwrobel requested a review from oleq April 11, 2017 11:44
@oskarwrobel
Copy link
Contributor Author

Please do not merge after review because Link plugin needs to be aligned to this changes.

this.view.content.add( view );
this.view.attachTo( this._getBalloonPosition() );
return this.view.content.add( view ).then( () => {
this.view.attachTo( this._getBalloonPosition() );
Copy link
Contributor Author

@oskarwrobel oskarwrobel Apr 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still logs errors on the browser console in synchronous tests because this.view.attachTo is called in the next event loop even when given view is ready.

@oleq
Copy link
Member

oleq commented Apr 12, 2017

this.editor.ui.view.body.add( this.view ); in init() also returns a Promise.

@oleq
Copy link
Member

oleq commented Apr 12, 2017

Extra: this._stack.clear() should be called in destroy() to improve GC.

@oleq
Copy link
Member

oleq commented Apr 12, 2017

Shouldn't contextualballoon.js be in panel/balloon/? It's all about the BalloonPanelView after all.

@oskarwrobel
Copy link
Contributor Author

Fixed.

@oleq oleq merged commit 09067aa into master Apr 12, 2017
@oleq oleq deleted the t/200 branch April 20, 2017 16:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improved ContextualBalloon to deal with async views
2 participants