-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: allows an admin_css: tuple
in RTEConfig
for a list of CSS files only to be loaded into the admin for the editor
#49
Conversation
…iles only to be loaded into the admin for the editor
Reviewer's Guide by SourceryThis pull request introduces the ability to specify CSS files to be loaded only in the admin interface for the text editor. It adds a new Sequence diagram for CSS loading in admin interfacesequenceDiagram
participant Admin as Admin Interface
participant Widget as TextEditorWidget
participant Config as RTEConfig
Admin->>Widget: Request widget rendering
Widget->>Config: Get editor config
Config-->>Widget: Return config with css and admin_css
alt add_admin_css is True
Widget->>Widget: Combine regular CSS with admin CSS
end
Widget-->>Admin: Return rendered widget with combined CSS
Class diagram showing RTEConfig and TextEditorWidget changesclassDiagram
class RTEConfig {
+str name
+str config
+Iterable[str] js
+dict css
+dict admin_css
+bool inline_editing
+bool child_plugin_support
+__init__(name, config, js, css, admin_css, inline_editing, child_plugin_support)
}
class TextEditorWidget {
+bool add_admin_css
+media()
+__init__(configuration, action_token, revert_on_cancel, body_css_classes, add_admin_css)
}
note for RTEConfig "Added admin_css parameter"
note for TextEditorWidget "Added add_admin_css flag"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
admin_css: tuple
in RTEConfig
for a list of CSS f…admin_css: tuple
in RTEConfig
for a list of CSS files only to be loaded into the admin for the editor
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: all looks good
- 🟢 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.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #49 +/- ##
==========================================
+ Coverage 81.20% 81.22% +0.02%
==========================================
Files 17 17
Lines 931 932 +1
Branches 104 104
==========================================
+ Hits 756 757 +1
Misses 132 132
Partials 43 43 ☔ View full report in Codecov by Sentry. |
@sourcery-ai review |
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: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 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.
…iles only to be loaded into the admin for the editor
Summary by Sourcery
New Features:
admin_css
tuple toRTEConfig
to specify CSS files to be loaded only in the admin interface.