Update IDs on interactive elements in LSP log viewer

This commit is contained in:
Mikayla 2023-10-17 02:22:34 -07:00
parent b168bded1d
commit a81484f13f
No known key found for this signature in database

View file

@ -685,6 +685,7 @@ impl View for LspLogToolbarItemView {
}); });
let server_selected = current_server.is_some(); let server_selected = current_server.is_some();
enum LspLogScroll {}
enum Menu {} enum Menu {}
let lsp_menu = Stack::new() let lsp_menu = Stack::new()
.with_child(Self::render_language_server_menu_header( .with_child(Self::render_language_server_menu_header(
@ -697,7 +698,7 @@ impl View for LspLogToolbarItemView {
Overlay::new( Overlay::new(
MouseEventHandler::new::<Menu, _>(0, cx, move |_, cx| { MouseEventHandler::new::<Menu, _>(0, cx, move |_, cx| {
Flex::column() Flex::column()
.scrollable::<Self>(0, None, cx) .scrollable::<LspLogScroll>(0, None, cx)
.with_children(menu_rows.into_iter().map(|row| { .with_children(menu_rows.into_iter().map(|row| {
Self::render_language_server_menu_item( Self::render_language_server_menu_item(
row.server_id, row.server_id,
@ -876,6 +877,7 @@ impl LspLogToolbarItemView {
) -> impl Element<Self> { ) -> impl Element<Self> {
enum ActivateLog {} enum ActivateLog {}
enum ActivateRpcTrace {} enum ActivateRpcTrace {}
enum LanguageServerCheckbox {}
Flex::column() Flex::column()
.with_child({ .with_child({
@ -921,7 +923,7 @@ impl LspLogToolbarItemView {
.with_height(theme.toolbar_dropdown_menu.row_height), .with_height(theme.toolbar_dropdown_menu.row_height),
) )
.with_child( .with_child(
ui::checkbox_with_label::<Self, _, Self, _>( ui::checkbox_with_label::<LanguageServerCheckbox, _, Self, _>(
Empty::new(), Empty::new(),
&theme.welcome.checkbox, &theme.welcome.checkbox,
rpc_trace_enabled, rpc_trace_enabled,