Avoid redundant breadcrumbs scroll updates while preserving revealLast UX#315384
Avoid redundant breadcrumbs scroll updates while preserving revealLast UX#315384Copilot wants to merge 3 commits into
Conversation
Co-authored-by: dmitrivMS <9581278+dmitrivMS@users.noreply.github.com>
Co-authored-by: dmitrivMS <9581278+dmitrivMS@users.noreply.github.com>
You’re right to call that out. I adjusted this in I reverted |
|
Closing in favor of #315385, which folds in the same "skip redundant scroll update when aligned" optimization (generalized via |
Description
The perf sample points to breadcrumb reveal work on editor-open/update paths.
After feedback, the fix was adjusted to preserve existing
revealLast()UX (including behavior related to #168824) while still removing redundant hot-path work.Changes made
revealLast()using non-minimal reveal semantics:_reveal(...)to no-op when the target item is already aligned:node.offsetLeft === scrollLeftsetScrollPosition/scroll-toggle calls without changing reveal behavior.Test updates
src/vs/base/test/browser/ui/breadcrumbs/breadcrumbsWidget.test.tsTesting
npm run transpile-clientnode test/unit/browser/index.js --run src/vs/base/test/browser/ui/breadcrumbs/breadcrumbsWidget.test.ts --browser chromiumnpm run compile-check-ts-native