Skip to content

Conversation

@adrianjm-dotCMS
Copy link
Contributor

@adrianjm-dotCMS adrianjm-dotCMS commented Jan 21, 2026

Summary

Migrated the Content Types portlet UI to PrimeNG + Angular 21 standalone patterns so it aligns with the modern DotCMS UI while keeping behavior intact.

Scope

  • Updated listing and editor screens to PrimeNG components and styling.
  • Refined layout/spacing/typography to match the modern UI.
  • Migrated shared editor subcomponents to Angular 21 patterns.
  • Preserved existing functionality for listing, create/edit flows, field management, and dialogs.

Areas Updated

  • Content Types listing (/content-types-angular)
  • Create content type (/content-types-angular/create/:type)
  • Edit content type (/content-types-angular/edit/:id)
  • Shared editor module under apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/

Acceptance

  • UI consistent with PrimeNG look & feel
  • No functional regressions
  • Modern Angular 21 component patterns applied

Tests

Targeted specs executed.

DEMO:

Screen.Recording.2026-01-22.at.2.37.43.PM.mov

Copy link
Contributor

Copilot AI left a 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 PR migrates the content-types portlet from legacy PrimeNG components to newer versions, modernizes styling from SCSS to Tailwind CSS, and updates tests to work with the new component APIs.

Changes:

  • Migrates PrimeNG components (p-dropdown → p-select, p-tabview → p-tabs, p-dialog updates)
  • Replaces custom dot-icon component with Material Icons throughout
  • Converts SCSS stylesheets to Tailwind CSS utility classes
  • Updates tests with proper mocks (matchMedia), fakeAsync timing, and new component selectors

Reviewed changes

Copilot reviewed 68 out of 69 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
yarn.lock Cleanup of unused wildcard dependencies
dot-link.component.html Changed icon element from <i> to <span>
dot-copy-button.component.ts Added missing p-button class to button
dot-listing-data-table/* Updated to TableLazyLoadEvent type, added ChangeDetectorRef usage
dot-base-type-selector/* Migrated from p-dropdown to p-select with SelectChangeEvent
dot-page-selector/* Removed unused SCSS file, migrated styles to Tailwind
content-types-listing/* Added ChangeDetectorRef, migrated to p-dialog, updated tests
content-types-edit/* Removed SCSS files, migrated to p-dialog and p-tabs, fixed test timing
content-types-layout/* Replaced dot-icon with Material Icons, migrated to Tailwind, updated toolbar
content-types-form/* Removed SCSS, migrated banner styles to Tailwind
content-type-fields/* Extensive migration of field components, rows, tabs to Tailwind classes
dot-binary-settings/* Removed SCSS, migrated input styling
dot-block-editor-settings.spec.ts Restructured tests with proper mock setup

@semgrep-code-dotcms-test
Copy link

Semgrep found 25 ssc-4fd3a3fc-acff-4277-9d88-60469f5a4fa5 findings:

  • core-web/apps/dotcms-ui/src/app/view/components/_common/dot-page-selector/dot-page-selector.component.ts
  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-listing/dot-content-types.component.ts
  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/dot-content-types-edit.component.ts
  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/dot-content-types-edit.component.spec.ts
  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/layout/content-types-layout.component.ts
  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/form/content-types-form.component.ts
  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/dot-content-type-fields-variables/dot-content-type-fields-variables.component.ts
  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-types-fields-list/content-types-fields-list.component.ts
  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-tab/content-type-fields-tab.component.ts
  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-row/content-type-fields-row.component.ts
  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties/values-property/values-property.component.ts
  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties/render-mode-property/render-mode-property.component.ts
  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties/regex-check-property/regex-check-property.component.ts
  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties/name-property/name-property.component.ts
  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties/dot-relationships-property/dot-relationships-property.component.ts
  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties/dot-relationships-property/dot-new-relationships/dot-new-relationships.component.ts
  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties/dot-relationships-property/dot-cardinality-selector/dot-cardinality-selector.component.ts
  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/content-type-fields-properties-form.component.ts
  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/content-type-fields-properties-form.component.spec.ts
  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-drop-zone/content-type-fields-drop-zone.component.ts
  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-field-dragabble-item/content-type-field-dragabble-item.component.ts
  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/dot-convert-wysiwyg-to-block/dot-convert-wysiwyg-to-block.component.ts
  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/dot-convert-to-block-info/dot-convert-to-block-info.component.ts
  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/dot-binary-settings/dot-binary-settings.component.ts

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 href and xlink:href attributes on SVG <script> elements as Resource URL contexts. This allows an attacker to bind a malicious data: URI or external script via [attr.href] or [attr.xlink:href], resulting in arbitrary JavaScript execution (XSS) in the victim's browser.

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.

@semgrep-code-dotcms-test
Copy link

Legal Risk

The following dependencies were released under a license that
has been flagged by your organization for consideration.

Recommendation

While 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

@adrianjm-dotCMS adrianjm-dotCMS self-assigned this Jan 22, 2026
Comment on lines 19 to 25
@Component({
selector: 'dot-key-value-table-header-row',
styleUrls: ['./dot-key-value-table-header-row.component.scss'],
templateUrl: './dot-key-value-table-header-row.component.html',
host: { class: 'contents' },
imports: [
ButtonModule,
ToggleSwitchModule,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

High severity and reachable issue identified in your code:
Line 19 has a vulnerable usage of @angular/compiler, introducing a high severity vulnerability.

ℹ️ Why this is reachable

A reachable issue is a real security risk because your project actually executes the vulnerable code. This issue is reachable because your code uses a certain version of @angular/compiler.
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 href and xlink:href attributes on SVG <script> elements as Resource URL contexts. This allows an attacker to bind a malicious data: URI or external script via [attr.href] or [attr.xlink:href], resulting in arbitrary JavaScript execution (XSS) in the victim's browser.

References: GHSA, CVE

To resolve this comment:
Upgrade this dependency to at least version 21.0.7 at core-web/package-lock.json.

💬 Ignore this finding

To ignore this, reply with:

  • /fp <comment> for false positive
  • /ar <comment> for acceptable risk
  • /other <comment> for all other reasons

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

You can view more details on this finding in the Semgrep AppSec Platform here.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 97 out of 102 changed files in this pull request and generated no new comments.

@dotCMS dotCMS deleted a comment from semgrep-code-dotcms-test bot Jan 22, 2026
@dotCMS dotCMS deleted a comment from semgrep-code-dotcms-test bot Jan 22, 2026
@dotCMS dotCMS deleted a comment from semgrep-code-dotcms-test bot Jan 22, 2026
@hmoreras hmoreras merged commit 0e011ed into issue-33882-primeng-update Jan 22, 2026
15 of 16 checks passed
@hmoreras hmoreras deleted the #34249-migrate-content-types branch January 22, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants