-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Moving render calls out of EditorUIView constructors #1150
Comments
Sounds like a good idea to me. I hope what we have ATM (like registering children in the constructor) is purely accidental. |
Fantastic. If theres no class depending on a views element being available in that scope and placing In a basic test on my local development environment I moved |
Sure, you're welcome! 👍 |
Internal: Ensured the `DecoupledEditorUIView` is rendered correctly and its children are added in `#render()` instead of `#constructor()` (see ckeditor/ckeditor5#1150). Huge thanks to [Alex Eckermann](https://github.com/alexeckermann) for this contribution!
Internal: Ensured the `BalloonEditorUIView` is rendered correctly and its children are added in `#render()` instead of `#constructor()` (see ckeditor/ckeditor5#1150). Huge thanks to [Alex Eckermann](https://github.com/alexeckermann) for this contribution!
Huge 👏 for your contribution, @alexeckermann! |
🍻 Cheers @oleq |
Other - Comment/Feedback
A problem arose when I was testing the alexeckermann/ckeditor5-emptyness plugin where I wanted to extend the editors view template to bind a class name to a property.
The initial implementation passed with the
ClassicEditor
as the test case. However, when subsequently integrated into a project using aBalloonEditor
it hit a wall because the plugin couldn't call to extend a template that was already rendered.In debugging I came across an inconsistency which explained why the classic editor passed and why the balloon editor didn't. The classic editor does not call any methods in its
constructor
that render theInlineEditableUIView
instance. That, theClassicEditorUIView
defers calls to add a child view until its ownrender
is called.BalloonEditorUIView
,InlineEditorUIView
, andDecoupledEditorUIView
all callregisterChild
with theInlineEditableUIView
in their constructor.Is it possible that any child view (or specifically editable views) rendering is moved to
render
and not called in scope ofconstructor
?I suspect there may be some wider ramifications of such a change I may not be aware of, so I'm raising it for comment/feedback.
The text was updated successfully, but these errors were encountered: