-
Notifications
You must be signed in to change notification settings - Fork 5
fix: Adding text-enabled plugins failed after adding first plugin #91
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
Conversation
Reviewer's GuideThis PR restores plugin form loading by renaming loadForm to loadPluginForm and unconditionally invoking processDataBridge, enhances the RTEConfig API with new options, updates tests, and bumps the package version with accompanying documentation updates. Sequence Diagram for Updated Plugin Form LoadingsequenceDiagram
participant C as CMSEditor
participant I as iframe
participant F as form
C->>I: loadPluginForm(url, ...)
activate I
I-->>C: "load" event
deactivate I
C->>F: Get form elements from iframe.contentDocument
C->>C: processDataBridge(form)
alt onSave callback provided and dataBridge available
C->>C: onSave(el, form, dataBridge)
end
Updated Class Diagram for CMSEditorclassDiagram
class CMSEditor {
<<JavaScript Class>>
+addPlugin(...)
+addPluginForm(...)
+loadPluginForm(url, iframe, el, onLoad, onSave)
+processDataBridge(form)
}
Updated Class Diagram for RTEConfigclassDiagram
class RTEConfig {
<<Python Class>>
+name: str
+config: str
+js: Iterable[str]
+css: dict
+admin_css: Iterable[str]
+inline_editing: bool
+child_plugin_support: bool
+__init__(name, config, js, css, admin_css, inline_editing, child_plugin_support)
}
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #91 +/- ##
=======================================
Coverage 81.61% 81.61%
=======================================
Files 14 14
Lines 941 941
Branches 110 110
=======================================
Hits 768 768
Misses 130 130
Partials 43 43 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Hey @fsbraun - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@@ -65,7 +65,7 @@ describe('CMSEditor', () => { | |||
const el = document.getElementById('editor1'); | |||
document.body.appendChild(iframe); | |||
|
|||
editor.loadForm('about:blank', iframe, el, () => { | |||
editor.loadPluginForm('about:blank', iframe, el, () => { |
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.
suggestion (testing): Test should cover the multi-plugin scenario described in the bug.
Please add a test that adds a plugin, then adds a second one, to verify that loadPluginForm
and processDataBridge
handle multiple plugins as described in bug #90.
This fixes #90, a regression introduced in #87
Also updates the readme, fixing #89
Summary by Sourcery
Fix plugin form loading regression after the first plugin by renaming the form loader, unconditionally processing the dataBridge, and updating tests to use the new method; enhance RTEConfig with additional configuration options.
Bug Fixes:
Enhancements:
Tests:
Summary by Sourcery
Restore and fix plugin form loading in CMSEditor, unify dataBridge processing for all plugin additions, extend RTEConfig with new options, and update related tests and documentation.
Bug Fixes:
Enhancements:
Build:
Documentation:
Tests: