review
This commit is contained in:
@@ -5,7 +5,6 @@ use gpui_component::menu::PopupMenuItem;
|
||||
use gpui_component::{ActiveTheme, StyledExt, h_flex};
|
||||
|
||||
/// A muted command row with a copy button.
|
||||
/// The value renders truncated and a [`Clipboard`] button copies the full value.
|
||||
pub fn copy_row<E>(copy_id: E, command: &SharedString, cx: &App) -> Div
|
||||
where
|
||||
E: Into<ElementId>,
|
||||
@@ -35,10 +34,6 @@ where
|
||||
}
|
||||
|
||||
/// One row of a copy menu, with a small title above the compact label.
|
||||
/// A copy button flips to a check while the value is on the clipboard.
|
||||
/// Clicking the row copies and dismisses the menu.
|
||||
/// The copy button stops propagation so the menu stays open.
|
||||
/// Both copy `copy`, never the label.
|
||||
pub fn menu_copy_row(
|
||||
id: &'static str,
|
||||
title: &'static str,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/// `[head chars]...[tail chars]` middle truncation.
|
||||
///
|
||||
/// Values too short for the ellipsis to save space are left alone.
|
||||
pub fn middle_truncate(value: &str, head: usize, tail: usize) -> String {
|
||||
let len = value.chars().count();
|
||||
|
||||
Reference in New Issue
Block a user