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

Fix #90093 #90096

Merged
merged 1 commit into from
Feb 5, 2020
Merged

Fix #90093 #90096

merged 1 commit into from
Feb 5, 2020

Conversation

octref
Copy link
Contributor

@octref octref commented Feb 5, 2020

Fix #90093

Explanation:

We have roughly this display for suggest label:

/**
 * Flexbox
 * < ------- left ------- >     < -------- right -------- >
 * <icon><label><signature>     <qualifier><type><readmore>
 */

Previously I set a left margin for right, so left and right side wouldn't touch each other.
Now I set the margin for qualifier, type and readmore individually, so that if they are shown, they would have enough space to the left because of their own margin-left:

image

@octref octref added this to the January 2020 milestone Feb 5, 2020
Copy link
Member

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

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

Can qualifier and type show up at the same time? What does that look like after this PR?

@octref
Copy link
Contributor Author

octref commented Feb 5, 2020

@Tyriar Sorry, I forgot to update the code comment...We recently changed qualifier to be displayed right after signature.

/**
 * Flexbox
 * < ------------- left ------------ >     < --- right -- >
 * <icon><label><signature><qualifier>     <type><readmore>
 */

image

Code:

vscode.languages.registerCompletionItemProvider('plaintext', {
	provideCompletionItems() {
		return {
			isIncomplete: false,
			items: [
				{
					label: 'foooooooooo',
					label2: {
						name: 'foooooooooo',
						signature: '(bar)',
						qualifier: 'baz.foo',
						type: 'MyTypeMyTypeMyType'
					},
					documentation: 'my documentation',
					detail: 'my detail'
				},
				{
					label: 'foo2',
					label2: {
						name: 'foo2',
						signature: '(bar)',
						qualifier: 'baz.foo',
						type: 'MyType'
					},
					documentation: 'my documentation',
					detail: 'my detail'
				}
			]
		}
	}
})

@sbatten sbatten merged commit ae08d54 into release/1.42 Feb 5, 2020
@sbatten sbatten deleted the pine/90093 branch February 5, 2020 19:39
alexdima pushed a commit that referenced this pull request Feb 10, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants