Skip to content

[OGUI-1917] Add copy URL button to toolbar - #3616

Draft
isaachilly wants to merge 23 commits into
improv/FRM/OGUI-1919/Make-copy-to-clipboard-component-style-flexiblefrom
feature/ILG/OGUI-1917/Add-shareable-url-button
Draft

[OGUI-1917] Add copy URL button to toolbar#3616
isaachilly wants to merge 23 commits into
improv/FRM/OGUI-1919/Make-copy-to-clipboard-component-style-flexiblefrom
feature/ILG/OGUI-1917/Add-shareable-url-button

Conversation

@isaachilly

@isaachilly isaachilly commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

I have JIRA issue created

  • branch and/or PR name(s) includes JIRA ID
  • issue has "Fix version" assigned
  • issue "Status" is set to "In review"
  • PR labels are selected
  • FLP integration tests were ran successful

Ticket:
Give the user an easy, developer-controlled way to copy a safe, shareable URL. This avoids confusion about how the URL should be encoded, and protects against browser address bar behaviour differences catching users out.

Code:

  • Adds a "Copy URL" button to the toolbar, next to the zoom buttons, using the CopyToClipboardComponent updated in OGUI-1919.
  • The URL is built from the current filter state, not read from the address bar.
  • Success shows "Copied!" in the button; failure shows a danger notification. The button is disabled, with the reason as the title, when the clipboard is unavailable.

Reviewer:

  • Needs a WebUI release containing OGUI-1919, then a dep bump in this or another PR. Until then, CI fails on the copy-failure test. I'm not pushing any temporary link, because if it weren't reverted it would ship in the release tarball.
  • To test locally before the release, temporarily link your local WebUI to ILG package and don't forget to restore after testing.
  • To trigger the failure notification set, via the console, writeText to raise an Error and click the button.

@isaachilly isaachilly self-assigned this Sep 3, 2026
@isaachilly isaachilly changed the title Add copy URL action to command logs [OGUI-1919] Add copy URL action to command logs Sep 3, 2026
@isaachilly isaachilly changed the title [OGUI-1919] Add copy URL action to command logs [OGUI-1917] Add copy URL action to command logs Sep 3, 2026
@isaachilly
isaachilly force-pushed the feature/ILG/OGUI-1917/Add-shareable-url-button branch 3 times, most recently from 65ce0a5 to 2ddc5aa Compare September 8, 2026 12:18
@isaachilly
isaachilly force-pushed the feature/ILG/OGUI-1917/Add-shareable-url-button branch 5 times, most recently from eb4c274 to 1b8c01e Compare September 8, 2026 15:01
@isaachilly isaachilly changed the title [OGUI-1917] Add copy URL action to command logs [OGUI-1917] Add copy URL button to toolbar Sep 8, 2026
@isaachilly
isaachilly force-pushed the feature/ILG/OGUI-1917/Add-shareable-url-button branch from c638dc9 to dd04f15 Compare September 9, 2026 06:59
@isaachilly
isaachilly force-pushed the feature/ILG/OGUI-1917/Add-shareable-url-button branch from dd04f15 to 16c659d Compare September 11, 2026 13:31
Register the InfoLogger model with `StatefulComponent` so shared stateful UI components can render correctly.

Add a `CopyToClipboardComponent` button in the command logs toolbar that copies the current filter query string as a URL.
Switch the command logs copy action to use `location.href`.
Add a new test suite for the copy URL button.

The new tests verify the button label and confirm that clicking it copies a URL containing the encoded active filter query.
Switch the log view Copy URL button to consume a new `LogFilter.filterURL` getter instead of rebuilding from a query string in the button component.
Move the shareable URL logic to the main model from the more specific log filter model.

Build URL using `queryRouter.getUrl` and replacing the search.
Wires an `onFailure` handler so clipboard errors are surfaced to users as a danger notification.

Adds a test that simulates a clipboard rejection and verifies the expected notification state, type, and message.
Adjust the copy URL button mocha test to use the current log filtering API and assert copy failures through the rendered danger notification instead of reading notification state directly.
Pass the notification `show` method as a bound callback when rendering the copy URL button.
@isaachilly
isaachilly force-pushed the feature/ILG/OGUI-1917/Add-shareable-url-button branch from 1b34e65 to 63770cf Compare September 14, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant