[WIP] Agents web: native scroll#316697
Draft
osortega wants to merge 1 commit into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds mobile web-specific chat behavior to use native browser touch scrolling and selection/copy affordances for chat transcripts, while plumbing native overflow scrolling support through the shared list/tree/scrollable infrastructure.
Changes:
- Adds mobile chat contribution/bootstrap, CSS, and mobile web detection.
- Adds chat widget lifecycle removal events and native touch scroll enablement APIs.
- Extends list/tree/scrollable components with native overflow scroll mode.
Show a summary per file
| File | Description |
|---|---|
src/vs/workbench/test/browser/workbenchTestServices.ts |
Updates chat widget test service for widget removal events. |
src/vs/workbench/contrib/chat/test/browser/widget/mockChatWidget.ts |
Updates mock chat widget service for widget removal events. |
src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.ts |
Emits widget removal lifecycle events. |
src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts |
Adds native touch scroll enablement for chat widgets. |
src/vs/workbench/contrib/chat/browser/widget/chatListWidget.ts |
Exposes transcript list container and native overflow toggle. |
src/vs/workbench/contrib/chat/browser/mobile/media/chat.mobile.css |
Adds mobile-scoped chat selection, toolbar, and scroll CSS. |
src/vs/workbench/contrib/chat/browser/mobile/isMobileWebPhone.ts |
Adds mobile web phone detection helper. |
src/vs/workbench/contrib/chat/browser/mobile/chatMobileBootstrap.ts |
Applies mobile overrides to individual chat widgets. |
src/vs/workbench/contrib/chat/browser/mobile/chat.mobile.contribution.ts |
Registers mobile chat behavior and widget lifecycle handling. |
src/vs/workbench/contrib/chat/browser/chat.ts |
Extends chat widget/service interfaces. |
src/vs/workbench/contrib/chat/browser/chat.contribution.ts |
Registers the mobile chat contribution. |
src/vs/platform/list/browser/listService.ts |
Passes native overflow option through workbench tree options. |
src/vs/base/browser/ui/tree/abstractTree.ts |
Exposes native overflow toggle on trees. |
src/vs/base/browser/ui/scrollbar/scrollableElementOptions.ts |
Adds native overflow scroll option types. |
src/vs/base/browser/ui/scrollbar/scrollableElement.ts |
Implements native overflow scroll mode in scrollable elements. |
src/vs/base/browser/ui/list/listWidget.ts |
Exposes native overflow support on lists. |
src/vs/base/browser/ui/list/listView.ts |
Implements native overflow layout mode for virtualized lists. |
src/vs/base/browser/ui/list/list.css |
Adds list CSS for native overflow touch behavior. |
Copilot's findings
- Files reviewed: 18/18 changed files
- Comments generated: 3
Comment on lines
+34
to
+35
| const mm = mainWindow.matchMedia?.('(pointer: coarse) and (hover: none)'); | ||
| cached = !!mm?.matches; |
| const dims = this._scrollable.getScrollDimensions(); | ||
| this._contentNode.style.height = `${dims.scrollHeight}px`; | ||
| if (dims.scrollWidth > dims.width) { | ||
| this._contentNode.style.width = `${dims.scrollWidth}px`; |
Comment on lines
+554
to
+568
| setUseNativeOverflowScroll(enabled: boolean): void { | ||
| if (this._useNativeOverflowScroll === enabled) { | ||
| return; | ||
| } | ||
| this._useNativeOverflowScroll = enabled; | ||
| this.domNode.classList.toggle('native-overflow-scroll', enabled); | ||
| this._applyRowsContainerTransformStyle(); | ||
| this.scrollableElement.setUseNativeOverflowScroll(enabled); | ||
|
|
||
| // Re-render at the current scroll position so row top offsets are recomputed for | ||
| // the new (translate vs. absolute) layout, and re-emit scroll dimensions so the | ||
| // content node is sized to `scrollHeight` for native mode. | ||
| this.eventuallyUpdateScrollDimensions(); | ||
| const previousRenderRange = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight); | ||
| this.render(previousRenderRange, this.lastRenderTop, this.lastRenderHeight, undefined, undefined, true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.