-
Notifications
You must be signed in to change notification settings - Fork 480
Enhance OG preview and text count components #34314
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
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.
Pull request overview
This pull request enhances the Open Graph preview and text count components for dotCMS's content editor by introducing a new text counter for the legacy editor and improving the OG preview fallback behavior.
Changes:
- Added a routing template (
text_count.vtl) that conditionally loads either the new or old text counter based on edit mode - Created new text counter implementations for both new (
text_count_new.vtl) and legacy (text-count_old.vtl) editors with live character counting and color feedback - Updated OG preview to show a placeholder image when no image is set (
og_preview_new.vtl) - Added text color styling to the OG preview for better readability (
og_preview_old.vtl)
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| text_count.vtl | Router template that conditionally includes the appropriate text counter based on edit mode |
| text_count_new.vtl | New text counter implementation using modern DotCustomFieldApi with module script |
| text-count_old.vtl | Legacy text counter implementation using legacy DotCustomFieldApi methods |
| og_preview_new.vtl | Updated to use external placeholder image when no OG image is set |
| og_preview_old.vtl | Added color styling to the preview host element |
dotCMS/src/main/webapp/WEB-INF/velocity/static/htmlpage_assets/text_count.vtl
Show resolved
Hide resolved
dotCMS/src/main/webapp/WEB-INF/velocity/static/htmlpage_assets/og_preview_new.vtl
Show resolved
Hide resolved
dotCMS/src/main/webapp/WEB-INF/velocity/static/htmlpage_assets/og_preview_old.vtl
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ith naming conventions.
|
Semgrep found 6
Risk: Affected versions of @angular/compiler and @angular/core are vulnerable to Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'). Angular's template compiler fails to classify the Fix: Upgrade this library to at least version 20.3.16 at core/core-web/yarn.lock:512. Reference(s): GHSA-jrmj-c5cx-3cw6, CVE-2026-22610 If this is a critical or high severity finding, please also link this issue in the #security channel in Slack. |
This pull request updates the Open Graph preview and text count components to improve user experience and maintain consistency across legacy and new edit modes. It introduces a new text counter for the old editor, ensures fallback images for OG previews, and applies minor style enhancements.
Text Counter Improvements:
text-count_old.vtl).text_count.vtl).Open Graph Preview Enhancements:
og_preview_new.vtl).og_preview_old.vtl).This PR fixes: #34029
This PR fixes: #34029