Hey hey :) I've been trying out the new logging view and wanted to provide a bit of feedback wrt copying and pasting logged messages. It's a pretty common task when running into bugs in a larger app where another team might be responsible for the feature you're navigating through and you encounter an error. I might want to create a new ticket with the StackTrace, or paste it into slack for discussion.
cmd+c to copyio.flutter.logging.FlutterLogEntry@76b5b7da | io.flutter.logging.FlutterLogEntry@76b5b7da | io.flutter.logging.FlutterLogEntry@76b5b7da | io.flutter.logging.FlutterLogEntry@76b5b7da
-- | -- | -- | --
Workaround: Secondary-click on the message, click "Copy asText". This now produces a result I was expecting:
13:30:48.572 2508 800 flutter.tools Restarted app in 1,230ms.
or with multiple lines:
13:30:48.572 2508 800 flutter.tools Restarted app in 1,230ms.
13:30:47.834 2509 400 runtime.gc collection time 1ms • 26.2MB used of 27.2MB • isolates/21837764
13:30:48.007 2510 400 runtime.gc collection time 2ms • 30.0MB used of 31.2MB • isolates/21837764
Say I want to filer down to a specific message. Rather than typing it in (error-prone, sometimes long), it'd be great to copy only a portion of the message rather than "Copy as Text" and have to remove the bits I don't want.
Thanks for all the hard work and community effort on this feature!
@brianegan, Thank you for the great feedback.
@pq, I think there is something need to improve.
Issue 1:
For issue 2:
I already create a new PR for fixing copy by shortcut: https://github.com/flutter/flutter-intellij/pull/2455
@pq, please check it next week :)
For the issue 2 ( Copy a portion of the message) I think we should have more discussion :)
Sounds good, thanks for helping out!
Awesome. Thanks for the feedback @brianegan and for the quick fixes @quangson91!
Regarding
Attempt to select only a portion of the logged message, e.g. I wanted to copy "Restarted app" from the message "Restarted app in 1,230ms."
I simplified the selection model to default to whole rows (and not cells), thinking this was generally what folks want. Of course, now you've got me wondering. 🤔
Definitely open for discussion!
@pq Yah, I think the default Cell selection makes sense in a lot of cases. Would it be possible to change it so you could double-click on a Cell to go into an "Editing Mode" or "Selection Mode" that would allow you to copy the text? Might be the best of both worlds, but I'm not sure if Cell View in IntelliJ supports that kinda feature.
Thanks again to all for your time!
I was thinking about this too actually. (Alternatively, it might be a mode toggled in the side action bar...) For my edification, what's the specific use case? Does it happen often that you just want part of a log?
Thanks for the continued conversation!
Sure, use-cases are a good idea! The two use cases that led to this:
@pq, @brianegan what about when user click to the cell/row we display a small dialog/popup with log content -> user can copy a part of a log as they want ?
Maybe a double-click instead of a single click? Seems reasonable that peeps might want to single click on a row or select a few rows, then hit "copy" to get the whole thing.
Overall, it's kinda hard to say haha... Not sure if it's overkill, but I wonder if there are some metrics that could be added/tracked or UX results that could help the team understand the most common use case?
ah yeap, it must be a double-click.
@pq what do you think?
if that ok -> I will implement it.
Seems reasonable that peeps might want to single click on a row or select a few rows
@brianegan
=> I'm not sure we can handle double-click when user select a few rows :|
@quangson91 From my perspective, that's totally fine. At least in my use-case, it's been copying a bit of text from a single line.
The case involving multiple lines usually means I'm copying a bigger stacktraces so I can paste those lines into a bug report / slack channel. Just didn't want to hurt that functionality by saying "single-click = display a popup".
@brianegan got it.
Thanks for all your help @quangson91 & @pq :)
Great ideas! A couple of quick thoughts:
As for:
I wonder if there are some metrics that could be added/tracked or UX results that could help the team understand the most common use case?
We do have a means for capturing analytics. When this is all more baked we can totally look at adding some tracking.
Cheers!
ideally, would a double click get you to a mode where you can select specific text within a given cell? It sounds like that's the goal.
Yep! How it's done, whether the text in the cell becomes "Selectable" or "Editable" at that point, or if it shows a little popup I can copy from, is a bit of a "Design" question that requires experimenting a bit and seeing what works / feels best.
Overall, a solution to the use cases stated above, whatever implementation you all feel works best, would be fantastic.
@pq, @brianegan, I created a new PR: https://github.com/flutter/flutter-intellij/pull/2473
with two features:
Woah, sweet! Nice work @quangson91 :) Thanks so much!
Yeap, glad to hear that from you ^^.
Thank you!
w/ #2473 landed I think this is good to close?
@brianegan?
Yep! This provided the functionality I was looking for :)