Skip to content

Conversation

@bromiley
Copy link
Contributor

@bromiley bromiley commented Aug 9, 2025

Summary

Implemented Copy buttons for Detect Logic and Respond Logic text boxes for one-off copying of contents.

Resolves #6

Type of Change

  • πŸ› Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • πŸ’₯ Breaking change (fix or feature that causes existing functionality to not work as expected)
  • πŸ“š Documentation update
  • 🧹 Code cleanup/refactoring
  • 🎨 UI/UX improvement

Changes Made

  • Add SVG copy icons next to editor labels
  • Implement copyDetectLogicToClipboard() and copyRespondLogicToClipboard() functions
  • Icons disabled when no content, active with hover effects when content exists
  • Uses proper SVG copy icon (overlapping rectangles) instead of emoji
  • Includes fallback clipboard support for older browsers
  • Success/warning notifications via existing notification system

Testing Performed

  • Manual testing completed
    • See screenshots. Content copied from window to LC D&R window, no syntax lost
  • Existing functionality verified
    • No other changes made to the tool
  • New functionality tested
    • Confirmed copy button(s) work, no content or syntax lost
  • Cross-browser testing (if UI changes)
    • Tested in Chrome 138.0.7204.184 βœ…
    • Tested in Safari 18.6 βœ…

Screenshots (if applicable)

Copy buttons are only active if there is content. Screenshot without content:

image

Screenshot with content:

image

Notes for Maintainers

  • Version impact: [Does this require MAJOR/MINOR/PATCH version bump?]
  • Release grouping: [Can this be grouped with other pending changes?]
  • Breaking changes: [List any breaking changes]

Note for Contributors:

  • βœ… Focus on your implementation - maintainers handle versioning
  • ❌ Do not update package.json version or src/utils/version.ts changelog
  • πŸ“ Provide clear description for release notes compilation

- Add SVG copy icons next to editor labels
- Implement copyDetectLogicToClipboard() and copyRespondLogicToClipboard() functions
- Icons disabled when no content, active with hover effects when content exists
- Uses proper SVG copy icon (overlapping rectangles) instead of emoji
- Includes fallback clipboard support for older browsers
- Success/warning notifications via existing notification system

Resolves Digital-Defense-Institute#6
@ecapuano
Copy link
Collaborator

Cherry picked and merged with #28

Thanks broms!

@ecapuano ecapuano closed this Oct 16, 2025
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.

Allow copy to clipboard for individual replay result

2 participants