Commit Graph

42 Commits

Author SHA1 Message Date
Vasu Bhog
14ce88023e Add allow root setting for Ubuntu and Web Mode users (#16027)
* add allow root setting for Ubuntu and Web Mode users
2021-07-07 11:02:12 -07:00
Lucy Zhang
ff1a642157 Add jupyter server shutdown timeout setting (#15913)
* add jupyter server shutdown timeout setting

* no timeout if setting is 0

* set minimum value to 0
2021-06-25 15:16:32 -07:00
Lucy Zhang
43e8fde775 Update Python to 3.8.8 (#15278)
* update python fwlinks and remove bundle ver

* start fixing path for users with python 36

* prompt user for python version upgrade

* update python path after removing 3.6

* prompt users to upgrade and show pkg warning

* make prompt async

* remove python bundle ver from ML extension

* shutdown python 3.6 before deleting

* check useExistingPython before update prompt

* add dont ask again option

* remove 3.6 after installing 3.8

fix merge conflict

* give option to remove python36

* list user installed pip packages in warning

* create notebook to install pip packages

* update getPythonExePath method and add comments

* clean up code

* add comments

* pr comments

* add comment

* remove option to keep python36

* shutdown active servers before removing python36

* fix error removing old python w/ path change

* update to 3.8.10

* restart sessions for mac/linux
2021-05-19 15:15:07 -07:00
Barbara Valdez
fde5caa9a4 Add documentation and fix paths (#14948)
* use posix relative path

* add doc link in dialog

* rename book to Jupyter book
2021-04-02 15:44:25 -07:00
Barbara Valdez
8aa222d1c8 Add new file UI (#14773)
Adds a notebook or markdown file to a book's top level or a section by right click on Book Tree View
2021-03-30 18:44:52 -07:00
Barbara Valdez
784d76b886 Remove book notebook from toc (#14704)
* Add remove notebook from book
2021-03-16 15:02:29 -07:00
Barbara Valdez
0ef99ab42a remove Jupyter string from books and notebooks in UI (#14583) 2021-03-05 16:26:34 -08:00
Barbara Valdez
9ac180d772 Editing Books (#13535)
* start work on ui

* Move notebooks complete

* Simplify version handling

* fix issues with add section method

* fix issues with the edit experience and add the quick pick for editing

* add version handler for re-writing tocs

* fix book toc manager tests

* add notebook test

* fix localize constant

* normalize paths on windows

* check that a section has sections before attempting to mve files

* Implement method for renaming duplicated files

* moving last notebook from section converts the section into notebook

* Add recovery method restore original state of file system

* Add clean up, for files that are copied instead of renamed

* remove dir complexity

* divide edit book in methods for easier testing and remove promise chain

* Keep structure of toc

* normalize paths on windows

* fix external link

* Add other fields for versions

* fix paths in uri of findSection

* add section to section test

* Add error messages

* address pr comments and add tests

* check that the new path of a notebook is different from the original path before deleting
2021-02-02 20:39:11 -08:00
Maddy
ae830d9e64 Pinning Notebooks on Notebooks view (#11963)
* initial commit

* added tests

* code cleanup and more tests

* add missed util test

* changes to address comments

* remove pin from resources
2020-08-31 08:53:11 -07:00
Barbara Valdez
c52155b621 Add setting for collapsing/expanding books at root level (#11543)
* Add setting for max number of expanded books

* Remove extra commas

* Add setting for expanding/collapsing books at root level

* Change typo in name of setting

* Change default value to false
2020-07-31 14:44:45 -07:00
Barbara Valdez
6d9efbd603 Open books from Github (#10670)
* Add open book option in UI

* Add dropdowns option on dialog

* Add flow logic

* Fetch releases and validate URL

* Add class for github books and shared file books

* Change code structure

* Unblock local copy + stack overflows

* Download books from github

* Remove unused files

* Clean code and use the openNotebookFolder command to open remote book

* Checkpoint

* Refactor remote book dialog model to only hold data

* Remove ApiWrapper and refactor createlocalcopy method

* Use sinon js framework instead of typemoq for testing remotebookController

* Remove api wrapper

* Add some tests

* Add more tests and address pr comments

* Address PR comments

* Fix remotebook broken tests

* Add download location in output channel and use openBook command

* Address PR comments

* Fix typos, print error message and remove failing test

* Print error message

* Separate tests in different files

* Declare controller variable inside extension.tst

Co-authored-by: chlafreniere <hichise@gmail.com>
2020-07-24 19:39:03 -07:00
Maddy
3088c73e2b Feat/notebooks viewlet (#10170)
* clean up unsavedBooks to providedBooks

* added notebooks viewley contribution

* added notebookExporerAction context

* temp shortcut key B

* remove commenred code

* changes with master merge

* fix comments

* initial tests

* fix casing and description

* merged master and resolved errors

* remove extension point & add custom view container

* merge latest from master

* remove unused files

* move book images to common

* remove notebookExplorer contrib & move to notebook

* build fix

* remove explorer specific sryles from common

* vscode convention to define container actions

* rename notebooks/title
2020-06-01 15:47:56 -07:00
Maddy
02ae1ecff8 Rename/books viewlet sections (#10044)
* renamed viewlet sections

* template to provided
2020-04-16 17:23:54 -07:00
Cory Rivera
2b2a275fb0 Add Open Notebook Folder functionality to Books viewlet. (#9939) 2020-04-13 23:42:02 -07:00
Maddy
d6d33165f1 fixed opening book on win (#9622) 2020-03-13 19:20:51 -07:00
Jorge Berumen
d5fdec5699 Introduce Trust Book in Book Viewlet (#9414) 2020-03-13 09:11:38 -07:00
Maddy
9cc31bee62 Feat/close book (#9453)
* initial commit

* Add Reveal in Books editor tab context option

* Select item in books viewlet automatically

* changes

* easier than i thought it'd be

* added file watcher on toc file v1

* Merge from Feat/create book

* Undo Merge from Feat/create book

* Use fsPath instead of path

* repen book on toc update

* update book in-place

* fix close book

* error handling for closeBook

* PR comments

* addressed comments

* moved the watch block to try ,watch vs watchFile

Co-authored-by: chlafreniere <hichise@gmail.com>
Co-authored-by: Chris LaFreniere <40371649+chlafreniere@users.noreply.github.com>
2020-03-06 14:55:22 -08:00
Chris LaFreniere
0a9a0d3f46 Ensure Active File is Highlighted in Books Viewlet (#9338)
* Add Reveal in Books editor tab context option

* Select item in books viewlet automatically

* changes

* easier than i thought it'd be

* Merge from Feat/create book

* Undo Merge from Feat/create book

* Use fsPath instead of path

* PR comments

* Fix tests

Co-authored-by: Maddy <12754347+MaddyDev@users.noreply.github.com>
2020-03-05 23:43:22 -08:00
Maddy
c1f6a67829 Feat/create book (#9159)
* added secondary action

* create book command

* open as untitled

* create toc.yml and update title

* added comments

* throw error if filenames have unsupported chars

* update prompt message

* remove the toLocaleLower

* added await

* moced createbookpath out of the command handler

* removed tolocalelower and added comments

* moved the formatting and file handling code from core to notebook

* fixes for contents with folders

* collapse the code cell

* remove output

* reused existing command to open book

* comment typu and added await
2020-03-02 12:45:53 -08:00
Maddy
a67e3abb4c add open book command to open any book from local sys (#8632)
* add open book command to open any book from local sys

* no-floating promises

* moved all the loc strings to common loc file

* typos
2019-12-18 09:08:52 -08:00
Maddy
6e7311ca87 added openLocalizedook action that opens up the link to localized books. (#8025)
* initial commit

* addressed the tslint floating promise errors

* updated the command name with PM's feedback
2019-10-29 11:51:05 -07:00
Maddy
b8ad7e3072 Updates to package.json to show books on stable (#7836)
* Updates to package.json to show books on stable

* remove notebookQuality context key

* renamed untitiled to unsaved
2019-10-21 14:26:59 -07:00
Chris LaFreniere
4c946b21a9 Jupyter Book Search First Steps (#7704)
* Crawling for book search. needs icon

* Remove context until decision on entry point

* Add undefined check
2019-10-15 17:04:24 -07:00
Maddy
ac6a4e590d Books/viewlet refactor (#7208)
* add saved/untitled views to the books viewlet and provide save option to untitled

* addressed comments

* fixes after merge

* await on async methods

* reverted back

* await on promise

* added localize for books view names

* initial commit

* missed a file change

* changes to make the merges work part1

* fixes after merges 2

* getChildren to get all books

* chnages to address comments

* fsPromises instead of fs.readSync

* merged master

* replaced deprecated fs.exists async call with pathExists

* renamed method
2019-09-20 10:47:33 -07:00
Maddy
9274f223f0 Nb/open book without reload (#6635)
* initial commit

* fix: added initialize method to fix the previous/next links rendering

* added checks

* open first markdown/ipynb in the book ans expand the view

* added launch book from command pallete, removed the pick folder and save option added launching the first notebook/markdown

* moved the open book command pallet action from mssql to notebooks

* open as untitled to true

* opening markdown files issue fix

* removed opening as untitled files

* open ipynb files as untitled and changes for previous&next links to work

* add books as seperate viewlet

* localize double quote issues and renamed treeCollapsibleState

* renames and added logic to conditionally show Preview command

* moved registerCommands from widget to extension contribution

* isEditorUntitled check

* async comment updates

* formatting issues.

* promisfying the async calls

* moved existsAsync to top
2019-08-23 11:19:35 -07:00
Lucy Zhang
f5e3b51151 Move finding toc.yml files logic to async method in Books (#6623)
* moved findTOC logic to async function

* set max number of subdirectories to search

* log error, change for loop syntax

* hadnling edge cases
2019-08-09 14:19:10 -07:00
Chris LaFreniere
77fb060fde Notebooks: Add Command + Keyboard Shortcut to Clear Outputs of Active Cell (#6169)
* Add command to clear cell output with test

* Fix typo

* PR Comments
2019-06-26 15:19:12 -07:00
Cory Rivera
ff38bc8143 Add dialog to notebooks for managing Pip packages (#5944) 2019-06-10 17:02:31 -07:00
Cory Rivera
a59d1d3c05 Add functionality to use an existing Python installation for Notebook dependencies (#5228) 2019-05-17 14:39:44 -07:00
Chris LaFreniere
2beedb10d4 Add run cells as a command (#5080) 2019-04-17 14:26:31 -07:00
Kevin Cunnane
3349151d4c Touchbar icon support in notebooks (#4998)
* Touchbar icon support in notebooks
- updated shortcut keys to only work if notebook is active
- Added icons
- Now have 1 "add cell" icon that prompts for code/text.
This is useful as there wasn't an icon to differentiate
2019-04-11 16:43:27 -07:00
Cory Rivera
70838c3e24 Move SQL 2019 extension's notebook code into Azure Data Studio (#4090) 2019-02-20 10:55:49 -08:00
Chris LaFreniere
4117da6e93 undo remove sql kernel setting 2019-02-19 17:38:00 -08:00
Chris LaFreniere
0205d0afb5 Change default max table rows returned in notebook to 5000, make it user configurable (#4084) 2019-02-19 15:01:47 -10:00
Kevin Cunnane
a2c7377134 Improve notebook colors and UX (#3914)
This was reviewed / worked on with Smitha and will be signed off on by PM via mail.
1 thing left (make run button look better when not selected) will be one in separate review.

Changes
- Add top/bottom padding to editor so it's not cramped
- Added an (on by default) setting `notebook.overrideEditorTheming`. This controls whether new colors etc. are used for notebook editors or if users should see vanilla UI like in standard editor. Settings under this flag are:
  - When unselected, editor has same color as toolbar. On selection it goes back to regular editor view so colors work "right"
  - In standard light/dark themes we now use a filled in background color instead of border box.
2019-02-05 17:51:42 -08:00
Yurong He
84e0e08aec Ported Analyze notebook code from SqlOpsStudio and make it work. (#3899)
* Ported Analyze notebook code from SqlOpsStudio and make it work.
if config.notebook.sqlKernelEnabled is true, use SQL provider;
Use Jupyter provider if Python is install, otherwise use buildIn Kernel.

* Analyze in Notebook Kernel can only be Python or "No Kernel". So remove Sql Kernel.
2019-02-04 15:41:01 -08:00
Kevin Cunnane
2fce771214 Run and Add Cell keybinding support (#3896)
- As part of this, fixed bug in the insertCell API where it didn't add to the end / failed if no cells existed
2019-02-04 14:02:15 -08:00
Kevin Cunnane
9504ede1f3 Fix #3875 Notebook stuck Loading Kernels if SQL flag disabled and Jupyter not installed (#3876) 2019-02-01 10:10:21 -08:00
Kevin Cunnane
d9c383b2ef Remove notebook.enabled feature flag (#3866)
* Remove notebook.enabled feature flag

* Fix build error with package.json typos
2019-01-31 09:34:50 -08:00
Chris LaFreniere
83a6ee0a22 Change feature flag for SQL kernel to be user preference (#3838)
* Change feature flag for SQL kernel to be user preference

* fix test that was broken

* Tweak package.nls.json to show "(Preview)"
2019-01-30 17:29:08 -08:00
Raj
e0339b50c0 #3753: User settings configuration - python installation path (#3754)
* #3753: User settings configuration - python installation path

* Text change

* #3753: Text change

* Message change
2019-01-16 16:29:06 -08:00
Kevin Cunnane
cac8cc99e1 Notebook extensibility: Move New Notebook and configuration to an extension (#3382)
initial support for Notebook extensibility. Fixes #3148 , Fixes #3382.

## Design notes
The extensibility patterns are modeled after the VSCode Document and Editor APIs but need to be different since core editor concepts are different - for example Notebooks have cells, and cells have contents rather than editors which have text lines.

Most importantly, a lot of the code is based on the MainThreadDocumentsAndEditors class, with some related classes (the MainThreadDocuments, and MainThreadEditors) brought in too. Given our current limitations I felt moving to add 3 full sets of extension host API classes was overkill so am currently using one. Will see if we need to change this in the future based on what we add in the additional APIs

## Limitations
The current implementation is limited to visible editors, rather than all documents in the workspace. We are not following the `openDocument` -> `showDocument` pattern, but instead just supporting `showDocument` directly.

## Changes in this PR
- Renamed existing APIs to make clear that they were about notebook contents, not about notebook behavior
- Added new APIs for querying notebook documents and editors 
- Added new API for opening a notebook
- Moved `New Notebook` command to an extension, and added an `Open Notebook` command too
- Moved notebook feature flag to the extension

## Not covered in this PR
- Need to actually implement support for defining the provider and connection IDs for a notebook. this will be important to support New Notebook from a big data connection in Object Explorer
- Need to add APIs for adding cells, to support 
- Need to implement the metadata for getting full notebook contents. I've only implemented to key APIs needed to make this all work.
2018-12-03 18:50:44 -08:00