Skip to content

feat: track copy action usage#63

Open
barinali wants to merge 1 commit intointroduce-trackingfrom
copy-events
Open

feat: track copy action usage#63
barinali wants to merge 1 commit intointroduce-trackingfrom
copy-events

Conversation

@barinali
Copy link
Contributor

Proposed Changes

This pull request aims to introduce a tracking event for the copy action.

Event Name Action
variableNameCopy User copies a variable name via the copy button
variablePathCopy User copies a variable path via context menu
variableValueCopy User copies a variable value via context menu

Checklist

Ensure you provide everything we need to review your contribution:

  • Contribution meets our definition of done
  • Pull request establishes context
    • Link to related issue(s), i.e. Closes {LINK_TO_ISSUE} or Related to {LINK_TO_ISSUE}
    • Brief textual description of the changes
    • Screenshots or short videos showing UI/UX changes
    • Steps to try out, i.e. using the @bpmn-io/sr tool

@barinali barinali self-assigned this Mar 23, 2026
Copilot AI review requested due to automatic review settings March 23, 2026 10:38
@bpmn-io-tasks bpmn-io-tasks bot added the needs review Review pending label Mar 23, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds analytics tracking for user copy actions in the variable outline UI, leveraging the existing useTracking hook (bpmn-js-tracking integration).

Changes:

  • Track variable name copy via the CopyButton (variableNameCopy).
  • Track variable path/value copy via the JSON context menu (variablePathCopy, variableValueCopy).
  • Add/adjust tests to validate new tracking behavior and update some shared test helpers.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lib/hooks/useContextMenuBehavior.js Emits tracking events for context-menu “copy path/value” actions.
lib/components/CopyButton.jsx Emits tracking event for “copy variable name” button clicks.
lib/hooks/test/useContextMenuBehavior.spec.jsx New unit tests for context-menu copy tracking.
lib/components/test/CopyButton.spec.jsx New unit test for copy button tracking.
lib/components/VariableRow/test/ValueDisplay.spec.jsx Wraps ValueDisplay with InjectorContext in tests (to support tracking-enabled components).
lib/hooks/test/useVariables.spec.jsx Test helper simplification (drops unused options parameter).
lib/context/test/FilterContext.spec.jsx Test helper simplification (drops unused options parameter).
lib/components/Search/test/Search.spec.jsx Test helper simplification (drops unused options parameter).
lib/components/ScopeList/test/ScopeList.spec.jsx Removes unused injected args + test helper simplification.
CHANGELOG.md Adds entry for the new tracking feature.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

needs review Review pending

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants