Skip to content

fix: Param helper hover getting cut off at bottom - #112019

Merged
Matt Bierner (mjbvz) merged 2 commits into
microsoft:masterfrom
chenjigeng:fix/helper-hover
Dec 8, 2020
Merged

Matt Bierner (mjbvz) merged 2 commits into
microsoft:masterfrom
chenjigeng:fix/helper-hover

Conversation

@chenjigeng

Copy link
Copy Markdown
Contributor

This PR fixes #105422

asyncRenderCallback: () => {
this.domNodes?.scrollbar.scanDomNode();
}
}));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This line and the lines surrounding lines are a duplicate of line 228-232. Other than the dom element target (documentation or dom variable). Should we refactor to bring these into the same place e.g.

		if (typeof signature.documentation === 'string') {
			dom.append(this.domNodes.docs, $('p', {}, signature.documentation));
		} else {
			const renderedContents = this.renderDisposeables.add(this.markdownRenderer.render(signature.documentation));
			const renderedContents = this.renderDisposeables.add(this.markdownRenderer.render(signature.documentation, {
				asyncRenderCallback: () => {
					this.domNodes?.scrollbar.scanDomNode();
				}
			}));
			renderedContents.element.classList.add('markdown-docs');
			const target = activeParameter?.documentation ?? dom;
			target.append(this.domNodes.docs, renderedContents.element);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

just like this?

private renderMarkdownDocs(markdown: IMarkdownString | undefined): IMarkdownRenderResult {
		const renderedContents = this.renderDisposeables.add(this.markdownRenderer.render(markdown, {
			asyncRenderCallback: () => {
				this.domNodes?.scrollbar.scanDomNode();
			}
		}));
		renderedContents.element.classList.add('markdown-docs');
		return renderedContents;
	}

@rheh Ray Hammond (rheh) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@joaomoreno João Moreno (joaomoreno) added the editor-parameter-hints Function, method and class parameter hint widget label Dec 8, 2020
@chenjigeng

Copy link
Copy Markdown
Contributor Author

João Moreno (@joaomoreno) Can you help take a look at this PR

@mjbvz Matt Bierner (mjbvz) self-assigned this Dec 8, 2020
@mjbvz
Matt Bierner (mjbvz) merged commit d66e65f into microsoft:master Dec 8, 2020
@mjbvz

Copy link
Copy Markdown
Contributor

Thanks! Should be available in the first VS Code 1.53 insiders builds

@joaomoreno João Moreno (joaomoreno) removed their assignment Dec 9, 2020
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

editor-parameter-hints Function, method and class parameter hint widget

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Param helper hover getting cut off at bottom

4 participants