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

Quick fix light bulb disappears before it can be clicked #17540

Closed
daviwil opened this issue Dec 19, 2016 · 16 comments
Closed

Quick fix light bulb disappears before it can be clicked #17540

daviwil opened this issue Dec 19, 2016 · 16 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-code-actions Editor inplace actions (Ctrl + .) verified Verification succeeded
Milestone

Comments

@daviwil
Copy link
Contributor

daviwil commented Dec 19, 2016

  • VSCode Version: 1.8.0
  • OS Version: Windows 10

Steps to Reproduce:

  1. Open a file which triggers a quick fix light bulb
  2. Hover the mouse over the light bulb
  3. Before you click, the light bulb disappears and switches to a breakpoint icon

Filing this on behalf of @wsmelton who filed the issue originally here: PowerShell/vscode-powershell#392

Sometimes the quick fix light bulb isn't clickable in the gutter:

quickfixissue

It seems there may be some conflict between the hover handlers of the breakpoint gutter and the lightbulb that should be showing up. Using Ctrl+. on the line invokes the quick fix menu correctly even though the lightbulb isn't clickable.

@egamma egamma added the editor-code-actions Editor inplace actions (Ctrl + .) label Dec 19, 2016
@jrieken jrieken added the bug Issue identified by VS Code Team member as probable bug label Dec 20, 2016
@jrieken jrieken added this to the January 2017 milestone Dec 20, 2016
@alexdima
Copy link
Member

I could still reproduce on Linux

@alexdima alexdima reopened this Jan 27, 2017
@alexdima alexdima added the verification-found Issue verification failed label Jan 27, 2017
@alexdima alexdima modified the milestones: February 2017, January 2017 Jan 27, 2017
@jrieken jrieken modified the milestones: March 2017, February 2017 Feb 21, 2017
@jrieken jrieken removed the verification-found Issue verification failed label Feb 21, 2017
@jrieken
Copy link
Member

jrieken commented Feb 21, 2017

@isidorn We need to sync on this. We both want to use the gutter for additional commands/menus and we should invent something like a editor gutter menu

@isidorn
Copy link
Contributor

isidorn commented Feb 21, 2017

@jrieken I am open for suggestions

@jrieken
Copy link
Member

jrieken commented Mar 8, 2017

@sandy081 sits in the same boot and should also join the party... screen shot 2017-03-08 at 15 17 05

@sandy081
Copy link
Member

sandy081 commented Mar 8, 2017

These edit icons are shown only on settings files.. Not sure if we can add break points there

@jrieken
Copy link
Member

jrieken commented Mar 8, 2017

There is a setting that allows breakpoints everywhere, then hit F9 while the edit icon show and screen cheese. Long story short: There are 3 custom ways to get a context menu and primary command with an icon in the gutter (breakpoints, settings, quick fix) and we should have something real, like a gutter-menu to prevent these collisions and workarounds

@jrieken
Copy link
Member

jrieken commented Mar 9, 2017

My proposal is to add a new menu ala editor/gutter/context to which we register commands. That menu will always show in the gutter of the active line and preview the first (most important) command in the gutter. Other commands will be in the context menu, like break points do it today.

screen shot 2017-03-09 at 11 56 45

@isidorn
Copy link
Contributor

isidorn commented Mar 9, 2017

@jrieken your proposal makes sense to me. We can look into this tomorrow in the office, or some time next week when it suits you.

jrieken added a commit that referenced this issue Mar 10, 2017
@jrieken
Copy link
Member

jrieken commented Mar 10, 2017

After understanding the whole richness and complexity of the debug glyph margin decoration we figured it's too much for the menu-story... Instead the light bulb uses the same implementation approach debug uses and therefore conflicts don't happen. Also, debug must check if a line has already a glyph margin decoration before adding one on mouse move, similar check before clicking...

My old code to check if the glyph margin has space. fyi @isidorn

private _hasSpaceInGlyphMargin(line: number): boolean {
	if (!this._editor.getRawConfiguration().glyphMargin) {
		return false;
	}
	const decorations = this._editor.getLineDecorations(line);
	if (decorations) {
		for (const {options} of decorations) {
			if (options.glyphMarginClassName) {
				return false;
			}
		}
	}
	return true;
}

@sandy081
Copy link
Member

@jrieken Do I need to do the same for Settings?

@isidorn
Copy link
Contributor

isidorn commented Mar 10, 2017

@sandy081 for now we can survive without that. Breakpoints will hide if there are any other decoarions on the line including yours

@jrieken
Copy link
Member

jrieken commented Mar 13, 2017

Breakpoints will hide if there are any other decoarions on the line including yours

Given @sandy081 uses a decoration to get wrench-icon into the glyph margin

@isidorn
Copy link
Contributor

isidorn commented Mar 13, 2017

@sandy081 ok so at least you should use an editor decoration with the glyp margin options to align with the rest of us

@sandy081
Copy link
Member

Ok. Will adopt. Reopening it.

@sandy081 sandy081 reopened this Mar 13, 2017
@sandy081
Copy link
Member

Adopted to use decorations. Closing it.

sandy081 added a commit that referenced this issue Mar 27, 2017
@alexdima
Copy link
Member

Works nicely now. Nice job!

@alexdima alexdima added the verified Verification succeeded label Mar 31, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug editor-code-actions Editor inplace actions (Ctrl + .) verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants