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
Fix background (again) for ipywidgets (#11062)
  • Loading branch information
rchiodo committed Apr 9, 2020
commit 57d5871ff2133b7b210bd2a1d425d309994d6ae9
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 @@ -563,15 +563,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 @@ -942,6 +933,15 @@ export class DataScienceIocContainer extends UnitTestIocContainer {
InterpeterHashProviderFactory,
InterpeterHashProviderFactory
);
this.serviceManager.addSingleton<IInterpreterSecurityService>(
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