-
Notifications
You must be signed in to change notification settings - Fork 52
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
Expose API notifying about loaded CKEDITOR namespace #150
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
bdad264
Replcae namespaceloaded with integrations-common
sculpt0r 1686af8
Rename onLoaded event
sculpt0r a7a8afc
Replace getNamespace in test, removed old
sculpt0r df731f8
Removed failing test
sculpt0r cab3da3
Destructing onNamespaceLoaded
sculpt0r 1d72d6c
Remove editor CDN from tests
sculpt0r f274aa3
Removes redudant tests & add tests for getNamespace
sculpt0r d1f951d
Add manual/sample test for onNamespaceLoaded
sculpt0r 9dc2ac8
ESlint autofix for samples/main.js
sculpt0r d4ad585
Added package-lock.json.
jacekbogdanski 27da252
Added changelog entry.
jacekbogdanski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
This file was deleted.
Oops, something went wrong.
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
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.
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'm wondering if we should still keep
onBeforeLoad
. It seems to be not documented anywhere, on the other side we already see that someone could be using it: #129 (comment)It would be good to keep API consistent with what we have in Vue and Angular, also this callback may create unexpected results described in #129 (comment)
Not sure if we should go with a deprecation message or just get rid of it and target this PR into a major release. @Comandeer do you have any thoughts on that issue?
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.
In Color nrmalizer we add
@deprecated
even if PR targeting major release.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.
Founded: #47. Seems that the initial driver for adding
onBeforeLoad
callback is in contradiction with #129 (comment)So we have
onBeforeLoad
- per instance call nadonNamespaceLoaded
- call before all instances loaded and it's called once.To me: those are two different behaviours which, however, may lead to confusion if used improperly. So maybe good documentation may help here? So I would stay with both callbacks and eventually mark
onBeforeLoad
with@deprecated
if we would like to keep API consistent with others integrations.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.
One note about deprecating stuff and versions - in CKEditor 4 we don't really follow semver - we have only
minor
andmajor
releases there. CKEditor 4minor
is really apatch
in semver nomenclature (bug fixes only) while CKEditor 4major
isminor
in semver (new features). As forsemver
major
which means breaking changes we really avoid such in CKEditor 4.So according to semver (which we follow here), getting rid of
onBeforeLoad
entirely means breaking changes and it should be introduced inmajor
. While deprecating stuff should be done inminor
.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.
Thanks for checking this out @sculpt0r. Looks like we have 2 problems: this property has been added by the community, so we can expect it's used and it has not been documented by us.
Let's keep it, for now, I will create a separate ticket for documentation and we will decide later what to do with duplicated logic. I would be for adding information to docs that "it's recommended to use
onNamespaceLoaded
andonBeforeLoad
is deprecated or could be a "subject of deprecation", but it's something worth discussing when writing docs.