core icon indicating copy to clipboard operation
core copied to clipboard

Bug bucket — Content Type Edit cancel + Tags portlet parity gaps

Open hmoreras opened this issue 5 months ago • 2 comments

Problem Statement

Two regressions in Angular-migrated admin portlets, bundled because they share a Team and remediation window.

Defect 1 — Edit Content Type dialog: Cancel does nothing

In the Content Model portlet, opening an existing content type and clicking the gear → Edit Content Type dialog: the Cancel button (data-testid="dotDialogCancelAction") does nothing — the dialog stays open in Edit mode. In Create mode it only appears to work because navigation unmounts the host component.

A secondary visual glitch: on close (via X or accept), the form content vanishes instantly while the p-dialog wrapper continues its fade-out animation — the user sees an empty frame fade.

Root cause (introduced by the PrimeNG 21 upgrade, commit 618fd32060): the cancel action's handler was wired to onDialogHide(), which only performed route cleanup and never set show.set(false). The template's @if (show()) then destroyed the form synchronously when show() flipped.

https://github.com/user-attachments/assets/960a795e-e62b-4062-9418-03d6139b081c

Files:

  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/dot-content-types-edit.component.{ts,html}

Defect 2 — Tags portlet: missing Show Global Tags + no Export-All

Comparing the legacy dotCMS/src/main/webapp/WEB-INF/jsp/tag_manager/tag_manager.jsp against the Angular migration core-web/libs/portlets/dot-tags:

Capability Legacy JSP Angular Status
"Show Global Tags" checkbox (sends global=true) ✅ ❌ Missing
Bulk delete ✅ ✅ OK
Import CSV (with template download) ✅ ✅ OK
Export the full filtered set (server-side) ✅ ❌ Missing (only selected rows could be exported)

Files:

  • core-web/libs/data-access/src/lib/dot-tags/dot-tags.service.ts
  • core-web/libs/portlets/dot-tags/src/lib/dot-tags-list/store/dot-tags-list.store.ts
  • core-web/libs/portlets/dot-tags/src/lib/dot-tags-list/dot-tags-list.component.{ts,html}
  • dotCMS/src/main/webapp/WEB-INF/messages/Language.properties (new i18n keys)

Steps to Reproduce

Defect 1 — Edit Content Type cancel

  1. Navigate to Content Model.
  2. Open an existing content type.
  3. Click the gear icon to open the Edit Content Type dialog.
  4. Click Cancel.
  5. Observed: dialog stays open. Expected: dialog closes.

Animation glitch:

  1. Open the Edit Content Type dialog on an existing content type.
  2. Click the X (close) icon.
  3. Observed: form content disappears instantly, then the empty dialog wrapper fades out. Expected: form stays visible through the fade, destroyed only after the close animation completes.

Defect 2 — Tags portlet

  1. Navigate to the Tags portlet.
  2. Inspect the toolbar — there is no "Show Global Tags" toggle.
  3. Inspect a network request: /api/v2/tags is called without global=true.
  4. Observed: SYSTEM_HOST tags are invisible from any normal site context.

For export:

  1. Open the Tags portlet, type a filter that matches many tags across multiple pages.
  2. Try to export the full filtered set — there is no affordance for it; only selected rows can be exported.

Acceptance Criteria

Defect 1 — Edit Content Type dialog

  • [ ] Clicking Cancel closes the dialog in both Edit and Create modes
  • [ ] The form content remains mounted through the close animation (no flash of empty dialog wrapper); destruction happens after p-dialog's onHide fires
  • [ ] Reopening the dialog re-creates the form fresh (focus & state reset)
  • [ ] Existing Cancel-button test continues to pass; new behavior covered

Defect 2 — Tags portlet

  • [ ] Toolbar exposes a Show Global Tags checkbox (data-testid="tag-show-global-checkbox")
  • [ ] Toggling it sends global=true on /api/v2/tags and reloads the table
  • [ ] When ON, SYSTEM_HOST/global tags appear alongside the current site's tags
  • [ ] A single Export split-button (tag-export-split-btn) replaces the previous separate export buttons; main click = Export Selected
  • [ ] Dropdown contains Export Selected and Export All; Export All is disabled when the current filter fits on one page (kept visible for discoverability)
  • [ ] Export All fetches the entire filtered set (honoring filter, site, showGlobal, sort) and downloads as CSV
  • [ ] CSV builder retains spreadsheet-formula sanitization (=, +, -, @, tab, CR prefixed with ')
  • [ ] Selection persists across pagination, filter, sort, and Show Global toggles (the user's picks are not silently dropped)

dotCMS Version

Latest from main (post-PrimeNG 21 upgrade — commit 618fd32060).

Severity

Medium - Some functionality impacted

Links

NA

hmoreras avatar Jun 23 '26 22:06 hmoreras

QA verified ✅

hassandotcms avatar Jul 07 '26 08:07 hassandotcms