Update IDs on interactive elements in LSP log viewer (#3133)

This PR fixes a panic in the LSP log viewer when rendering the popover
UI. This did not ship to preview or stable, and so does not require a
release note.

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki 2023-10-17 02:27:37 -07:00 committed by GitHub
commit adabf0107f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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,