Skip to content

Commit

Permalink
create stand-in declaration for contribViewsWelcome and adopt for git…
Browse files Browse the repository at this point in the history
…-extension, #131165
  • Loading branch information
jrieken committed Nov 12, 2021
1 parent e6a106f commit d775c73
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions extensions/git/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
"enabledApiProposals": [
"diffCommand",
"contribViewsWelcome",
"scmActionButton",
"scmSelectedProvider",
"scmValidation",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function parseGroupAndOrder(welcome: ViewWelcome, contribution: IExtensionPointU
let group: string | undefined;
let order: number | undefined;
if (welcome.group) {
if (!isProposedApiEnabled(contribution.description, undefined)) {
if (!isProposedApiEnabled(contribution.description, 'contribViewsWelcome')) {
contribution.collector.warn(nls.localize('ViewsWelcomeExtensionPoint.proposedAPI', "The viewsWelcome contribution in '{0}' requires 'enableProposedApi' to be enabled.", contribution.description.identifier.value));

This comment has been minimized.

Copy link
@gjsjohnmurray

gjsjohnmurray Nov 12, 2021

Contributor

Could this message be improved to state that it's the presence of the 'group' property in the contribution which is causing this?

Also, perhaps the text at

description: nls.localize('contributes.viewsWelcome.view.group', "Group to which this welcome content belongs."),
should mention that the 'group' property is proposed API.

This comment has been minimized.

Copy link
@jrieken

jrieken Nov 12, 2021

Author Member

This comment has been minimized.

Copy link
@joaomoreno

joaomoreno Nov 12, 2021

Member

👌 b78b727

cc @aeschli

return { group, order };
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

export const allApiProposals = Object.freeze({
authSession: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.authSession.d.ts',
contribViewsWelcome: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts',
customEditorMove: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.customEditorMove.d.ts',
diffCommand: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.diffCommand.d.ts',
documentFiltersExclusive: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.documentFiltersExclusive.d.ts',
Expand Down
6 changes: 6 additions & 0 deletions src/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

// empty place holder declaration for the `viewsWelcome`-contribution point

0 comments on commit d775c73

Please sign in to comment.