-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
chore: Move from script tags containing dom elements to template tags #8233
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
Merged
Conversation
This file contains hidden or 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
…lements (#8227) * fix: Scan plugin data after structure mode Xhr load * Fix test * fix js linting issues
Reviewer's GuideReplaces all <script>-wrapped hidden plugin templates with semantic tags, updating renderer implementations, HTML fixtures, and tests for consistency. Updated Class Diagram: Renderer Template AttributesclassDiagram
class StructureRenderer {
+placeholder_edit_template: string
}
class LegacyRenderer {
+placeholder_edit_template: string
}
File-Level Changes
|
fsbraun
commented
May 21, 2025
fsbraun
commented
May 21, 2025
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.
@fsbraun Is this ready to be reviewed? |
vinitkumar
approved these changes
May 21, 2025
fsbraun
added a commit
that referenced
this pull request
May 22, 2025
…#8233) * [5.1.0dev1 release process] Bumped version to 5.1.0dev1 * [5.1.0dev1 release process] compilemessages * [5.1.0dev1 release process] compiling new static files * [5.1.0dev1 release process] updating latest docs * Prepare new main branch * Fix typos * fix: No changes to changelog * fix: Remove unnecessary change to migration * Remove circular import * Fix import order * Re-introduce dummy `PlaceholderField` for legacy migrations * fix: Do not assume page url cache to be filled * fix: Structure board update sometimes failed to add all interactive elements (#8227) * fix: Scan plugin data after structure mode Xhr load * Fix test * fix js linting issues * fix: Update assets * fix: Empty plugin selectors in all but first placeholder * chore: Move from script tags containing dom elements to template tags * Update cms/models/fields.py * Update cms/models/fields.py --------- Co-authored-by: Github Release Action <info@django-cms.org>
4 tasks
fsbraun
added a commit
that referenced
this pull request
May 22, 2025
…#8233) (#8237) * [5.1.0dev1 release process] Bumped version to 5.1.0dev1 * [5.1.0dev1 release process] compilemessages * [5.1.0dev1 release process] compiling new static files * [5.1.0dev1 release process] updating latest docs * Prepare new main branch * Fix typos * fix: No changes to changelog * fix: Remove unnecessary change to migration * Remove circular import * Fix import order * Re-introduce dummy `PlaceholderField` for legacy migrations * fix: Do not assume page url cache to be filled * fix: Structure board update sometimes failed to add all interactive elements (#8227) * fix: Scan plugin data after structure mode Xhr load * Fix test * fix js linting issues * fix: Update assets * fix: Empty plugin selectors in all but first placeholder * chore: Move from script tags containing dom elements to template tags * Update cms/models/fields.py * Update cms/models/fields.py --------- Co-authored-by: Github Release Action <info@django-cms.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Structure mode uses
<script>
tags to enclose DOM elements to not be rendered on the screen. These should be<template>
tags.Related resources
Checklist
main
Summary by Sourcery
Replace
<script>
tags with<template>
tags for hidden plugin templates in structure mode.Enhancements:
<template>
tags instead of<script>
tags in StructureRenderer and LegacyRenderer placeholder edit templates.<template>
tags.Tests:
<template>
tags instead of<script>
tags.Summary by Sourcery
Replace script tags with HTML template tags for hidden plugin templates in structure mode to improve semantics and prevent unwanted rendering
Enhancements:
Tests: