extensions_ui : Scroll to top on filter change (#27305)

Closes #27100


https://github.com/user-attachments/assets/0fc1409d-01c1-4caa-a2ed-762c8951930f

Release Notes:

- N/A
This commit is contained in:
Smit Barmase 2025-03-22 18:38:01 +05:30 committed by GitHub
parent d96a50b029
commit 044eb7b990
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,9 +12,9 @@ use editor::{Editor, EditorElement, EditorStyle};
use extension_host::{ExtensionManifest, ExtensionOperation, ExtensionStore};
use fuzzy::{match_strings, StringMatchCandidate};
use gpui::{
actions, uniform_list, Action, App, ClipboardItem, Context, Entity, EventEmitter, Flatten,
Focusable, InteractiveElement, KeyContext, ParentElement, Render, Styled, Task, TextStyle,
UniformListScrollHandle, WeakEntity, Window,
actions, point, uniform_list, Action, App, ClipboardItem, Context, Entity, EventEmitter,
Flatten, Focusable, InteractiveElement, KeyContext, ParentElement, Render, Styled, Task,
TextStyle, UniformListScrollHandle, WeakEntity, Window,
};
use num_format::{Locale, ToFormattedString};
use project::DirectoryLister;
@ -23,8 +23,8 @@ use settings::Settings;
use strum::IntoEnumIterator as _;
use theme::ThemeSettings;
use ui::{
prelude::*, CheckboxWithLabel, ContextMenu, PopoverMenu, Scrollbar, ScrollbarState,
ToggleButton, Tooltip,
prelude::*, CheckboxWithLabel, ContextMenu, PopoverMenu, ScrollableHandle, Scrollbar,
ScrollbarState, ToggleButton, Tooltip,
};
use vim_mode_setting::VimModeSetting;
use workspace::{
@ -413,6 +413,7 @@ impl ExtensionsPage {
})
.map(|(ix, _)| ix),
);
self.list.set_offset(point(px(0.), px(0.)));
cx.notify();
}