* Use built-in SQL ExecuteProvider by default if no other provider exists.
* Gracefully handle case where standardKernels are not defined for a provider.
* Standardize on just using arrays for various provider registration details.
* Add notebook editor
Introduce notebook editor component to allow for separate notebook displays in order to accomodate notebook views
* Localize notebook views configuration title
* Refactor view mode and remove the views configuration while it is unused
* Only fire view mode changed event when the value has been changed
* Remove notebook views contribution
* Add metadata capabilities
* Notebook views definitions
* Add notebook views models
* Views test
* Rename type arguments
* Additional tests
* Fix unused import
* Update resize cell test
* initial commit
* get notebook content
* skeleton for find in notebookModel
* add search function and keyboard shortcut
* add command for hiding find widget
* started on search logic
* continue search logic
* continue search logic
* add findcountchange listener
* notebook find position
* added css class
* hide find widget
* focus find input
* search for multiple occurrences in one line
* start notebook find decorations
* start adding decorations to notebook model
* added editor_model_defaults
* added cursor position
* merged master and resolved husky erros
* initial changes added to Lucyls base implementation
* pass NotebbokRange instead of Range to decorations
* changes after merging master
* temp changes for testing
* style updates from vscode merge
* implemented the empty methods and added supporting functionality from textModel
* just a little error checking
* It gets more and more yellow
* making highlight work between code cells
* highlight only word
* remove highlight on close and maintain the position
* cleanup of unused references
* clean up
* find between code cells refactored
* highlight markdown line and scroll to it
* find index fix
* find index fix
* code clean up
* remove commented code
* tslint fix for: Cannot use global 'NodeJS'
* linting rule fixes
* deltaDecoration base implementation on the base class
* moced class defnitions from interface fikle
* updated action names
* DOM.addClass instead of overwriting
* resooved conflicts
* moved 'find' code away from notebookmodel to sep class
* moved find realted code to seperate folder
* created notebookFindModel
* clean up
* highlight color changes
* spacing and typo fixes
* highlight correct element for nested elements
* do not iterate through paragraphs and li
* find accross notebooks
* keep track of index
* clear decorations on close
* floating promises
* maintain search context
Co-authored-by: Lucy Zhang <lucyzhang929@gmail.com>
Co-authored-by: Chris LaFreniere <40371649+chlafreniere@users.noreply.github.com>
* edit perf
* Save multiline source in notebooks
* More merges
* Single, multi line works needs work
* Works with single + multi and recomputes active
* Actual perf improvements this time
* code cleanup
* Calculating output position on the fly
* Hmm can we use brackets to make this simpler?
* monday progress
* output working. lots of improvements.
* First tests working
* 10 tests now, fixed bugs
* Cleanup, add output test
* More fixes
* Need to still fix execution count bug
* Tests pass, added comments
* Cleanup
* PR comments round 1
* Deal with merge issues from master, layering
* Deleting duplicate file
* More PR Comments
* PR Comments
* 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
* Fix#5238 Notebooks should support relative links
- Added detection of relative #links inside notebooks
- Added handling of these, at least for current notebook
Not handled: open other notebook & scroll to position.
This is a staged refactor to use the exact same grid logic in the Notebook and query editors, including context menu support, font settings, and sizing logic. The goal long term is:
- As the core Query grid is updated, Notebook can benefit from the changes
- As we add in support for contributions like new buttons & actions working on the grid, can share the logic
- Ideally if and when we refactor things like the action bar for grid results, we can apply in both places though this is TBD.
Fixes a number of issues:
- Fixes#5755 Grids don't respond to font settings. @anthonydresser can we remove setting from each query results editor and just use Notebook Styles since these are global (not scoped) settings?
- Fixes#5501 Copy from grid settings.
- Fixes#4938 SQL Notebook result sets are missing the actions provide for SQL File results sets. this now has the core ability to solve this, and separate work items for specific asks (serialization, charting) are tracked.
Currently hidden:
- Save as... options in context menu
- All right toolbar actions (save as, chart).
Remaining issues to address in future commits:
- Need to implement support for serialization (#5137).
- Need to add charting support
- Need to solve the layout of buttons on the right hand side when a small number of columns are output. It doesn't look right that buttons are so far away from the results
- Will work with UX on this. For now, mitigating this by hiding all buttons, but will need to solve in the future
- Would like to make buttons contributable via extension, but need to refactor similar to ObjectExplorer context menu so that we can serialize context menu options across to extension host while still having internal actions with full support
- Updated the notebook API to add a change kind, and support saved, executed and other simplified status
- Plumbed this through to the main thread classes
- Support sending the events from cell / input to the notebook model so they loop over the extension host as a content changed event
- Add executed event from the cell
- Notebooks Can be Improperly Trusted After Save + Reopen
Fix was to only save if actually trusted.
Also fixed condition where it wasn't correctly skipping if in the queue
* Fix#3439 Trusted doesn't get saved in Notebooks
The main fix is to add a memento to store trust information. This is only needed for saved files - untitled files are always trusted as the user created them.
On clicking trusted or saving a file, the trusted state is cached. In the future, we will also handle code execution here too by sending notification on snapshot state.
I found issue #5506 during testing - existing issue where we should track trusted state changing on run. In the case all cells are ran, the whole notebook should become trusted.
Finally, I did a decent amount of refactoring to move more logic to the model - removing unnecessary calls from components which duplicated model behavior, moving trust notification to the model or at least the notebook service completely.
Added tests and logging for catch handling
* Remove unnecessary 'use strict' lines and add hygiene check for them
* Move check to under tslint filters to reduce number of filters needed
* Only take first 10 lines of file
This is a partial fix that lays groundwork for full "Prompt to connect" if a kernel needs a connection.
I am waiting on Yurong's refactoring of connection handling before doing any of the prompt work.
- Adds kernel metadata about whether a connection is required.
- For Jupyter, only Spark kernels are listed as requiring a connection
- If this is true and there's no active connection, will show notification and not call execute
In the future, this path will still be used if user is prompted to connect and cancels out.
The future change will be to inject a "connect" handler from notebook.component to the cell callback and use to set connection context
* runAllCells API
* add comment
* more run cells fixes
* Add integration test
* Add multiple cell SQL notebook test
* Comment out python tests as they fail in the lab
* remove unused imports
* PR comments
* Remove localize
* Return true instead of promise.resolve(true)