Skip to content

Commit

Permalink
No more css and themes on the web views (#10119)
Browse files Browse the repository at this point in the history
* webviewHost.node.ts -> src/webviews/extension-side/webviewHost.ts

* removing CSS and Theme references from webviewHost and webviewViewHost

* Feedback from Don?
  • Loading branch information
sadasant authored May 25, 2022
1 parent bc74fc7 commit 284bea7
Show file tree
Hide file tree
Showing 21 changed files with 65 additions and 700 deletions.
6 changes: 3 additions & 3 deletions src/platform/messageTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ export interface INotebookModelVersionChange extends INotebookModelChange {

export enum CssMessages {
GetCssRequest = 'get_css_request',
GetCssResponse = 'get_css_response'
GetCssResponse = 'get_css_response',
GetTheme = 'get_theme'
}

export enum SharedMessages {
Expand All @@ -268,8 +269,7 @@ export interface IGetCssRequest {
}

export interface IGetCssResponse {
css: string;
theme: string;
isDark: boolean;
}

export type NotebookModelChange =
Expand Down
5 changes: 0 additions & 5 deletions src/platform/serviceRegistry.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { registerTypes as registerDevToolTypes } from './devTools/serviceRegistr
import { DataScienceStartupTime } from './common/constants';
import { LogReplayService } from '../intellisense/logReplayService.node';
import { Activation } from '../kernels/activation.node';
import { CodeCssGenerator } from '../webviews/extension-side/codeCssGenerator.node';
import { DataViewer } from '../webviews/extension-side/dataviewer/dataViewer.node';
import { DataViewerDependencyService } from '../webviews/extension-side/dataviewer/dataViewerDependencyService.node';
import { DataViewerFactory } from '../webviews/extension-side/dataviewer/dataViewerFactory';
Expand All @@ -23,8 +22,6 @@ import {
import { PlotViewer } from '../webviews/extension-side/plotting/plotViewer.node';
import { PlotViewerProvider } from '../webviews/extension-side/plotting/plotViewerProvider.node';
import { IPlotViewer, IPlotViewerProvider } from '../webviews/extension-side/plotting/types';
import { ThemeFinder } from '../webviews/extension-side/themeFinder.node';
import { ICodeCssGenerator, IThemeFinder } from '../webviews/extension-side/types';
import { NotebookWatcher } from '../webviews/extension-side/variablesView/notebookWatcher';
import { INotebookWatcher } from '../webviews/extension-side/variablesView/types';
import { IExtensionSingleActivationService, IExtensionSyncActivationService } from './activation/types';
Expand Down Expand Up @@ -96,7 +93,6 @@ export function registerTypes(context: IExtensionContext, serviceManager: IServi
IDataViewerDependencyService,
DataViewerDependencyService
);
serviceManager.addSingleton<ICodeCssGenerator>(ICodeCssGenerator, CodeCssGenerator);
serviceManager.addSingleton<IExtensionSingleActivationService>(IExtensionSingleActivationService, GlobalActivation);
serviceManager.addSingleton<IDataScienceCommandListener>(IDataScienceCommandListener, GitHubIssueCommandListener);
serviceManager.addSingleton<IDataViewerFactory>(IDataViewerFactory, DataViewerFactory);
Expand All @@ -112,7 +108,6 @@ export function registerTypes(context: IExtensionContext, serviceManager: IServi
}
serviceManager.addSingleton<IPlotViewerProvider>(IPlotViewerProvider, PlotViewerProvider);
serviceManager.addSingleton<IStatusProvider>(IStatusProvider, StatusProvider);
serviceManager.addSingleton<IThemeFinder>(IThemeFinder, ThemeFinder);
serviceManager.addSingleton<ProgressReporter>(ProgressReporter, ProgressReporter);
serviceManager.addSingleton<IFileConverter>(IFileConverter, FileConverter);
serviceManager.addSingleton<ExportInterpreterFinder>(ExportInterpreterFinder, ExportInterpreterFinder);
Expand Down
9 changes: 0 additions & 9 deletions src/test/datascience/data-viewing/dataViewer.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,15 @@ import { JupyterSettings } from '../../../platform/common/configSettings';
import { ConfigurationService } from '../../../platform/common/configuration/service.node';
import { IConfigurationService } from '../../../platform/common/types';
import { IDataScienceErrorHandler } from '../../../platform/errors/types';
import { CodeCssGenerator } from '../../../webviews/extension-side/codeCssGenerator.node';
import { DataViewer } from '../../../webviews/extension-side/dataviewer/dataViewer.node';
import { JupyterVariableDataProvider } from '../../../webviews/extension-side/dataviewer/jupyterVariableDataProvider';
import { IDataViewer, IDataViewerDataProvider } from '../../../webviews/extension-side/dataviewer/types';
import { ThemeFinder } from '../../../webviews/extension-side/themeFinder.node';
import { ICodeCssGenerator, IThemeFinder } from '../../../webviews/extension-side/types';
import { MockMemento } from '../../mocks/mementos';

suite('DataScience - DataViewer', () => {
let dataViewer: IDataViewer;
let webPanelProvider: IWebviewPanelProvider;
let configService: IConfigurationService;
let codeCssGenerator: ICodeCssGenerator;
let themeFinder: IThemeFinder;
let workspaceService: IWorkspaceService;
let applicationShell: IApplicationShell;
let dataProvider: IDataViewerDataProvider;
Expand All @@ -39,8 +34,6 @@ suite('DataScience - DataViewer', () => {
setup(async () => {
webPanelProvider = mock(WebviewPanelProvider);
configService = mock(ConfigurationService);
codeCssGenerator = mock(CodeCssGenerator);
themeFinder = mock(ThemeFinder);
workspaceService = mock(WorkspaceService);
applicationShell = mock(ApplicationShell);
dataProvider = mock(JupyterVariableDataProvider);
Expand All @@ -58,8 +51,6 @@ suite('DataScience - DataViewer', () => {
dataViewer = new DataViewer(
instance(webPanelProvider),
instance(configService),
instance(codeCssGenerator),
instance(themeFinder),
instance(workspaceService),
instance(applicationShell),
new MockMemento(),
Expand Down
Loading

0 comments on commit 284bea7

Please sign in to comment.