Skip to content

add tips toolbar#295175

Merged
meganrogge merged 8 commits intomainfrom
merogge/tips-toolbar
Feb 13, 2026
Merged

add tips toolbar#295175
meganrogge merged 8 commits intomainfrom
merogge/tips-toolbar

Conversation

@meganrogge
Copy link
Collaborator

@meganrogge meganrogge commented Feb 13, 2026

fix #295172

To do:

  • move tip toolbar up so still overlap but not with text
  • add disable tips action
  • add keybindings for these actions with when tips container focused for screen reader users
tips-demo.mov

Copilot AI review requested due to automatic review settings February 13, 2026 14:03
@meganrogge meganrogge marked this pull request as draft February 13, 2026 14:04
@meganrogge meganrogge marked this pull request as draft February 13, 2026 14:04
@meganrogge meganrogge self-assigned this Feb 13, 2026
@meganrogge meganrogge added this to the February 2026 milestone Feb 13, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a toolbar with previous, next, and dismiss buttons to the chat tip widget, addressing issue #295172. The toolbar appears on hover/focus and provides navigation through available tips without permanently dismissing them.

Changes:

  • Added CSS styling for the new toolbar with fade-in/fade-out transitions on hover/focus
  • Implemented three toolbar actions (previous, next, dismiss) and registered them to a new MenuId
  • Added navigation methods to ChatTipService to cycle through non-dismissed tips
  • Integrated MenuWorkbenchToolBar into ChatTipContentPart to render the toolbar

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
chatTipContent.css Added CSS for toolbar positioning, fade transitions, and button styling
chatTipContentPart.ts Added toolbar instantiation in _renderTip, registered three new Action2 classes for navigation and dismiss, added _suppressNextDismissHandler flag
chatTipService.ts Added navigateToNextTip and navigateToPreviousTip methods to IChatTipService interface, implemented _navigateTip helper method
actions.ts Registered new MenuId.ChatTipToolbar for the tip toolbar menu
Comments suppressed due to low confidence (4)

src/vs/workbench/contrib/chat/browser/chatTipService.ts:801

  • If all tips except the current one are dismissed, navigation returns undefined instead of staying on the current tip or wrapping to the current tip. This differs from the behavior in _pickTip() which has a fallback to always return a tip (line 758). Consider either returning the current tip when no other tips are available, or wrapping back to the current tip after checking all possibilities.
			const idx = ((currentIndex + direction * i) % TIP_CATALOG.length + TIP_CATALOG.length) % TIP_CATALOG.length;
			const candidate = TIP_CATALOG[idx];

src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.ts:174

  • The navigation action calls navigateToNextTip but ignores the returned tip and doesn't trigger any UI update. The same issue exists as in the previous action - clicking next/previous won't actually change the displayed tip.
		const contextKeyService = accessor.get(IContextKeyService);
		chatTipService.navigateToNextTip(contextKeyService);
	}
});

src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.ts:69

  • The _suppressNextDismissHandler flag is set but never actually set to true anywhere. The intent seems to be to prevent the dismiss event from triggering when navigating to a new tip, but since navigation doesn't fire the dismiss event (and doesn't update the UI at all), this flag is currently unused. Once navigation is fixed to properly update the UI, you'll need to either fire a dismiss event and use this flag, or implement a different event like onDidNavigateTip.
				this._renderTip(nextTip);
			} else {
				this._onDidHide.fire();
			}

src/vs/workbench/contrib/chat/browser/chatTipService.ts:780

  • The _contextKeyService parameter is prefixed with underscore (indicating it's unused) but is declared as a parameter. If the context key service isn't needed for eligibility checks in navigation, it shouldn't be passed as a parameter. If it is needed, remove the underscore prefix and use it to call _isEligible() similar to how _pickTip() works.
	navigateToNextTip(contextKeyService: IContextKeyService): IChatTip | undefined {

@meganrogge meganrogge marked this pull request as ready for review February 13, 2026 15:24
@meganrogge meganrogge enabled auto-merge (squash) February 13, 2026 15:25
@meganrogge meganrogge merged commit 2a69f02 into main Feb 13, 2026
18 checks passed
@meganrogge meganrogge deleted the merogge/tips-toolbar branch February 13, 2026 16:00
@meganrogge meganrogge changed the title add tips toolbar add tips toolbar Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add next, previous, dismiss toolbar to tip widget

2 participants