Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/2 Fixes/11060.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Make sure ipywidgets have a white background so they display in dark themes.
7 changes: 5 additions & 2 deletions src/datascience-ui/interactive-common/cellOutput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,13 @@ export class CellOutput extends React.Component<ICellOutputProps> {
? `cell-output cell-output-${this.props.baseTheme}`
: 'markdown-cell-output-container';

// Then combine them inside a div
// Then combine them inside a div. IPyWidget ref has to be separate so we don't end up
// with a div in the way. If we try setting all div's background colors, we break
// some widgets
return (
<div className={outputClassNames} ref={this.ipyWidgetRef}>
<div className={outputClassNames}>
{this.renderResults()}
<div className="cell-output-ipywidget-background" ref={this.ipyWidgetRef}></div>
</div>
);
}
Expand Down
18 changes: 9 additions & 9 deletions src/test/datascience/dataScienceIocContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -565,15 +565,6 @@ export class DataScienceIocContainer extends UnitTestIocContainer {
this.serviceManager.addSingleton<ICodeCssGenerator>(ICodeCssGenerator, CodeCssGenerator);
this.serviceManager.addSingleton<IStatusProvider>(IStatusProvider, StatusProvider);
this.serviceManager.addSingleton<IInterpreterPathService>(IInterpreterPathService, InterpreterPathService);
this.serviceManager.addSingleton<IInterpreterSecurityService>(
IInterpreterSecurityService,
InterpreterSecurityService
);
this.serviceManager.addSingleton<IInterpreterSecurityStorage>(
IInterpreterSecurityStorage,
InterpreterSecurityStorage
);
this.serviceManager.addSingleton<IInterpreterEvaluation>(IInterpreterEvaluation, InterpreterEvaluation);
this.serviceManager.addSingleton<IBrowserService>(IBrowserService, BrowserService);
this.serviceManager.addSingletonInstance<IAsyncDisposableRegistry>(
IAsyncDisposableRegistry,
Expand Down Expand Up @@ -944,6 +935,15 @@ export class DataScienceIocContainer extends UnitTestIocContainer {
InterpeterHashProviderFactory,
InterpeterHashProviderFactory
);
this.serviceManager.addSingleton<IInterpreterSecurityService>(
Copy link
Author

Choose a reason for hiding this comment

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

@karrtikr unfortunately the real interpreter services are registered when we use real jupyter, so these additions were in the wrong spot. They had to fall under the if for when not using the real jupyter.

Choose a reason for hiding this comment

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

unfortunately the real interpreter services are registered

I see. But do these real interpreter services do not need to register IInterpreterSecurityService? Or was it the case that it was being registered twice?

Copy link
Author

Choose a reason for hiding this comment

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

It was being registered twice when using real jupyter (causing an ambiguous match exception)

IInterpreterSecurityService,
InterpreterSecurityService
);
this.serviceManager.addSingleton<IInterpreterSecurityStorage>(
IInterpreterSecurityStorage,
InterpreterSecurityStorage
);
this.serviceManager.addSingleton<IInterpreterEvaluation>(IInterpreterEvaluation, InterpreterEvaluation);
this.serviceManager.addSingleton<WindowsStoreInterpreter>(WindowsStoreInterpreter, WindowsStoreInterpreter);
this.serviceManager.addSingleton<InterpreterHashProvider>(InterpreterHashProvider, InterpreterHashProvider);
this.serviceManager.addSingleton<InterpreterFilter>(InterpreterFilter, InterpreterFilter);
Expand Down