Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use CopyableText (click-to-copy) in GUI for instance info #3878

Open
wants to merge 4 commits into from

Conversation

levkropp
Copy link
Contributor

closes #3821

This pull request introduces a new CopyableText widget and updates several components to use this widget for improved text copy functionality. Additionally, it modifies the Tooltip widget to be stateful to handle dynamic changes in the tooltip message.

New CopyableText widget:

  • src/client/gui/lib/copyable_text.dart: Created a new CopyableText widget that allows text to be copied to the clipboard with a click and displays a tooltip indicating the copy status.

Updates to Tooltip widget:

Integration of CopyableText widget:

Screencast_20250115_121606.webm

@andrei-toterman andrei-toterman linked an issue Jan 24, 2025 that may be closed by this pull request
@levkropp levkropp marked this pull request as ready for review January 30, 2025 15:38
Copy link
Contributor

@Sploder12 Sploder12 left a comment

Choose a reason for hiding this comment

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

Looks good! I can copy things that are copyable! Just a small comment on simplifying Tooltip building.

src/client/gui/lib/tooltip.dart Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.10%. Comparing base (eb18d70) to head (2f58580).
Report is 74 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3878      +/-   ##
==========================================
+ Coverage   89.03%   89.10%   +0.07%     
==========================================
  Files         255      255              
  Lines       14577    14600      +23     
==========================================
+ Hits        12978    13010      +32     
+ Misses       1599     1590       -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@andrei-toterman andrei-toterman left a comment

Choose a reason for hiding this comment

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

Thanks, @levkropp! It works great, as expected, but there are some things in the code that could be changed.

src/client/gui/lib/vm_table/vm_table_headers.dart Outdated Show resolved Hide resolved
src/client/gui/lib/tooltip.dart Outdated Show resolved Hide resolved
src/client/gui/lib/copyable_text.dart Outdated Show resolved Hide resolved
src/client/gui/lib/copyable_text.dart Outdated Show resolved Hide resolved
src/client/gui/lib/copyable_text.dart Outdated Show resolved Hide resolved
src/client/gui/lib/vm_details/ip_addresses.dart Outdated Show resolved Hide resolved
src/client/gui/lib/vm_details/vm_details_general.dart Outdated Show resolved Hide resolved
src/client/gui/lib/vm_details/vm_details_general.dart Outdated Show resolved Hide resolved
src/client/gui/lib/vm_details/vm_details_general.dart Outdated Show resolved Hide resolved
src/client/gui/lib/vm_table/vm_table_headers.dart Outdated Show resolved Hide resolved
@levkropp levkropp force-pushed the gui-click-to-copy branch 2 times, most recently from c132468 to 4a48812 Compare February 3, 2025 17:02
Copy link
Contributor

@andrei-toterman andrei-toterman left a comment

Choose a reason for hiding this comment

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

just a few cosmetic things

src/client/gui/lib/vm_table/vm_table_headers.dart Outdated Show resolved Hide resolved
src/client/gui/lib/vm_table/vm_table_headers.dart Outdated Show resolved Hide resolved
src/client/gui/lib/vm_table/vm_table_headers.dart Outdated Show resolved Hide resolved
src/client/gui/lib/vm_table/vm_table_headers.dart Outdated Show resolved Hide resolved
Copy link
Contributor

@andrei-toterman andrei-toterman left a comment

Choose a reason for hiding this comment

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

Perfect!

Copy link
Contributor

@Sploder12 Sploder12 left a comment

Choose a reason for hiding this comment

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

LGTM!

@andrei-toterman andrei-toterman added this pull request to the merge queue Feb 3, 2025
Any commits made after this event will not be merged.
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Feb 4, 2025
@andrei-toterman andrei-toterman added this pull request to the merge queue Feb 4, 2025
Any commits made after this event will not be merged.
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Feb 4, 2025
@andrei-toterman andrei-toterman added this pull request to the merge queue Feb 4, 2025
Any commits made after this event will not be merged.
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 4, 2025
@andrei-toterman andrei-toterman added this pull request to the merge queue Feb 4, 2025
Any commits made after this event will not be merged.
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.

Multipass GUI doesn't allow users to clipboard text Make text selectable
3 participants