-
Notifications
You must be signed in to change notification settings - Fork 10
fix: Updated CMS_Editor selector to handle tabular and stacked inlines #134
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
base: main
Are you sure you want to change the base?
fix: Updated CMS_Editor selector to handle tabular and stacked inlines #134
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRefines the CMS editor's inline admin selector to properly target tabular and stacked inlines, ensures empty form templates are detected correctly, and updates admin_selector assignment to prevent double initialization. Flow diagram for updated inline admin selector logicflowchart TD
A["DOMContentLoaded event"] --> B["Check for empty form templates"]
B -->|If found| C["Update _admin_selector to refined _inline_admin_selector"]
B -->|If not found| D["Keep _admin_selector as default"]
C --> E["Call initAll()"]
D --> E
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #134 +/- ##
==========================================
- Coverage 81.61% 79.39% -2.23%
==========================================
Files 14 14
Lines 941 956 +15
Branches 110 111 +1
==========================================
- Hits 768 759 -9
- Misses 130 150 +20
- Partials 43 47 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@h-peters Thanks for this PR. Can you first clarify the issue? How do these changes solve it? Can you check out the integration tests run specifically to ensure that adding inline fields works? Those seem to start to fail with this PR (on some combinations). |
|
@fsbraun Of course. Sorry, this is my first PR 😃. If you use In my change i use I hope this makes it clearer. As for the integration tests, I can’t quite figure out why some of them are failing. I ran them locally and they were successful. Do you have any idea? |
This PR updates the _inline_admin_selector to handle both tabular and stacked inlines. Otherwise empty form rows for stacked inlines will not be found and the editor will be initialized twice.
Summary by Sourcery
Fix inline editor initialization by refining selectors to handle both tabular and stacked inlines and exclude empty templates
Bug Fixes: