Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
4348575
Disable loading scripts from unpkg for widgets
DonJayamanne Apr 2, 2020
cca2194
Oops
DonJayamanne Apr 2, 2020
f9cf82f
Updated
DonJayamanne Apr 2, 2020
dc69573
review fixes
DonJayamanne Apr 2, 2020
21e3191
Backup
DonJayamanne Apr 3, 2020
ebf5ea6
Merge branch 'master' into local2
DonJayamanne Apr 6, 2020
b399d2e
Merge branch 'master' into local2
DonJayamanne Apr 6, 2020
1675a7b
Merge branch 'master' into local2
DonJayamanne Apr 6, 2020
1ac4458
Ooops
DonJayamanne Apr 6, 2020
91f9d2d
Misc
DonJayamanne Apr 7, 2020
1dbf99d
Oops
DonJayamanne Apr 7, 2020
278341a
Merge branch 'master' into local2
DonJayamanne Apr 7, 2020
78564d6
Fixes
DonJayamanne Apr 7, 2020
544e740
misc
DonJayamanne Apr 8, 2020
19751e9
misc
DonJayamanne Apr 8, 2020
3b6861c
Merge branch 'master' into local2
DonJayamanne Apr 8, 2020
1df1e10
Remove
DonJayamanne Apr 8, 2020
11499bb
Fixes
DonJayamanne Apr 8, 2020
953b5c4
Changes
DonJayamanne Apr 8, 2020
4f71587
Merge branch 'master' into local2
DonJayamanne Apr 8, 2020
0f9a413
Fix casing
DonJayamanne Apr 9, 2020
2342dfc
Misc changes
DonJayamanne Apr 9, 2020
4afd7bf
Fixes
DonJayamanne Apr 9, 2020
1cf388e
Merge branch 'local3' into local2
DonJayamanne Apr 9, 2020
2ee0597
Merge branch 'master' into local2
DonJayamanne Apr 9, 2020
ddd1d9d
Oops
DonJayamanne Apr 9, 2020
f785d94
Remove azure ML
DonJayamanne Apr 9, 2020
aaf7407
Oops
DonJayamanne Apr 9, 2020
b0d436f
Rename test
DonJayamanne Apr 9, 2020
7a5f73c
Review fixes
DonJayamanne Apr 9, 2020
c4deb45
More fixes
DonJayamanne Apr 9, 2020
8e5ad7a
More changes
DonJayamanne Apr 9, 2020
3aba931
More changes
DonJayamanne Apr 9, 2020
f1a4c1b
Faster check
DonJayamanne Apr 9, 2020
798e8ee
More changes after discussion
DonJayamanne Apr 9, 2020
bfb7792
Fix tests
DonJayamanne Apr 9, 2020
dd87682
Fix tests
DonJayamanne Apr 9, 2020
ded7fbf
Fix
DonJayamanne Apr 9, 2020
075db59
Restore AML
DonJayamanne Apr 9, 2020
f8061fc
Final changes
DonJayamanne Apr 9, 2020
4a95e6c
Merge branch 'master' into local2
DonJayamanne Apr 9, 2020
3b91f08
Merged
DonJayamanne Apr 9, 2020
51b9803
Oops
DonJayamanne Apr 9, 2020
f948a09
OOps
DonJayamanne Apr 9, 2020
ce92590
Address sonar issues
DonJayamanne Apr 9, 2020
5f370c9
Fix linter
DonJayamanne Apr 9, 2020
92e056e
Fixes
DonJayamanne Apr 10, 2020
ede21dc
Better way to pas array buffer
DonJayamanne Apr 10, 2020
d9f0d16
Added comments
DonJayamanne Apr 10, 2020
b273642
Oops
DonJayamanne Apr 10, 2020
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
Prev Previous commit
Next Next commit
Merge branch 'master' into local2
* master:
  Preserve code in cells during execution and edits (#10981)
  Replace spinner with custom icon when downloading MPLS/Insiders build (#10687)
  Style speedups for the monaco editor (#11014)
  Force kernel syncing (#10955)
  Consolidate the info for internal scripts to one place. (#10876)
  Update experiments json to include ipywidgets (#10992)
  Separate Python env from exec. (#10883)
  Secondary fix for 9523 - Exception for loading should show in the ouptut (#10990)
  • Loading branch information
DonJayamanne committed Apr 7, 2020
commit 278341aad7cf4484fbdf9d4e9829d57ac6f1525c
4 changes: 3 additions & 1 deletion src/client/datascience/ipywidgets/ipywidgetHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ export class IPyWidgetHandler implements IInteractiveWindowListener {
constructor(
@inject(INotebookProvider) notebookProvider: INotebookProvider,
@inject(IDisposableRegistry) private readonly disposables: IDisposableRegistry,
@inject(IPyWidgetMessageDispatcherFactory) private readonly widgetMessageDispatcherFactory: IPyWidgetMessageDispatcherFactory
@inject(IPyWidgetMessageDispatcherFactory)
private readonly widgetMessageDispatcherFactory: IPyWidgetMessageDispatcherFactory,
@inject(IExperimentsManager) readonly experimentsManager: IExperimentsManager
) {
disposables.push(
notebookProvider.onNotebookCreated(async (e) => {
Expand Down
21 changes: 20 additions & 1 deletion src/datascience-ui/interactive-common/cellOutput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { TrimmedOutputMessage } from './trimmedOutputLink';
interface ICellOutputProps {
cellVM: ICellViewModel;
baseTheme: string;
loadWidgetScriptsFromThirdPartySource: boolean;
Comment thread
DonJayamanne marked this conversation as resolved.
Outdated
maxTextSize?: number;
hideOutput?: boolean;
themeMatplotlibPlots?: boolean;
Expand Down Expand Up @@ -472,7 +473,25 @@ export class CellOutput extends React.Component<ICellOutputProps> {
transformedList.forEach((transformed, index) => {
const mimetype = transformed.output.mimeType;
if (isIPyWidgetOutput(transformed.output.mimeBundle)) {
return;
if (this.props.loadWidgetScriptsFromThirdPartySource) {
// Create a view for this output if not already there.
this.renderWidget(transformed.output);
} else {
// If loading of widget source is not allowed, display a message.
const errorMessage = getLocString(
'DataScience.loadThirdPartyWidgetScriptsDisabled',
"Loading of Widgets is disabled by default. Click <a href='https://command:python.datascience.loadWidgetScriptsFromThirdPartySource'>here</a> to enable the setting 'python.dataScience.loadWidgetScriptsFromThirdPartySource'. Once enabled you will need to restart the Kernel"
);

// tslint:disable: react-no-dangerous-html
buffer.push(
<div role="group" key={index}>
<span className={'cell-output-html cell-output-error'}>
<div dangerouslySetInnerHTML={{ __html: errorMessage }} />
</span>
</div>
);
}
} else if (mimetype && isMimeTypeSupported(mimetype)) {
// If that worked, use the transform
// Get the matching React.Component for that mimetype
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.