Skip to content

[OGUI-1919] Make copy button component more flexible - #3615

Draft
isaachilly wants to merge 9 commits into
bug/ILG/OGUI-1920/Fix-encoding-order-of-filter-parameter-qfrom
improv/FRM/OGUI-1919/Make-copy-to-clipboard-component-style-flexible
Draft

[OGUI-1919] Make copy button component more flexible#3615
isaachilly wants to merge 9 commits into
bug/ILG/OGUI-1920/Fix-encoding-order-of-filter-parameter-qfrom
improv/FRM/OGUI-1919/Make-copy-to-clipboard-component-style-flexible

Conversation

@isaachilly

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

@isaachilly isaachilly changed the title Make copy button style configurable [OGUI-1920] Make copy button style configurable Sep 3, 2026
@isaachilly isaachilly self-assigned this Sep 3, 2026
@isaachilly isaachilly changed the title [OGUI-1920] Make copy button style configurable [OGUI-1919] Make copy button style configurable Sep 3, 2026
@isaachilly
isaachilly force-pushed the improv/FRM/OGUI-1919/Make-copy-to-clipboard-component-style-flexible branch from cad0f06 to 5bb642d Compare September 8, 2026 07:40
Allow callers to override the button class and pass through inline styles, while keeping the existing primary-button default.

The button content wrapper is also centred so the default and copied states stay aligned.
Reset the success timer if clicked again otherwise the button text resets at unpredictable moments and user is left confused if the copy worked or not.
Update `CopyToClipboardComponent` to accept a `classes` suffix instead of a full `className` selector, and build the button selector from a consistent `button.btn` base.
Documented expected `vnode.attrs` fields in `CopyToClipboardComponent.view()` and added `ariaLive: 'polite'` to the status content container so copy success feedback is announced to assistive technologies.
@isaachilly
isaachilly force-pushed the improv/FRM/OGUI-1919/Make-copy-to-clipboard-component-style-flexible branch from 049167c to d5f81d6 Compare September 8, 2026 12:31
@isaachilly isaachilly changed the title [OGUI-1919] Make copy button style configurable [OGUI-1919] Make copy button component more flexible Sep 8, 2026
Wrap clipboard writes in error handling and add an optional `onFailure` callback so callers can react when copying is unavailable or fails.

The component also now destructures `style` explicitly.
Done so clipboard write failures are properly caught by the existing error handling path, instead of proceeding as if copy succeeded.
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