Browse Source

Updates option naming

main
Eric Amodio 1 year ago
parent
commit
2ce6ffe802
7 changed files with 14 additions and 14 deletions
  1. +1
    -1
      src/plus/webviews/focus/registration.ts
  2. +1
    -1
      src/plus/webviews/graph/registration.ts
  3. +1
    -1
      src/plus/webviews/timeline/registration.ts
  4. +1
    -1
      src/webviews/settings/registration.ts
  5. +1
    -1
      src/webviews/webviewController.ts
  6. +8
    -8
      src/webviews/webviewsController.ts
  7. +1
    -1
      src/webviews/welcome/registration.ts

+ 1
- 1
src/plus/webviews/focus/registration.ts View File

@ -15,7 +15,7 @@ export function registerFocusWebviewPanel(controller: WebviewsController) {
trackingFeature: 'focusWebview', trackingFeature: 'focusWebview',
plusFeature: true, plusFeature: true,
column: ViewColumn.Active, column: ViewColumn.Active,
panelOptions: {
webviewPanelOptions: {
retainContextWhenHidden: true, retainContextWhenHidden: true,
enableFindWidget: true, enableFindWidget: true,
}, },

+ 1
- 1
src/plus/webviews/graph/registration.ts View File

@ -24,7 +24,7 @@ export function registerGraphWebviewPanel(controller: WebviewsController) {
trackingFeature: 'graphWebview', trackingFeature: 'graphWebview',
plusFeature: true, plusFeature: true,
column: ViewColumn.Active, column: ViewColumn.Active,
panelOptions: {
webviewPanelOptions: {
retainContextWhenHidden: true, retainContextWhenHidden: true,
enableFindWidget: false, enableFindWidget: false,
}, },

+ 1
- 1
src/plus/webviews/timeline/registration.ts View File

@ -15,7 +15,7 @@ export function registerTimelineWebviewPanel(controller: WebviewsController) {
trackingFeature: 'timelineWebview', trackingFeature: 'timelineWebview',
plusFeature: true, plusFeature: true,
column: ViewColumn.Active, column: ViewColumn.Active,
panelOptions: {
webviewPanelOptions: {
retainContextWhenHidden: true, retainContextWhenHidden: true,
enableFindWidget: false, enableFindWidget: false,
}, },

+ 1
- 1
src/webviews/settings/registration.ts View File

@ -16,7 +16,7 @@ export function registerSettingsWebviewPanel(controller: WebviewsController) {
trackingFeature: 'settingsWebview', trackingFeature: 'settingsWebview',
plusFeature: false, plusFeature: false,
column: ViewColumn.Beside, column: ViewColumn.Beside,
panelOptions: {
webviewPanelOptions: {
retainContextWhenHidden: false, retainContextWhenHidden: false,
enableFindWidget: true, enableFindWidget: true,
}, },

+ 1
- 1
src/webviews/webviewController.ts View File

@ -147,7 +147,7 @@ export class WebviewController<
public readonly parent: GetParentType<Descriptor>, public readonly parent: GetParentType<Descriptor>,
resolveProvider: ( resolveProvider: (
container: Container, container: Container,
host: WebviewController<State, SerializedState>,
controller: WebviewController<State, SerializedState>,
) => Promise<WebviewProvider<State, SerializedState>>, ) => Promise<WebviewProvider<State, SerializedState>>,
) { ) {
this.id = descriptor.id; this.id = descriptor.id;

+ 8
- 8
src/webviews/webviewsController.ts View File

@ -23,8 +23,8 @@ export interface WebviewPanelDescriptor {
readonly trackingFeature: TrackedUsageFeatures; readonly trackingFeature: TrackedUsageFeatures;
readonly plusFeature: boolean; readonly plusFeature: boolean;
readonly column?: ViewColumn; readonly column?: ViewColumn;
readonly options?: WebviewOptions;
readonly panelOptions?: WebviewPanelOptions;
readonly webviewOptions?: WebviewOptions;
readonly webviewPanelOptions?: WebviewPanelOptions;
} }
interface WebviewPanelRegistration<State, SerializedState = State> { interface WebviewPanelRegistration<State, SerializedState = State> {
@ -48,7 +48,7 @@ export interface WebviewViewDescriptor {
readonly contextKeyPrefix: `gitlens:webviewView:${WebviewViewIds}`; readonly contextKeyPrefix: `gitlens:webviewView:${WebviewViewIds}`;
readonly trackingFeature: TrackedUsageFeatures; readonly trackingFeature: TrackedUsageFeatures;
readonly plusFeature: boolean; readonly plusFeature: boolean;
readonly options?: WebviewOptions;
readonly webviewOptions?: WebviewOptions;
readonly webviewViewOptions?: { readonly webviewViewOptions?: {
readonly retainContextWhenHidden?: boolean; readonly retainContextWhenHidden?: boolean;
}; };
@ -83,7 +83,7 @@ export class WebviewsController implements Disposable {
descriptor: WebviewViewDescriptor, descriptor: WebviewViewDescriptor,
resolveProvider: ( resolveProvider: (
container: Container, container: Container,
host: WebviewController<State, SerializedState>,
controller: WebviewController<State, SerializedState>,
) => Promise<WebviewProvider<State, SerializedState>>, ) => Promise<WebviewProvider<State, SerializedState>>,
canResolveProvider?: () => boolean | Promise<boolean>, canResolveProvider?: () => boolean | Promise<boolean>,
): WebviewViewProxy { ): WebviewViewProxy {
@ -113,7 +113,7 @@ export class WebviewsController implements Disposable {
enableCommandUris: true, enableCommandUris: true,
enableScripts: true, enableScripts: true,
localResourceRoots: [Uri.file(this.container.context.extensionPath)], localResourceRoots: [Uri.file(this.container.context.extensionPath)],
...descriptor.options,
...descriptor.webviewOptions,
}; };
webviewView.title = descriptor.title; webviewView.title = descriptor.title;
@ -175,7 +175,7 @@ export class WebviewsController implements Disposable {
descriptor: WebviewPanelDescriptor, descriptor: WebviewPanelDescriptor,
resolveProvider: ( resolveProvider: (
container: Container, container: Container,
host: WebviewController<State, SerializedState>,
controller: WebviewController<State, SerializedState>,
) => Promise<WebviewProvider<State, SerializedState>>, ) => Promise<WebviewProvider<State, SerializedState>>,
canResolveProvider?: () => boolean | Promise<boolean>, canResolveProvider?: () => boolean | Promise<boolean>,
): WebviewPanelProxy { ): WebviewPanelProxy {
@ -218,8 +218,8 @@ export class WebviewsController implements Disposable {
enableScripts: true, enableScripts: true,
localResourceRoots: [Uri.file(container.context.extensionPath)], localResourceRoots: [Uri.file(container.context.extensionPath)],
}, },
...descriptor.options,
...descriptor.panelOptions,
...descriptor.webviewOptions,
...descriptor.webviewPanelOptions,
}, },
); );
panel.iconPath = Uri.file(container.context.asAbsolutePath(descriptor.iconPath)); panel.iconPath = Uri.file(container.context.asAbsolutePath(descriptor.iconPath));

+ 1
- 1
src/webviews/welcome/registration.ts View File

@ -15,7 +15,7 @@ export function registerWelcomeWebviewPanel(controller: WebviewsController) {
trackingFeature: 'welcomeWebview', trackingFeature: 'welcomeWebview',
plusFeature: false, plusFeature: false,
column: ViewColumn.Beside, column: ViewColumn.Beside,
panelOptions: {
webviewPanelOptions: {
retainContextWhenHidden: false, retainContextWhenHidden: false,
enableFindWidget: true, enableFindWidget: true,
}, },

Loading…
Cancel
Save