Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delta transformation: move delta normalization to delta classes #4102

Closed
scofalik opened this issue Jul 5, 2017 · 1 comment
Closed

Delta transformation: move delta normalization to delta classes #4102

scofalik opened this issue Jul 5, 2017 · 1 comment
Labels
package:engine resolution:invalid This issue is invalid (e.g. reports a non-existent bug or a by-design behavior). type:improvement This issue reports a possible enhancement of an existing feature.

Comments

@scofalik
Copy link
Contributor

scofalik commented Jul 5, 2017

(Follow-up to ckeditor/ckeditor5-engine#977)

In ckeditor/ckeditor5-engine#977 I introduced "deltas normalization". To keep things simple and speed up work on the PR, I put it in one big function getNormalizedDeltas that takes DeltaClass (class object) and operations array and basing on this, the function generates proper deltas. Inside the function there is a big switch that checks what is the DeltaClass.

This solution has one big weakness -- it is impossible to extend it from outside. Of course the other weakness being that it is natural that this code be placed in static methods of delta classes (especially since the function is just a big switch block).

Hence, I propose to split this function and move the code to the deltas.

@scofalik
Copy link
Contributor Author

Since we will change deltas to operations, this issue will be invalid.

@mlewand mlewand transferred this issue from ckeditor/ckeditor5-engine Oct 9, 2019
@mlewand mlewand added module:model resolution:invalid This issue is invalid (e.g. reports a non-existent bug or a by-design behavior). type:improvement This issue reports a possible enhancement of an existing feature. package:engine labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:engine resolution:invalid This issue is invalid (e.g. reports a non-existent bug or a by-design behavior). type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
Development

No branches or pull requests

2 participants