mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-02-01 14:44:29 +00:00
feat(ux): update truncate dots to be shorter in tables (#17825)
This commit is contained in:
@@ -83,7 +83,7 @@ export const TableRenderer: React.FC<TableRendererProps> = ({
|
||||
const candidate = content.substring(0, mid);
|
||||
const candidateWidth = getPlainTextLength(candidate);
|
||||
|
||||
if (candidateWidth <= contentWidth - 3) {
|
||||
if (candidateWidth <= contentWidth - 1) {
|
||||
bestTruncated = candidate;
|
||||
left = mid + 1;
|
||||
} else {
|
||||
@@ -91,7 +91,7 @@ export const TableRenderer: React.FC<TableRendererProps> = ({
|
||||
}
|
||||
}
|
||||
|
||||
cellContent = bestTruncated + '...';
|
||||
cellContent = bestTruncated + '…';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ exports[`TableRenderer > renders a simple table correctly 1`] = `
|
||||
exports[`TableRenderer > renders a table with long headers and 4 columns correctly 1`] = `
|
||||
"
|
||||
┌──────────────────┬──────────────────┬───────────────────┬──────────────────┐
|
||||
│ Very Long Col... │ Very Long Col... │ Very Long Colu... │ Very Long Col... │
|
||||
│ Very Long Colum… │ Very Long Colum… │ Very Long Column… │ Very Long Colum… │
|
||||
├──────────────────┼──────────────────┼───────────────────┼──────────────────┤
|
||||
│ Data 1.1 │ Data 1.2 │ Data 1.3 │ Data 1.4 │
|
||||
│ Data 2.1 │ Data 2.2 │ Data 2.3 │ Data 2.4 │
|
||||
|
||||
Reference in New Issue
Block a user