From 3bb6c2546a1d104c9198096339e9317080f6ee87 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Fri, 5 Dec 2025 15:46:28 -0300 Subject: [PATCH] git_ui: Fix history view label truncation (#44218) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There's still a weird problem happening where the labels (and the label on the tab, too, for what is worth) flicker as the file history view gets smaller. I suspect that problem is related to something else—potentially the truncation algorithm or focus management—so I'm not solving it here. Screenshot 2025-12-05 at 11  24@2x Release Notes: - N/A --- crates/git_ui/src/file_history_view.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/crates/git_ui/src/file_history_view.rs b/crates/git_ui/src/file_history_view.rs index e34806aacae48122caf3a12246b04862898f2bed..5b3588d29678ec406749ec45be3de154fd71c5f8 100644 --- a/crates/git_ui/src/file_history_view.rs +++ b/crates/git_ui/src/file_history_view.rs @@ -267,15 +267,19 @@ impl FileHistoryView { .child(self.render_commit_avatar(&entry.sha, window, cx)) .child( h_flex() + .min_w_0() .w_full() .justify_between() .child( h_flex() + .min_w_0() + .w_full() .gap_1() .child( Label::new(entry.author_name.clone()) .size(LabelSize::Small) - .color(Color::Default), + .color(Color::Default) + .truncate(), ) .child( Label::new(&entry.subject) @@ -285,9 +289,11 @@ impl FileHistoryView { ), ) .child( - Label::new(relative_timestamp) - .size(LabelSize::Small) - .color(Color::Muted), + h_flex().flex_none().child( + Label::new(relative_timestamp) + .size(LabelSize::Small) + .color(Color::Muted), + ), ), ), )