This repository has been archived by the owner on Jun 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
View refactoring #1296
Merged
View refactoring #1296
Conversation
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
…riter is passed as parameter to conversion methods.
…is now protected.
pjasiun
reviewed
Feb 14, 2018
src/view/view.js
Outdated
|
||
this._ongoingChange = false; | ||
|
||
this.document.fire( 'change' ); |
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.
As we talk, I am not sure about the order here. change
event is fired after the rendering, what can be a surprise for someone. I think that rendering should be the result of the change
event (listener with the low
priority). Also both change
and render
should be inside _ongoingChange
block, so there will be no infinite loop if one adds some more changes. Also if view.change
block is open after the rendering, in the change
event, an exception should be thrown.
…ated render event on view controller. Updated tests.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Suggested merge commit message (convention)
Other: Refactoring of the view API. Closes ckeditor/ckeditor5#4222.
BREAKING CHANGE:
view.Writer
is no longer an object literal with functions but a class.BREAKING CHANGE: View controller
view.View
is introduced. Changes to the view document tree structure should be done by using writer provided to callback inview.change()
method.BREAKING CHANGE: View document is now separated from the DOM.
view.Renderer
,view.DomConverter
and observers are moved toview.View
.BREAKING CHANGE:
view#event:render
is introduced to indicate a moment when all changes are applied and document may be rendered to the DOM.BREAKING CHANGE: Downcast converter helpers no longer accepts view elements instances as constructors are now protected. Callbacks using view writer should be used.
Additional information
Main CKEditor 5 repo contains ckeditor5-engine/1210 branch which have modified
mgit.json
with other changed repositories on correct branches.