Unified · Split
| @@ -9695,7 +9695,8 @@ pub fn diagnostic_block_renderer(diagnostic: Diagnostic, is_valid: bool) -> Rend · 9694 unmodified lines | |||
| 9695 | Arc::new(move |cx: &mut BlockContext| { | 9695 | Arc::new(move |cx: &mut BlockContext| { |
| 9696 | let message = message.clone(); | 9696 | let message = message.clone(); |
| 9697 | let copy_id: SharedString = format!("copy-{}", cx.block_id.clone()).to_string().into(); | 9697 | let copy_id: SharedString = format!("copy-{}", cx.block_id.clone()).to_string().into(); |
| 9698 | let write_to_clipboard = cx.write_to_clipboard(ClipboardItem::new(message.clone())); | 9698 | // TODO: `cx.write_to_clipboard` is not implemented in tests. |
| 9699 | // let write_to_clipboard = cx.write_to_clipboard(ClipboardItem::new(message.clone())); | ||
| 9699 | 9700 | ||
| 9700 | // TODO: Nate: We should tint the background of the block with the severity color | 9701 | // TODO: Nate: We should tint the background of the block with the severity color |
| 9701 | // We need to extend the theme before we can do this | 9702 | // We need to extend the theme before we can do this |
| @@ -9718,7 +9719,8 @@ pub fn diagnostic_block_renderer(diagnostic: Diagnostic, is_valid: bool) -> Rend · 16 unmodified lines | |||
| 9718 | IconButton::new(copy_id.clone(), Icon::Copy) | 9719 | IconButton::new(copy_id.clone(), Icon::Copy) |
| 9719 | // .color(Color::Muted) | 9720 | // .color(Color::Muted) |
| 9720 | .size(ButtonSize::Compact) | 9721 | .size(ButtonSize::Compact) |
| 9721 | .on_click(cx.listener(move |_, _, cx| write_to_clipboard)) | 9722 | // TODO: `cx.write_to_clipboard` is not implemented in tests. |
| 9723 | // .on_click(cx.listener(move |_, _, cx| write_to_clipboard)) | ||
| 9722 | .tooltip(|cx| Tooltip::text("Copy diagnostic message", cx)), | 9724 | .tooltip(|cx| Tooltip::text("Copy diagnostic message", cx)), |
| 9723 | ) | 9725 | ) |
| 9724 | })) | 9726 | })) |