Commit Graph

50 Commits

Author SHA1 Message Date
Chris LaFreniere
a8a7559229 Add more notebook extension tests (#11143)
* more tests

* More tests

* More tests

* Add prompt tests
2020-06-30 11:01:51 -07:00
Maddy
561b881200 Fix/highlight correct item (#11016)
* get children of unexpanded books

* highlight item inside collapsed parent in treeView

* fix path issue on windows

* refactor common code into separate func

* refactor
2020-06-24 13:44:50 -07:00
Maddy
26a00696d4 Fix/prev next links issue (#10523)
* intital test code

* added tests

* remove commented code

* fix for failing tests

* reuse exported enum

* changes to address comments

* add back onVisibility highlight

* port highlight fix from Chris

* fix tests
2020-06-12 18:42:17 -07:00
Chris LaFreniere
168ef80d8f Fix Notebook Viewlet Highlighting (#10868)
* Stop double tree data provider registrations

* revert book finding logic, leverage currentBook
2020-06-10 22:27:16 -07:00
Maddy
22d7c9083e highlight correct notebook on navigation. (#10807)
* highlight correct notebook on navigation.

* add back behavior of highight on viewlet visible

* optimize bookViewer create

* createTreeView for every book
2020-06-08 19:09:43 -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
Charles Gagnon
14554f0d11 Fix some issues with book tree view (#10521) 2020-05-20 11:54:25 -07:00
Maddy
e46521cafc open viewlet on showPreview (#10474)
* open viewlet on shoePreview

* on showPreview reveal explorer
2020-05-18 13:46:55 -07:00
Maddy
f6e7b56946 opening as text document launches json (#10323) 2020-05-08 23:28:28 -07:00
Cory Rivera
d7a425239b Only reveal items in the books viewlet if the viewlet is visible. (#10234) 2020-04-30 20:10:27 -07:00
ADS Merger
7f1d8fc32f Merge from vscode 2e5312cd61ff99c570299ecc122c52584265eda2 2020-04-24 14:03:37 -07:00
Cory Rivera
097289d94c Check treeItem first when building search path in searchJupyterBooks. (#10083) 2020-04-20 15:30:52 -07:00
Cory Rivera
67b6f6ffcd Add tests for Open Notebook Folder functionality. (#10056) 2020-04-17 16:27:00 -07:00
Maddy
a58d4d7d05 replaced watch with watchFile (#9873)
* replaced watch with watchFile

* testing debounce

* changed the beounce delay to 1500
2020-04-15 10:03:48 -07:00
Cory Rivera
2b2a275fb0 Add Open Notebook Folder functionality to Books viewlet. (#9939) 2020-04-13 23:42:02 -07:00
Maddy
4c01482a8f fixes to the toc formatting (#9825)
* fixes to the toc formatting

* addressed comments
2020-04-06 15:30:08 -07:00
Jorge Berumen
6a1037ab2d Fix trusting opened notebooks (#9615)
* Fix trusting opened notebooks

* Addressing comments
2020-03-13 18:10:55 -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
Chris LaFreniere
29cf1f898e Search sections in Jupyter Viewlet (#9346) 2020-02-26 13:59:38 -08:00
Maddy
6e5b13ac8f Tests/book tests (#9075)
* Conditionally add associatedResource t untitled nb

* Fix Jupyter Book notebook titles (#9039)

* Fix notebook titles

* Fix navigation links for books

* Added comments

Co-authored-by: Chris LaFreniere <40371649+chlafreniere@users.noreply.github.com>

* PR comment nit

* fix book tests

* tslint formatting fixes

* merged master and undid formatting

* added book path to error message

Co-authored-by: Chris LaFreniere <40371649+chlafreniere@users.noreply.github.com>
Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
2020-02-13 11:35:04 -08:00
Chris LaFreniere
2208666eef Books: Ensure associatedResource is Present for Untitled Notebooks that have a File Associated with them (#9037)
* Conditionally add associatedResource t untitled nb

* Fix Jupyter Book notebook titles (#9039)

* Fix notebook titles

* Fix navigation links for books

* Added comments

Co-authored-by: Chris LaFreniere <40371649+chlafreniere@users.noreply.github.com>

* PR comment nit

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
2020-02-04 11:42:24 -08:00
Charles Gagnon
041f34beda Fix book provider load to not throw on startup (#8835)
* Fix book provider load to not throw on startup

* Move tests to stable

* Rename method

* Fix floating promises and broken test
2020-01-07 17:32:51 -08:00
Maddy
746b4d7815 Book/untitled file name updates (#8579)
* file-name has entire path as name, changes to address that

* await promises
2019-12-18 09:09:17 -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
Chris LaFreniere
0520870754 notebooks lgtm cleanup part 1 (#8280) 2019-11-11 13:40:48 -05:00
Chris LaFreniere
f8067ffada Fix for Markdown File in Jupyter Books Viewlet not Opening After 2x (#8009)
* fix for markdown not opening after opened twice

* PR comment to add return type
2019-10-24 22:14:24 -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
Chris LaFreniere
5a1183a457 Fix async problem with jupyter book viewlet loading (#7591)
* Fix async problem with jupyter book viewlet

* PR Feedback
2019-10-09 16:06:32 -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
Anthony Dresser
28d453fced Implement a no sync rule (#7216)
* implement a no sync rule

* fix linting disable

* fix unused imports

* exclude more testing

* clean up fs usage

* clean up more fs usage

* remove duplicate of code

* fix compile errors
2019-09-17 13:32:42 -07:00
Charles Gagnon
888755e842 Add abillity to open to specific item within a Jupyter book (#7155)
* Add abillity to open to specific item within a Jupyter book

* Move helper method into BookTreeItem class

* Fix default URL path

* Add typing to Jupyter book code

* Update comment and typings

* Fix compile error and cleanup
2019-09-13 11:51:15 -07:00
Charles Gagnon
dd5dd12ee6 Minor notebook cleanup (#7156)
* Minor notebook cleanup

* Undo fix to getBooks
2019-09-11 14:12:32 -07:00
Maddy
ab8a9509b8 Books/fix relative links (#7083)
* fix to make relative links work on untitled notebooks

* changes to make the preb/next links to work

* show filename with extension
2019-09-10 09:43:00 -07:00
Lucy Zhang
7f32473a10 Books/ Unit Tests for error handling (#6817)
* added tests for getBooks and getTableOfContents

* update tests for new getTableOfContents method

* wait for all toc.yml to be found

* add event to signal all toc.yml files read

* add workspae folder parameter back

* remove toc filter

* added timeout logic

* added test for invalid toc.yml

* added tests for invalid toc.yml file format

* added tests for error handling

* update uuid package

* increase timeout time

* change workspacefolder to string
2019-08-23 14:46:52 -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
f4d37a2bb8 fix toc path for windows (#6772) 2019-08-16 08:59:36 -07:00
Lucy Zhang
e10cad21fe Fix Books Unit Tests (#6702)
* wait for all toc.yml to be found

* add event to signal all toc.yml files read

* add workspae folder parameter back

* remove toc filter
2019-08-12 13:47:29 -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
Lucy Zhang
0509234362 Added unit test for books getChildren() method (#6602)
* started unit tests for books

* added first unit test for getchildren()

* fixed dependencies and use tmpdir

* latest from master
2019-08-06 10:39:01 -07:00
Lucy Zhang
a0163c8625 Find all books in workspace with multiple folders (#6613)
* find all books in workspace with multiple flolders

* fixed optional parameter
2019-08-06 10:20:57 -07:00
Kevin Cunnane
d63b741666 Fix markdown in Jupyter books not working (#6420)
Issue here is that for some reason click in tree causes 2 events:
- Selection Changed
- Resource Opened
Due to this, we get the markdown event 2 times and this misbehaves.
I am not confident in changing markdown so implemented similar pattern:
- Throttle requests if they're for the same resource inside 300ms
- This means 2nd event is ignored

Testing:
- Manual, clicked a bunch of markdowns
- It "just works" for me now
2019-07-18 14:02:55 -07:00
Lucy Zhang
d74c2d6c8d Added icons in book tree view (#6404)
* add icons

* added icon files

* fixed icon paths

* moved icons into object initializer
2019-07-17 16:47:54 -07:00
Lucy Zhang
a706ff4d5b Books/navigation (#6280)
* added previous and next buttons

* previous and next notebook API

* links for prev/next notebooks

* fixed first and last pages

* made code more readable

* addressed Kevin's comments

* moved logic over to BookTreeItem

* show buttons in dev mode only

* added BookTreeItemFormat interface

* added interface and enum

* removed localize call
2019-07-12 10:18:46 -07:00
Lucy Zhang
ecef90dc8b Book/externallink (#6215)
* show markdown preview

* open external link

* addressed Charles' comments
2019-07-02 09:30:48 -07:00
Lucy Zhang
eb3c6cadd2 show markdown preview (#6198) 2019-06-28 15:02:17 -07:00
Lucy Zhang
98c6af628b New feature: Jupyter Books (#6095)
* Initial commit

* Fixed broken branch

* Show notebook titles in tree view

* Added  README

* sections showing in tree view

* Multiple books in treeview

* removed book extension, added to notebook

* removed book from extensions.ts

* addressed Chris' comments

* Addressed Charles' comments

* fixed spelling in readme

* added comment about same filenames

* adding vsix

* addressed Karl's comments
2019-06-27 10:10:30 -07:00