-
Notifications
You must be signed in to change notification settings - Fork 480
fix(Rules): Migrate Portlet UI to PrimeNG 21 and Angular 21 #34313
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
fix(Rules): Migrate Portlet UI to PrimeNG 21 and Angular 21 #34313
Conversation
Remove legacy components replaced by PrimeNG equivalents: - dot-autocomplete-tags, dot-unlicense - Custom dropdown, input-date, and restdropdown - Legacy modal-dialog and push-publish dialogs - Old rule-engine components - Deprecated directives (dot-autofocus) - Karma config and tslint files Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
… use primeng Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
Semgrep found 1 Risk: Affected versions of next are vulnerable to Dependency on Vulnerable Third-Party Component / Deserialization of Untrusted Data / Uncontrolled Resource Consumption. A flaw in Next.js's App Router deserialization allows an attacker to send a specially crafted HTTP request body that, when parsed by the server, triggers excessive CPU work or an infinite loop. By targeting any App Router endpoint with this malicious payload, the server process can hang and become unresponsive, resulting in a denial-of-service. Fix: Upgrade this library to at least version 14.2.34 at core/core-web/package-lock.json:47304. Reference(s): GHSA-mwv6-3258-q52c If this is a critical or high severity finding, please also link this issue in the #security channel in Slack. Semgrep found 1 Risk: Affected versions of next are vulnerable to Dependency on Vulnerable Third-Party Component / Deserialization of Untrusted Data / Uncontrolled Resource Consumption. An attacker can send a specially crafted HTTP request to any Server Function endpoint (as used by Next.js' App Router) that, when deserialized by the React Server Components runtime, enters an infinite loop—hanging the server process, exhausting CPU, and resulting in a denial-of-service. Fix: Upgrade this library to at least version 14.2.35 at core/core-web/package-lock.json:47304. Reference(s): GHSA-5j59-xgg2-r9c4, CVE-2025-67779 If this is a critical or high severity finding, please also link this issue in the #security channel in Slack. Semgrep found 1 Risk: Affected versions of storybook are vulnerable to Exposure of Sensitive Information to an Unauthorized Actor / Inclusion of Sensitive Information in an Include File / Insertion of Sensitive Information into Externally-Accessible File or Directory. A bug in Storybook's build process causes any environment variables defined in a Fix: Upgrade this library to at least version 8.6.15 at core/core-web/package-lock.json:60093. Reference(s): GHSA-8452-54wp-rmv6, CVE-2025-68429 If this is a critical or high severity finding, please also link this issue in the #security channel in Slack. Semgrep found 1 Risk: Affected versions of @angular/compiler are vulnerable to Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'). A stored XSS vulnerability in the Angular Template Compiler arises because its internal security schema doesn't classify certain URL‐ holding attributes (e.g. xlink:href, math|href, annotation|href) or the Manual Review Advice: A vulnerability from this advisory is reachable if you allow Fix: Upgrade this library to at least version 19.2.17 at core/core-web/package-lock.json:34712. Reference(s): GHSA-v4hv-rgfq-gp49, CVE-2025-66412 If this is a critical or high severity finding, please also link this issue in the #security channel in Slack. Semgrep found 1 Risk: http-cache-semantics versions before 4.1.1 are vulnerable to Inefficient Regular Expression Complexity leading to Denial of Service. The issue can be exploited via malicious request header values sent to a server, when that server reads the cache policy from the request using this library. Fix: Upgrade this library to at least version 4.1.1 at core/core-web/package-lock.json:50435. Reference(s): GHSA-rc47-6667-2j5j, CVE-2022-25881 If this is a critical or high severity finding, please also link this issue in the #security channel in Slack. |
Legal RiskThe following dependencies were released under a license that RecommendationWhile merging is not directly blocked, it's best to pause and consider what it means to use this license before continuing. If you are unsure, reach out to your security team or Semgrep admin to address this issue. GPL-2.0 MPL-2.0
|
…rtlet-ui-to-primeng-angular-21
- Moved dot-area-picker-dialog from google-map/ to components/ directory - Moved dot-serverside-condition from condition-types/ to components/ directory - Added proper TypeScript type annotations (UnitKey, ComparisonOption) - Fixed RxJS subscribe calls to use object notation instead of deprecated multi-param syntax - Added center_changed event listener for Google Maps circle - Improved type safety throughout visitors-location and rule-engine components - Added eslint-disable comments for pre-existing type issues in legacy code Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Replace all Angular Material layout attributes (flex, layout, layout-align, layout-fill) with Tailwind CSS utility classes across 7 HTML files - Remove angular-material.layouts.scss (11,000+ lines of legacy styles) - Rename remaining cw-* CSS classes to dot-rules-* in action component - Fix UI not updating when deleting rule actions (add refreshRules() call)
|
Meticulous was unable to execute a test run for this PR because the most recent commit is associated with multiple PRs. To execute a test run, please try pushing up a new commit that is only associated with this PR. Last updated for commit f502cbf. This comment will update as new commits are pushed. |
…ze event types - Remove ViewEncapsulation.None and monolithic rule-engine.scss - Create component-specific SCSS files for each component - Use shared SASS variables (spacing, colors, fonts) from dotcms-scss - Convert px values to rem for consistency - Use PrimeNG button props (severity, rounded, text) instead of custom classes - Centralize event types in rule-event.model.ts - Align condition/action layouts with consistent widths - Fix AND/OR toggle alignment in condition groups
- Created detailed architecture documentation for Rules Engine portlet - Added component glossary with purpose and usage for each component - Documented complete data flow from user actions to API calls - Included debugging guides for common issues (UI not updating, date pickers, etc.) - Added practical examples for extending the portlet (new input types, rule properties) - Provided learning path for new developers (Day 1-3 progression) - Documented emergency debugging techniques and common pitfalls - Added file index and quick reference sections The guide is specifically tailored for frontend developers who are unfamiliar with the Rules Engine, providing a "map through the wasteland" with focus on: - Data flow and state management - Component responsibilities and interactions - Change detection patterns (signals + OnPush + refreshRules()) - Dynamic input generation system - Event bubbling architecture Also reorganized geolocation and rule-engine components into proper subdirectories: - features/conditions/geolocation/ → dialog/, visitors-location/container/ - features/rule-engine/ → container/ for separation of concerns Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Move comprehensive developer's survival guide from DOT-RULES-ARCHITECTURE.md to README.md for better discoverability. Developers typically check README.md first, making this the more appropriate location for the architecture documentation. The guide includes: - Component hierarchy and glossary - Complete data flow diagrams - Data model references - Common development tasks with examples - Debugging guides and troubleshooting - Learning path for new developers - Emergency debugging techniques - File index and quick reference Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…rtlet-ui-to-primeng-angular-21
…rtlet-ui-to-primeng-angular-21
|
Semgrep found 11
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 21.0.7 at core/core-web/package-lock.json:5082. 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. |
🎯 Issue 34251: Migrate Rules Portlet UI to PrimeNG 21 / Angular 21
📊 Migration Summary
Total Scope:
🧹 Phase 1: Codebase Cleanup (Commits 1-2)
Removed Deprecated Components & Legacy Code
🏗️ Phase 2: Rules Portlet Modernization (Commits 3-12)
Complete Architectural Restructure
Before: Scattered files in
condition-types/,custom-types/,google-map/, rootAfter: Clear feature hierarchy with domain-driven organization + container pattern
Key Technical Improvements
1. Testing Infrastructure Migration
2. TypeScript Type Safety Overhaul
3. Modern RxJS Patterns
4. Tailwind CSS Migration (11,095 lines removed!)
5. Enhanced Google Maps Integration
6. UI Bug Fixes
refreshRules()call)7. Component Organization & Separation of Concerns
📚 Phase 3: Comprehensive Documentation (Commit 13)
Frontend Developer's Survival Guide
Updated:
README.md- A complete guide for navigating the Rules EngineWhat's Included:
Key Sections:
Why This Matters:
The Rules Engine was previously the "god-forbidden portlet" that nobody wanted to touch. This documentation provides:
refreshRules())📦 Deliverables
New Files Created
jest.config.ts- Modern Jest configurationfeatures/*/container/- Separated state management componentsfeatures/conditions/geolocation/dialog/- Map picker dialogfeatures/conditions/geolocation/visitors-location/- Location input componentsservices/models/input.model.ts- Centralized input models (257 lines)entry/dot-rules.component.ts- New entry point componentFiles Removed (Legacy Code)
angular-material.layouts.scss- 11,095 lines of unused stylesComponent Reorganization
🧪 Testing Checklist
Core Functionality
Code Quality
nx lint dot-rules # Should pass with documented eslint-disable comments🎨 Visual & UX Changes
Layout Migration
Component Organization
Styling Standards
🚨 Breaking Changes
None! 🎉
🎯 Success Criteria
Functional Requirements
Technical Requirements
Documentation Requirements
📚 Related
Parent Epic: #33882 - PrimeNG 21 Migration
Base Branch:
issue-33882-primeng-update(contains infrastructure: Esbuild, Tailwind, PrimeNG 21)Tracking Issue: #34251
🎨 Angular 21 • PrimeNG 21 • Tailwind CSS • Jest
Rules Engine: Fully Modernized & Documented ✨
-9,781 lines of legacy code removed • Feature-based architecture • Type-safe domain models • Comprehensive developer guide
This PR fixes: #34251