Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jun 5, 2025

Implements visual feedback for copy operations by temporarily changing the copy button icon to a checkmark (✓) to indicate successful clipboard operations.

Changes Made

When a user clicks the copy button to copy environment or project paths:

  1. The copy icon temporarily changes to a checkmark for 2 seconds
  2. After the timeout, the icon reverts to the original copy icon
  3. Visual feedback is provided for both project paths and environment paths in all tree views

Technical Implementation

  • Copy Feedback Manager: Central state management for tracking recently copied items with configurable timeout
  • Tree View Integration: Modified ProjectItem, ProjectEnvironment, and PythonEnvTreeItem to check copy state and use checkmark icon when recently copied
  • Event-Driven Updates: Tree views listen for copy state changes and refresh only affected items for optimal performance
  • Proper Resource Management: Automatic cleanup and disposal of resources on extension deactivation

Testing

  • Added comprehensive test suite covering copy feedback functionality
  • Enhanced existing copy command tests to verify state management
  • All 123 tests pass including new copy feedback tests
  • Verified minimal performance impact with targeted tree view refreshes

Example Usage

  1. Navigate to Python Projects or Environment Managers view
  2. Click the copy button (📋) next to any project or environment
  3. Button icon changes to checkmark (✓) for 2 seconds
  4. Icon automatically reverts to copy button

Fixes #461.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com>
Copilot AI changed the title [WIP] Should copy button temporarily become a checkmark Add temporary checkmark feedback for copy button actions Jun 5, 2025
Copilot AI requested a review from eleanorjboyd June 5, 2025 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should copy button temporarily become a checkmark

2 participants