Description
The dot-edit-content-binary-field library (and its dotcms-binary-field-builder custom element app) was rolled back from the Angular 20→21 / PrimeNG 17→21 migration commit (618fd32060) due to multiple regressions:
NG0950 errors in JSP pages — input.required() signal inputs are incompatible with createCustomElement from @angular/elements
- Tailwind CSS was never wired into the
dotcms-binary-field-builder app's build, breaking all layout
- The PrimeNG 21 Lara theme provider (
provideDotCMSTheme) was missing from AppModule, leaving all PrimeNG components unstyled
- The global
.pi { display: flex; width: 20px; aspect-ratio: 1/1 } rule from _misc.scss conflicted with PrimeNG 21's button flex layout, misaligning all button icons
- Multiple PrimeNG 17
styleClass button variants broken under PrimeNG 21
The rollback restored all pre-migration SCSS files and HTML templates. This task tracks the proper forward migration so the field is fully aligned with the rest of the codebase (Tailwind CSS v4 + PrimeNG 21 Lara theme).
Fixes already applied to the builder app (must be preserved during migration)
| Fix |
File |
provideDotCMSTheme() in AppModule |
apps/dotcms-binary-field-builder/src/app/app.module.ts |
| Tailwind CSS + PostCSS setup |
apps/dotcms-binary-field-builder/src/style.css, .postcssrc.json, project.json |
Dialog backdrop override (PrimeNG 21 renamed p-component-overlay → p-overlay-mask) |
src/style.css |
Button icon alignment fix (.p-button .p-button-icon.pi { width: auto; aspect-ratio: unset }) |
src/style.css |
@Input() setter + backing signal pattern (replaces input.required()) |
dot-edit-content-binary-field.component.ts |
Components to migrate
All under libs/edit-content/src/lib/fields/dot-edit-content-binary-field/:
dot-edit-content-binary-field.component (main + .scss)
components/dot-binary-field-editor/ (HTML + .scss)
components/dot-binary-field-preview/ (HTML + .scss)
components/dot-binary-field-ui-message/ (HTML + .scss)
components/dot-binary-field-url-mode/ (HTML + .scss)
components/dot-binary-field-wrapper/
PrimeNG 17 → 21 button API reference
Old styleClass |
New PrimeNG 21 props |
styleClass="p-button-link p-button-sm" |
[link]="true" size="small" |
styleClass="p-button-outlined p-button-sm p-button-secondary" |
[outlined]="true" severity="secondary" size="small" |
styleClass="p-button-rounded p-button-sm p-button-outlined" |
[rounded]="true" [outlined]="true" size="small" |
styleClass="p-button-rounded p-button-sm p-button-tertiary" |
[rounded]="true" severity="contrast" size="small" |
styleClass="p-button-outlined" |
[outlined]="true" |
Acceptance Criteria
Additional Context
- The
dotcms-binary-field-builder app exposes <dotcms-binary-field> as a custom HTML element via createCustomElement — embedded in JSP pages. This is why input.required() cannot be used.
- PrimeFlex is no longer available — Tailwind utilities only.
- Reference the migration commit
618fd32060 for the intended Tailwind output structure.
- Related rollback: branch
issue-34552-tags-portlet-feedback.
Description
The
dot-edit-content-binary-fieldlibrary (and itsdotcms-binary-field-buildercustom element app) was rolled back from the Angular 20→21 / PrimeNG 17→21 migration commit (618fd32060) due to multiple regressions:NG0950errors in JSP pages —input.required()signal inputs are incompatible withcreateCustomElementfrom@angular/elementsdotcms-binary-field-builderapp's build, breaking all layoutprovideDotCMSTheme) was missing fromAppModule, leaving all PrimeNG components unstyled.pi { display: flex; width: 20px; aspect-ratio: 1/1 }rule from_misc.scssconflicted with PrimeNG 21's button flex layout, misaligning all button iconsstyleClassbutton variants broken under PrimeNG 21The rollback restored all pre-migration SCSS files and HTML templates. This task tracks the proper forward migration so the field is fully aligned with the rest of the codebase (Tailwind CSS v4 + PrimeNG 21 Lara theme).
Fixes already applied to the builder app (must be preserved during migration)
provideDotCMSTheme()inAppModuleapps/dotcms-binary-field-builder/src/app/app.module.tsapps/dotcms-binary-field-builder/src/style.css,.postcssrc.json,project.jsonp-component-overlay→p-overlay-mask)src/style.css.p-button .p-button-icon.pi { width: auto; aspect-ratio: unset })src/style.css@Input()setter + backing signal pattern (replacesinput.required())dot-edit-content-binary-field.component.tsComponents to migrate
All under
libs/edit-content/src/lib/fields/dot-edit-content-binary-field/:dot-edit-content-binary-field.component(main +.scss)components/dot-binary-field-editor/(HTML +.scss)components/dot-binary-field-preview/(HTML +.scss)components/dot-binary-field-ui-message/(HTML +.scss)components/dot-binary-field-url-mode/(HTML +.scss)components/dot-binary-field-wrapper/PrimeNG 17 → 21 button API reference
styleClassstyleClass="p-button-link p-button-sm"[link]="true" size="small"styleClass="p-button-outlined p-button-sm p-button-secondary"[outlined]="true" severity="secondary" size="small"styleClass="p-button-rounded p-button-sm p-button-outlined"[rounded]="true" [outlined]="true" size="small"styleClass="p-button-rounded p-button-sm p-button-tertiary"[rounded]="true" severity="contrast" size="small"styleClass="p-button-outlined"[outlined]="true"Acceptance Criteria
styleClasson<p-button>replaced with PrimeNG 21 props@Input()setter + backing signal pattern preserved in.component.ts(NOT reverted toinput.required()) to maintain@angular/elementscompatibilityprovideDotCMSTheme, dialog backdrop, button icon override)NG0950, no unstyled components[tooltipOptions]="{ showOnDisabled: true }")yarn nx test edit-content)Additional Context
dotcms-binary-field-builderapp exposes<dotcms-binary-field>as a custom HTML element viacreateCustomElement— embedded in JSP pages. This is whyinput.required()cannot be used.618fd32060for the intended Tailwind output structure.issue-34552-tags-portlet-feedback.