commit view: Fix layout shift while loading commit (#44548)

Fixes a few cases where the commit view would layout shift as the diff
loaded. This was caused by:
- Adding the commit message buffer after all the diff files
- Using the gutter dimensions from the last frame for the avatar spacing

Release Notes:

- commit view: Fix layout shift while loading commit

---------

Co-authored-by: MrSubidubi <dev@bahn.sh>
This commit is contained in:
Agus Zubiaga
2025-12-10 15:01:49 +00:00
committed by GitHub
co-authored by MrSubidubi
parent dd431631b4
commit 21f7e6a9e6
10 changed files with 316 additions and 308 deletions
+6 -10
View File
@@ -174,17 +174,13 @@ impl Render for QuickActionBar {
.as_ref()
.is_some_and(|menu| matches!(menu.origin(), ContextMenuOrigin::QuickActionBar))
};
let code_action_element = if is_deployed {
editor.update(cx, |editor, cx| {
if let Some(style) = editor.style() {
editor.render_context_menu(style, MAX_CODE_ACTION_MENU_LINES, window, cx)
} else {
None
}
let code_action_element = is_deployed
.then(|| {
editor.update(cx, |editor, cx| {
editor.render_context_menu(MAX_CODE_ACTION_MENU_LINES, window, cx)
})
})
} else {
None
};
.flatten();
v_flex()
.child(
IconButton::new("toggle_code_actions_icon", IconName::BoltOutlined)