Skip to content

refactor(uve): remove duplicate copy URL button from editor toolbar#35518

Merged
zJaaal merged 1 commit intomainfrom
35517-task-uve-remove-duplicate-copy-url-button
Apr 30, 2026
Merged

refactor(uve): remove duplicate copy URL button from editor toolbar#35518
zJaaal merged 1 commit intomainfrom
35517-task-uve-remove-duplicate-copy-url-button

Conversation

@zJaaal
Copy link
Copy Markdown
Member

@zJaaal zJaaal commented Apr 30, 2026

Parent Issue

Closes #35517

Summary

The UVE editor was rendering the same "copy page URL" popover in two places:

  • the top editor toolbar (pi pi-copy, next to the bookmark star)
  • the browser URL pill (pi pi-link, on the pill that shows the URL itself)

Both buttons opened the same $pageURLS popover and called the same toast. The pill version was added in #35417 when the URL pill itself was introduced. Since the URL now lives on the pill, the copy control belongs there — the toolbar one is pure duplication.

This PR removes the toolbar copy button and cleans up the symbols that became unused.

Changes

  • dot-uve-toolbar.component.html — drop the <p-button> + <p-popover> block
  • dot-uve-toolbar.component.ts — remove ClipboardModule, PopoverModule, $pageURLS, copyUrlPopoverPt, triggerCopyToast, and the createFullURL import
  • edit-ema-editor.component.* — unchanged; the pill copy button stays

Test plan

  • yarn nx lint portlets-edit-ema-portlet — clean (only pre-existing warnings in another file)
  • yarn nx test portlets-edit-ema-portlet — 63 suites, 1331 passed, 5 skipped
  • Manual smoke: open a page in UVE, confirm the copy button on the URL pill still copies and toasts; confirm the toolbar no longer has the duplicate

🤖 Generated with Claude Code

This PR fixes: #35517

@github-actions github-actions Bot added Area : Backend PR changes Java/Maven backend code Area : Frontend PR changes Angular/TypeScript frontend code labels Apr 30, 2026
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Apr 30, 2026

Claude finished @zJaaal's task in 2m 21s —— View job


Code Review

  • Gather context
  • Read changed files
  • Check for orphaned references
  • Post review findings

Clean removal overall. One leftover to fix.

dot-uve-toolbar.component.spec.ts lines 88–95 — stale mock

// Mock createFullURL to avoid issues with invalid URLs in tests
jest.mock('../../../utils', () => ({
    ...jest.requireActual('../../../utils'),
    createFullURL: jest.fn((params, siteId) => { ... })
}));

createFullURL is no longer imported or used by DotUveToolbarComponent after this PR, so this mock is dead weight. It won't break tests, but it signals a dependency the component doesn't have. Fix this →

Everything else is clean — the HTML block and all five TypeScript symbols (ClipboardModule, PopoverModule, $pageURLS, copyUrlPopoverPt, triggerCopyToast, createFullURL import) are fully removed without leaving orphaned references in the component itself. The pill copy button in edit-ema-editor.component.ts is untouched.

Closes #35517

The toolbar's "copy URL" popover became redundant once #35417 added the
same control on the browser URL pill (where the URL itself is shown).
Both buttons rendered the exact same $pageURLS popover and triggered the
same toast, so the toolbar one is pure noise.

- Remove the popover button from dot-uve-toolbar.component.html
- Drop unused symbols from dot-uve-toolbar.component.ts:
  ClipboardModule, PopoverModule, $pageURLS, copyUrlPopoverPt,
  triggerCopyToast, and the createFullURL utility import
- The browser-pill copy button (edit-ema-editor.component.*) is unchanged

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zJaaal zJaaal force-pushed the 35517-task-uve-remove-duplicate-copy-url-button branch from 5485d83 to 29f0647 Compare April 30, 2026 15:59
@zJaaal zJaaal requested review from fmontes, hmoreras and rjvelazco and removed request for fmontes and hmoreras April 30, 2026 16:00
@zJaaal zJaaal enabled auto-merge April 30, 2026 16:00
@github-actions github-actions Bot removed the Area : Backend PR changes Java/Maven backend code label Apr 30, 2026
@zJaaal zJaaal added this pull request to the merge queue Apr 30, 2026
Merged via the queue into main with commit f31e33c Apr 30, 2026
24 checks passed
@zJaaal zJaaal deleted the 35517-task-uve-remove-duplicate-copy-url-button branch April 30, 2026 17:56
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.

UVE: Remove duplicate "copy URL" button from editor toolbar

2 participants