Skip to content

fix: Edit Content Type cancel + Tags portlet parity gaps (#36298)#36299

Open
hmoreras wants to merge 3 commits into
mainfrom
issue-36298-fixes
Open

fix: Edit Content Type cancel + Tags portlet parity gaps (#36298)#36299
hmoreras wants to merge 3 commits into
mainfrom
issue-36298-fixes

Conversation

@hmoreras

@hmoreras hmoreras commented Jun 23, 2026

Copy link
Copy Markdown
Member

Summary

Closes #36298. Two regressions in the Angular-migrated admin portlets, bundled.

  • Content Types Edit dialog — Cancel button now closes the dialog (was a no-op in Edit mode because the action only ran route cleanup, never set show.set(false)). Form stays mounted through p-dialog's close animation, so no more flash of an empty frame fading out.
  • Tags portlet — New Show Global Tags toolbar checkbox sends global=true to /api/v2/tags so SYSTEM_HOST tags become visible (admins can finally audit/clean up legacy global tags). Export is collapsed into a single split-button: main click = Export Selected; dropdown adds Export All, which fetches the full filtered set across pages and is disabled when the filter already fits on one page. Selection persists across pagination/filter/sort so picks survive page navigation.

Test plan

  • Edit Content Type dialog: Cancel closes the dialog in Edit mode
  • Edit Content Type dialog: Cancel closes the dialog in Create mode
  • Edit Content Type dialog: form content stays visible through the close fade (no flash)
  • Tags portlet: toggling Show Global Tags reveals SYSTEM_HOST tags and updates the request
  • Tags portlet: Export Selected dumps the current selection only
  • Tags portlet: Export All downloads every row matching the current filter
  • Tags portlet: Export All menu item is disabled when only one page of results exists
  • Selecting on page 1 + paginating to page 2: selection persists, both Export options remain available
Screenshare.-.2026-06-23.4_40_50.PM.mp4

hmoreras and others added 2 commits June 23, 2026 16:56
… through fade

The Cancel button (data-testid="dotDialogCancelAction") on the Edit Content
Type dialog did nothing in Edit mode because its action handler called
onDialogHide() — route cleanup only — and never set show.set(false). Create
mode appeared to work only because gotoPortlet navigated away.

Separately, @if (show()) destroyed the form synchronously when show()
flipped, producing a flash of empty dialog while p-dialog faded out.

Cancel now sets show.set(false). A new renderForm signal decouples form
rendering from dialog visibility and is only flipped false in onDialogHide(),
which p-dialog fires after the close animation completes.

Refs #36298

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Restore parity with the legacy JSP tag manager:

1. Show Global Tags — toolbar checkbox (data-testid: tag-show-global-checkbox)
   wired to a new showGlobal store signal. DotTagsService.getTagsPaginated
   forwards the existing v2/tags ?global=true param so SYSTEM_HOST tags become
   visible alongside the current site's tags. Without this, admins could not
   audit or clean up legacy global tags like "2013", "2014" — the v2 endpoint
   defaults global=false.

2. Export the full filtered set — new exportAll() store method paginates the
   current filter (filter + site + showGlobal + sort honored) and downloads
   as CSV. The previous portlet could only export the on-screen selection.

Export UI is consolidated into a single p-splitButton (tag-export-split-btn)
mirroring the Add button: main click runs Export Selected; the dropdown
exposes Export Selected and Export All. Export All is disabled when the
filter fits on one page, kept visible for discoverability.

Selection persists across pagination, filter, sort, and Show Global toggles
so the user's picks survive page navigation. CSV builder retains
spreadsheet-formula sanitization.

New i18n keys: tags.export.selected, tags.show.global.

Refs #36298

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

🤖 Bedrock Review — us.deepseek.r1-v1:0

New Issues

  • 🔴 Critical: core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/dot-content-types-edit.component.ts:326 — Cancel action bypasses onDialogHide() navigation logic. Directly setting show.set(false) skips the portlet redirection when in create mode (!isEditMode()), leaving users stranded in an invalid state.
  • 🟠 High: core-web/libs/portlets/dot-tags/src/lib/dot-tags-list/store/dot-tags-list.store.ts:199exportAll() uses store.totalRecords() as per_page, risking failed exports when total exceeds backend's max allowed page size. No chunking or error handling for oversized requests.

Run: #28062735124 · tokens: in: 10637 · out: 2617 · total: 13254

@claude

claude Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Claude finished @hmoreras's task in 1m 3s —— View job


Rollback Safety Analysis

  • Read rollback-unsafe categories reference
  • Get full PR diff
  • Analyze diff against unsafe categories
  • Post results / add label

Result: ✅ Safe To Rollback

All 11 changed files are frontend-only (Angular/TypeScript + two additive Language.properties strings). Checked against every category in the reference:

Category Verdict
C-1 Structural Data Model Change ✅ No DB schema or data migrations
C-2 ES Mapping Change ✅ No ES mapping code touched
C-3 Content JSON Model Version ✅ No CURRENT_MODEL_VERSION bump
C-4 DROP TABLE / DROP COLUMN ✅ No DDL drops
H-1 One-Way Data Migration ✅ No data transformations
H-2 RENAME TABLE/COLUMN ✅ No renames
H-3 PK Restructuring ✅ No PK changes
H-4 New ContentType Field Type ✅ No new field types registered
H-5 Binary Storage Provider ✅ No storage changes
H-6 DROP PROCEDURE/FUNCTION ✅ No stored procedure changes
H-7 NOT NULL column without default ✅ No DB columns added
H-8 VTL Viewtool Contract ✅ No viewtool contracts changed
M-1 Column Type Change ✅ No DDL
M-2 Push Publishing Bundle Format ✅ No bundle/bundler changes
M-3 REST/GraphQL Contract ✅ No REST endpoints changed (frontend calls existing /api/v2/tags with an optional global param that is purely additive)
M-4 OSGi Plugin API ✅ No OSGi interfaces changed

Label added: AI: Safe To Rollback

- Use $-prefix for new signals ($renderForm, $exportMenuItems) per
  ANGULAR_STANDARDS.md.
- Add edit-mode Cancel + $renderForm lifecycle tests in
  dot-content-types-edit to guard the regression fix for #36298
  (previously only create mode was covered).
- DRY request params in dot-tags-list.store via buildBaseParams() so
  loadTags and exportAll share the same filter/site/global/sort shape.
- Drop unreachable EXPORT_PAGE_SIZE fallback and add a totalRecords==0
  no-op guard in exportAll().
- Format two spec files with prettier (fixes the format-test CI failure
  from the prior commit).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

🤖 Bedrock Review — us.deepseek.r1-v1:0

Resolved

  • core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/dot-content-types-edit.component.ts:326 — Cancel action now triggers onDialogHide via dialog's onHide event

Existing

  • 🟠 High: core-web/libs/portlets/dot-tags/src/lib/dot-tags-list/store/dot-tags-list.store.ts:199 — exportAll() uses store.totalRecords() as per_page risking failed exports on large datasets

Run: #28064198126 · tokens: in: 11678 · out: 1278 · total: 12956

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI: Safe To Rollback Area : Frontend PR changes Angular/TypeScript frontend code

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

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

1 participant