Skip to content

Commit 5a3a499

Browse files
author
David Kutugata
authored
Start page (#11605)
* Add command to open the start page * added the message listener and added start page to the service registry * small fix * added start page front end and its redux store * add store middleware part 1 * remove redux * remove redux * Add functionality to some links/buttons * open start page on extension activation, add the last messages like the sample notebook and update settings * start page will only open the first time the extension is activated or if the version changes * localize the start page * added telemetry * added functional test that loads the page and checks the DOM. * added news file * Address PR comments and fix scrapping of release notes * use one localization per paragraph * Stop scrapping the date from the release notes. Added some comments. * localize the sample notebook * if the localized sample notebook doesn't exist, open the english one. * fix linter complaint * Change some capitalization, set the env variable UITEST_DISABLE_INSIDERS * limit release notes to 5, increase a margin * added requested awaits * Move ipynb to 'pyhtonFiles' and its images to 'images' other PR comments * merge mistake, removed jediEnabled from IPythonSettings * add function to compare versions * removed render count from functional test added unit tests start page won't open if you go back to a privews version * moved the start page files to common * added license * changed command on package.json * open a copy of the sample notebook instead of the original file * -open a copy of the sample notebook instead of the original -set a timeout when opening the start page
1 parent 0f3e026 commit 5a3a499

40 files changed

Lines changed: 2015 additions & 5 deletions

build/webpack/webpack.datascience-ui.config.builder.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ function getEntry(bundle) {
3434
case 'viewers':
3535
return {
3636
plotViewer: ['babel-polyfill', `./src/datascience-ui/plot/index.tsx`],
37-
dataExplorer: ['babel-polyfill', `./src/datascience-ui/data-explorer/index.tsx`]
37+
dataExplorer: ['babel-polyfill', `./src/datascience-ui/data-explorer/index.tsx`],
38+
startPage: ['babel-polyfill', `./src/datascience-ui/startPage/index.tsx`]
3839
};
3940
default:
4041
throw new Error(`Bundle not supported ${bundle}`);
@@ -107,6 +108,12 @@ function getPlugins(bundle) {
107108
indexUrl: `${constants.ExtensionRootDir}/out/1`,
108109
chunks: ['commons', 'dataExplorer'],
109110
filename: 'index.dataExplorer.html'
111+
}),
112+
new HtmlWebpackPlugin({
113+
template: 'src/datascience-ui/startPage/index.html',
114+
indexUrl: `${constants.ExtensionRootDir}/out/1`,
115+
chunks: ['commons', 'startPage'],
116+
filename: 'index.startPage.html'
110117
})
111118
]
112119
);

images/dataviewer.gif

118 KB
Loading

images/kernelchange.gif

218 KB
Loading

images/plotviewer.gif

475 KB
Loading

images/remoteserver.gif

254 KB
Loading

images/savetopythonfile.png

12.4 KB
Loading

images/variableexplorer.png

222 KB
Loading

news/1 Enhancements/11057.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added a start page for the extension. It opens to new users or when there is a new release. It can be disabled with the setting 'Python: Show Start Page'.

package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
"onCommand:python.clearWorkspaceInterpreter",
8181
"onCommand:python.resetInterpreterSecurityStorage",
8282
"onCommand:python.datascience.createnewnotebook",
83+
"onCommand:python.startPage.open",
8384
"onCommand:python.datascience.showhistorypane",
8485
"onCommand:python.datascience.importnotebook",
8586
"onCommand:python.datascience.importnotebookfile",
@@ -654,6 +655,11 @@
654655
"title": "%python.command.python.datascience.createnewnotebook.title%",
655656
"category": "Python"
656657
},
658+
{
659+
"command": "python.startPage.open",
660+
"title": "%python.command.python.startPage.open.title%",
661+
"category": "Python"
662+
},
657663
{
658664
"command": "python.datascience.scrolltocell",
659665
"title": "%python.command.python.datascience.scrolltocell.title%",
@@ -1106,6 +1112,11 @@
11061112
"title": "%python.command.python.datascience.createnewnotebook.title%",
11071113
"category": "Python"
11081114
},
1115+
{
1116+
"command": "python.startPage.open",
1117+
"title": "%python.command.python.startPage.open.title%",
1118+
"category": "Python"
1119+
},
11091120
{
11101121
"command": "python.datascience.runtoline",
11111122
"category": "Python",
@@ -2841,6 +2852,12 @@
28412852
"daily"
28422853
],
28432854
"scope": "application"
2855+
},
2856+
"python.showStartPage": {
2857+
"type": "boolean",
2858+
"default": true,
2859+
"description": "Show the Python Start Page when a new update is released.",
2860+
"scope": "application"
28442861
}
28452862
}
28462863
},

package.nls.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
"python.command.python.datascience.addcellbelow.title": "Add Empty Cell to File",
7676
"python.command.python.datascience.scrolltocell.title": "Scroll Cell Into View",
7777
"python.command.python.datascience.createnewnotebook.title": "Create New Blank Jupyter Notebook",
78+
"python.command.python.startPage.open.title": "Open Start Page",
7879
"python.command.python.datascience.selectJupyterInterpreter.title": "Select Interpreter to start Jupyter server",
7980
"Datascience.currentlySelectedJupyterInterpreterForPlaceholder": "current: {0}",
8081
"python.command.python.analysis.clearCache.title": "Clear Module Analysis Cache",
@@ -491,6 +492,19 @@
491492
"DataScience.unhandledMessage": "Unhandled kernel message from a widget: {0} : {1}",
492493
"DataScience.qgridWidgetScriptVersionCompatibilityWarning": "Unable to load a compatible version of the widget 'qgrid'. Consider downgrading to version 1.1.1.",
493494
"DataScience.kernelStarted": "Started kernel {0}",
495+
"StartPage.getStarted": "Python - Get Started",
496+
"StartPage.pythonExtensionTitle": "Python Extension",
497+
"StartPage.createJupyterNotebook": "Create a Jupyter Notebook",
498+
"StartPage.notebookDescription": "- Use \"<div class=\"italics\">Shift + Command + P</div> \" to open the <div class=\"link\" role=\"button\" onclick={0}>Command Palette</div><br />- Type \"<div class=\"link italics\" role=\"button\" onclick={1}>Create New Blank Jupyter Notebook</div> \"<br />- Explore our <div class=\"link\" role=\"button\" onclick={2}>sample notebook</div> to learn about notebook features",
499+
"StartPage.createAPythonFile": "Create a Python File",
500+
"StartPage.pythonFileDescription": "- Create a new file and use the .py extension<br />- <div class=\"link\" role=\"button\" onclick={0}>Open a file or workspace</div> to continue work",
501+
"StartPage.openInteractiveWindow": "Open the Interactive Window",
502+
"StartPage.interactiveWindowDesc": "- You can create cells on a Python file by typing \"#%%\" <br /> - Use \"<div class=\"italics\">Shift + Enter</div> \" to run a cell, the output will be shown in the interactive window",
503+
"StartPage.releaseNotes": "Take a look at our <a class=\"link\" href={0}>Release Notes</a> to learn more about the latest features",
504+
"StartPage.tutorialAndDoc": "Explore more features in our <a class=\"link\" href={0}>Tutorials</a> or check <a class=\"link\" href={1}>Documentation</a> for tips and troubleshooting.",
505+
"StartPage.dontShowAgain": "Don't show this page again",
506+
"StartPage.helloWorld": "Hello world",
507+
"StartPage.sampleNotebook": "Welcome_To_VSCode_Notebooks.ipynb",
494508
"DataScience.libraryRequiredToLaunchJupyterKernelNotInstalledInterpreter": "{0} requires {1} to be installed.",
495509
"DataScience.runByLine": "Run by line",
496510
"DataScience.continueRunByLine": "Stop",

0 commit comments

Comments
 (0)