Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hover commands are off #242040

Open
bpasero opened this issue Feb 26, 2025 · 1 comment
Open

Hover commands are off #242040

bpasero opened this issue Feb 26, 2025 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug workbench-hover Hover issues in the workbench
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Feb 26, 2025

Notice how the command is offscreen:

Image

Steps to Reproduce:

  1. open chatStatus.ts
  2. change getEntryProps to return this:
return {
			name: localize('chatStatus', "Copilot Status"),
			text,
			ariaLabel,
			command,
			showInAllWindows: true,
			kind: 'copilot',
			tooltip: {
				content: () => {
					const container = $('div.chat-status-bar-entry-tooltip');

					if (this.contextKeyService.getContextKeyValue<boolean>(ChatContextKeys.Setup.pro.key) === true) {
						container.appendChild($('div', undefined, localize('proTitle', "You are using Copilot Pro")));
						container.appendChild($('hr'));
					}

					// Settings
					this.createSettings(container, disposables);

					// Shortcuts
					container.appendChild($('hr'));
					this.createShortcuts(container, disposables);

					return container;
				},
				commands: [{
					id: TOGGLE_CHAT_ACTION_ID,
					title: 'Toggle'
				}]
			}
		};
@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug workbench-hover Hover issues in the workbench labels Feb 26, 2025
@benibenj benibenj added this to the March 2025 milestone Feb 26, 2025
@benibenj
Copy link
Contributor

benibenj commented Mar 3, 2025

There are some weird margins being set here which are causing this. The hover is being set as right-aligned as it would overflow the window.

.monaco-workbench .workbench-hover.right-aligned .hover-row.status-bar .actions .action-container {
margin-right: 0;
margin-left: 16px;
}

Looking at the history of the change it looks like it was introduced for the terminal hover. I do not think the terminal uses this anymore. Removing the margins fixes the problem. What do you think @Tyriar, can we remove them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug workbench-hover Hover issues in the workbench
Projects
None yet
Development

No branches or pull requests

3 participants