From 8ab079474f5a2cf18e7ac8568ac5c48365d71cbf Mon Sep 17 00:00:00 2001 From: ihavecoke Date: Wed, 12 Nov 2025 23:54:25 +0800 Subject: [PATCH 1/4] Enable y-axis scroll to view extended keymap load error information --- crates/zed/src/zed.rs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index 33a715283b9d63..614ab3a4274cc8 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -1696,12 +1696,20 @@ fn show_markdown_app_notification( MessageNotification::new_from_builder(cx, move |window, cx| { image_cache(retain_all("notification-cache")) .text_xs() - .child(markdown_preview::markdown_renderer::render_parsed_markdown( - &parsed_markdown.clone(), - Some(workspace_handle.clone()), - window, - cx, - )) + .child( + div() + .id("parsed-markdown") + .max_h(vh(0.8, window)) + .overflow_y_scroll() + .child( + markdown_preview::markdown_renderer::render_parsed_markdown( + &parsed_markdown.clone(), + Some(workspace_handle.clone()), + window, + cx, + ), + ), + ) .into_any() }) .primary_message(primary_button_message) From e172389a6ecece7053dc69adaa6ad291be1a8c5c Mon Sep 17 00:00:00 2001 From: ihavecoke Date: Mon, 24 Nov 2025 22:21:17 +0800 Subject: [PATCH 2/4] . --- crates/workspace/src/notifications.rs | 8 +++++++- crates/zed/src/zed.rs | 20 ++++++-------------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/crates/workspace/src/notifications.rs b/crates/workspace/src/notifications.rs index 6c1156b83396d1..c0fd6a432337a0 100644 --- a/crates/workspace/src/notifications.rs +++ b/crates/workspace/src/notifications.rs @@ -777,7 +777,13 @@ pub mod simple_message_notification { fn render(&mut self, window: &mut Window, cx: &mut Context) -> impl IntoElement { NotificationFrame::new() .with_title(self.title.clone()) - .with_content((self.build_content)(window, cx)) + .with_content( + div() + .id("message-notification-content") + .max_h(vh(0.8, window)) + .overflow_y_scroll() + .child((self.build_content)(window, cx)), + ) .show_close_button(self.show_close_button) .show_suppress_button(self.show_suppress_button) .on_close(cx.listener(|_, suppress, _, cx| { diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index 614ab3a4274cc8..33a715283b9d63 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -1696,20 +1696,12 @@ fn show_markdown_app_notification( MessageNotification::new_from_builder(cx, move |window, cx| { image_cache(retain_all("notification-cache")) .text_xs() - .child( - div() - .id("parsed-markdown") - .max_h(vh(0.8, window)) - .overflow_y_scroll() - .child( - markdown_preview::markdown_renderer::render_parsed_markdown( - &parsed_markdown.clone(), - Some(workspace_handle.clone()), - window, - cx, - ), - ), - ) + .child(markdown_preview::markdown_renderer::render_parsed_markdown( + &parsed_markdown.clone(), + Some(workspace_handle.clone()), + window, + cx, + )) .into_any() }) .primary_message(primary_button_message) From b63afcd2f5df05a0af2e9b57d4fa661265624846 Mon Sep 17 00:00:00 2001 From: ihavecoke Date: Wed, 26 Nov 2025 00:16:24 +0800 Subject: [PATCH 3/4] . --- crates/workspace/src/notifications.rs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/crates/workspace/src/notifications.rs b/crates/workspace/src/notifications.rs index c0fd6a432337a0..87de9fa96a00e2 100644 --- a/crates/workspace/src/notifications.rs +++ b/crates/workspace/src/notifications.rs @@ -593,9 +593,9 @@ pub mod simple_message_notification { use gpui::{ AnyElement, DismissEvent, EventEmitter, FocusHandle, Focusable, ParentElement, Render, - SharedString, Styled, + ScrollHandle, SharedString, Styled, }; - use ui::prelude::*; + use ui::{ScrollAxes, WithScrollbar, prelude::*}; use crate::notifications::NotificationFrame; @@ -617,6 +617,7 @@ pub mod simple_message_notification { show_close_button: bool, show_suppress_button: bool, title: Option, + scroll_handle: ScrollHandle, } impl Focusable for MessageNotification { @@ -661,6 +662,7 @@ pub mod simple_message_notification { show_suppress_button: true, title: None, focus_handle: cx.focus_handle(), + scroll_handle: ScrollHandle::new(), } } @@ -779,10 +781,15 @@ pub mod simple_message_notification { .with_title(self.title.clone()) .with_content( div() - .id("message-notification-content") - .max_h(vh(0.8, window)) - .overflow_y_scroll() - .child((self.build_content)(window, cx)), + .child( + div() + .id("message-notification-content") + .max_h(vh(0.6, window)) + .overflow_y_scroll() + .track_scroll(&self.scroll_handle.clone()) + .child((self.build_content)(window, cx)), + ) + .vertical_scrollbar_for(self.scroll_handle.clone(), window, cx), ) .show_close_button(self.show_close_button) .show_suppress_button(self.show_suppress_button) From d6a7ccd7a171191af641b63462209d8228894973 Mon Sep 17 00:00:00 2001 From: ihavecoke Date: Wed, 26 Nov 2025 00:24:15 +0800 Subject: [PATCH 4/4] . --- crates/workspace/src/notifications.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/workspace/src/notifications.rs b/crates/workspace/src/notifications.rs index 87de9fa96a00e2..75c35cda22d72d 100644 --- a/crates/workspace/src/notifications.rs +++ b/crates/workspace/src/notifications.rs @@ -595,7 +595,7 @@ pub mod simple_message_notification { AnyElement, DismissEvent, EventEmitter, FocusHandle, Focusable, ParentElement, Render, ScrollHandle, SharedString, Styled, }; - use ui::{ScrollAxes, WithScrollbar, prelude::*}; + use ui::{WithScrollbar, prelude::*}; use crate::notifications::NotificationFrame;