Commit Graph

861 Commits

Author SHA1 Message Date
Chris LaFreniere
4a82abc19b Notebooks: Greatly Reduce Time to Generate HTML Table String (#4086)
* Greatly reduce time to generate html table string

* change outer tag to table instead of html

* address PR feedback for more descriptive variable name
2019-02-19 09:03:58 -10:00
Chris LaFreniere
3ae32ab0a0 Fix the Attempt to use a destroyed view Errors (#4087) 2019-02-19 08:28:55 -10:00
Alan Ren
1cc6a108a7 Deprecate the modelviewdialog namespace (#4075)
* Deprecate the modelviewdialog namespace

* use @deprecated tag
2019-02-19 09:43:37 -08:00
Chris LaFreniere
d4ffe53dbd Add database name to attach to (if not connected to master) (#4076) 2019-02-15 16:50:14 -10:00
Yurong He
f43b3508e9 Added SQL notebook IntelliSense (#4064)
* Added SQL notebook intelliSense

* Resolved PR comments.

* catch disconnect error
2019-02-15 15:53:06 -08:00
Chris LaFreniere
930e14e258 Add bottom margin to notebook table, fix python highlighting (#4055) 2019-02-15 08:32:27 -10:00
David Shiflet
87bbb41fb6 window reuse for connections (#4049)
* window reuse for connections

* space after colon

* use undefined instead of null
2019-02-15 09:44:06 -05:00
Raj
b4d304c21e 'Attach to' with Spark kernel resets to sql connection on cancelling connection dialog (#4024)
* Sql connection resets to Select Connection on cancelling dialog

* Hiding error message wehen cancel the connection dialog
2019-02-14 16:39:23 -08:00
Chris LaFreniere
db1f412dae show errors and messages in output (#4031) 2019-02-13 14:54:51 -10:00
Alan Ren
b3a16fd0ce Feature/bdc create (#4012)
* initial checkin

* rename

* wizard pages

* target cluster radio button group

* resource strings

* existing cluster picker

* revert changes to unwanted file

* revert unwanted changes-2

* update cluster icon

* settings page

* fix group container

* hyperlink component

* address review comments

* comments part 2
2019-02-12 22:13:30 -08:00
Chris LaFreniere
9ebf1436d2 Ensure we always switch to a kernel that exists in the session manager (#4015)
* Ensure we always switch to a kernel that exists in the session manager

* PR feedback, create new helper method
2019-02-12 12:46:58 -10:00
Kevin Cunnane
0aa71b5237 Fix kernel name check bug, double-event hooking, and other Notebook issues (#4016)
* Fix error where kernel name was compared to itself. This doesn't break anything right now since we happen to have special handling of Python3, and for other kernels they share the same set of supported providers (which is what the check is used for). However it needs fixing for next release.
* Fix console error due to queryTextEditor trying to access model before it's ready
* Fix issues where notebook model hooked to session events multiple times
* Removed calls that weren't needed such as loadActiveContexts (if undefined, does nothing) and passing connection to initialize method
2019-02-12 14:26:22 -08:00
Chris LaFreniere
27370c655d fix left table border to be dotted, no longer have table border on div (#4010) 2019-02-12 08:49:44 -10:00
Alan Ren
887f4e8985 Alanren/fix4001 (#4011)
* fix for 4001

* Revert "fix for 4001"

This reverts commit 91fed44f063acb44b844a206a13e4074150d8118.

* fix for issue 4001
2019-02-11 21:51:55 -08:00
Matt Irvine
c91c4b01f9 Fix bug minimizing a maximized result grid (#4007) 2019-02-11 21:51:06 -08:00
Kevin Cunnane
67f9a7f5e4 Fix issues due to missing notebook values (specs and cells) (#4008)
- Fix #3844
    - Fix #3955
    - Specs can be null on early load of Jupyter kernels
    - Cells were missing in some reference test .ipynb files. We should be resilient to malformed files if possible.
2019-02-11 17:17:56 -08:00
Yurong He
62404721ed Fixed #3954 pass connection info to new notebook flow (#4000)
* Fixed #3954 
The problem is: connectionProfileId is not passed into New Notebook flow.
The fix is: plumbing connectionProfileId via NotebookInput.

* Resolved PR comments
2019-02-11 15:28:05 -08:00
Kevin Cunnane
6d37329e74 Fix #3989 notebook execution count should start empty (#4004)
- Fixed issues where we missed using actual execution count / starting from empty on this.
2019-02-11 15:18:54 -08:00
Kevin Cunnane
131644477d Beginning of fix for notebook perf (#3984)
Fixes #3843. Now includes full fix which limits length and ensures a scrollbar is available

- Set max size for editor. 4000px gets us 200-250 lines before needing a scrollbar. 
- Adds layout updating which should also ensure accurage line highlighting to the right of the editor. What's happening is initial size is slightly off, so need to layout a 2nd time (e.g. layout once, let flex figure things out, then layout a 2nd time). This isn't optimal as there's a minor perf hit but it isn't noticeable overall.

To consider in future PRs:
- Add user configurable setting for max length?
- Handle case where we scroll to bottom but scrollbar is at the top. 
- Consider how intellisense will work on this. We may need to split into a window around the current code when sending to the kernel as it's quite likely that doing a 12K line intellisense request will be too big.
2019-02-09 13:44:53 -08:00
Kevin Cunnane
b964dd0895 Fix #3985 Hide cell toolbar for markdown cells (#3987)
* Fix #3985 Hide cell toolbar for markdown cells
* Note that I'm still hiding the overall toolbar section per UX feedback
* Also now hiding line numbers per UX feedback..
2019-02-08 16:38:28 -08:00
Raj
7dd32ed44b Notebook server shutdown error (#3976)
* fix #3959 - Notebook shutdown error

* Removing the unit test case to stopserver from clientSession
2019-02-08 13:51:00 -08:00
Chris LaFreniere
0b6aedfc93 Address notebook margin and border CSS issues (#3977) 2019-02-08 10:01:09 -10:00
Chris LaFreniere
b692088c94 Stop map column names for notebook grid, instead use field with unique values (#3975) 2019-02-08 09:59:36 -10:00
Kevin Cunnane
ddc4b3dd6e Support execution count in run button and align correctly (#3979)
Fixes #3931 
- Align run button correctly so it's centered in new cell
- Refactor to support multi-state button.
  - Hidden state is set to show execution count
  - Stopped state shows run button
  - Running state shows stop button
  - Error state (will) show error button. This isn't fully handled right now
- Add execution count to model and to SqlKernel, verify serialization, loading, update matches other notebook viewers

**Notes on implementation**:
I think this is a decent solution for a) showing execution count as text, and b) perfectly centering the run button.
 
The below solution shows count correctly up to 999 runs (that’s clicking 999 times in a single session), the icon lines up juuust about right with [ ] but for other numbers it is pretty close but probably not exactly right. I wish I could solve this to work better but trying to change text float to center etc. really isn’t working.
 
**Screenshots**:
![image](https://user-images.githubusercontent.com/10819925/52466366-e8794200-2b36-11e9-9a50-86893e75d5af.png)

With running cell:
![image](https://user-images.githubusercontent.com/10819925/52466378-f333d700-2b36-11e9-9e6c-3cee098790fd.png)
2019-02-08 11:05:03 -08:00
Aditya Bist
88c33214c6 Dataexplorer viewlet (#3967)
* added initial data explorer viewlet

* added dataexplorer contribution point

* removed test view

* remove unused imports

* added flag and tests

* CR comments

* added icon for data explorer
2019-02-07 17:18:05 -08:00
kisantia
393be65aa6 Add Deploy Plan page to DacFx wizard (#3911)
* upgrade plan is piped through and returns the xml plan

* Added review deploy plan page

* checkbox validation now working and columns formatted

* formatting and cleaning up code

* refactored populateTable()

* addressing comments

* addressing comments

* updating tooltips

* add padding to table cells to align with headers

* fix problems when going back and forth between pages and changing config options

* bump sqltoolsservice version to 71

* fix localization
2019-02-07 16:39:22 -08:00
Chris LaFreniere
9ce9a1598f Improve notebook editor height calculations (#3966)
* Improve notebook editor height calculations

* PR comments, hook up to onDidChangeConfiguration
2019-02-07 14:09:09 -10:00
Karl Burtram
b2a5f65a77 Add query action bar spacing for XML button (#3923) 2019-02-07 11:33:23 -08:00
Kevin Cunnane
69dff5a2cb Fix #3937 Create new notebook (Mac) and receive TypeError (#3965)
- Handles empty file scenario, with fixes along the way for missing metadata (bonus win)
- In non-empty file still shows error and kernel stuck in loading state. #3964 opened to track this issue and fix later
2019-02-07 10:35:19 -08:00
Kevin Cunnane
40e0d5cfbf Fix toggle more actions staying visible, and clickable issues (#3949)
- Fixed so it's now invisible instead of empty when not selected.
 - This fixes clickability and issue where it stayed visible in 1 fix
- Also fixed cell output action which used active cell instead of context cell.
2019-02-07 09:35:58 -08:00
Raj
5a0100757f Attach To is set to 'Localhost' upon cancelling the connection dialog (#3941)
* #3924: Attach To sets 'Localhost' upon cancelling the connection dialog

* Indentation
2019-02-06 16:05:42 -08:00
Kevin Cunnane
f9fe88898d Fix #3928 'Clear output' in ... for markdown cells (#3935)
- Add filtering support for actions, and use for the Clear Output action
2019-02-06 15:49:20 -08:00
Anthony Dresser
a2d6955f79 check for undefined on query info (#3933) 2019-02-06 15:17:45 -08:00
kisantia
327a5f5fae Add tooltip for table column headers and align header and cell (#3909)
* Adding tooltip and lining up header and cell

* moving padding to separate css class
2019-02-06 11:46:24 -08:00
Anthony Dresser
07c7eea2df reverse data array on repopulation (#3907) 2019-02-06 10:41:55 -08:00
Raj
42135d3e53 #3897: Unified connection integration - sql connection improvements (#3910)
* #3897: Unified connection integration - sql connection improvements

* variable name change

* Misc changes

* Misc change
2019-02-06 10:33:21 -08:00
Kevin Cunnane
d74e5e6457 Fix regression where border line between editor and output was lost (#3915) 2019-02-05 21:21:59 -08: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
Raj
0e54393d5a Unified connection in notebooks (#3898)
* yarn files

* #3897: Integrate unified connection with notebooks

* ConnectionProfile serialization in unified connection

* #3898 Handle connection validation from extension

* Removing unused namespaces

* Remove constant

* Show a detailed error message on changing context

* Indentation
2019-02-05 11:54:29 -08:00
Kevin Cunnane
098c40e9ac Use document-style for Notebooks (#3902)
* Added hover support, adding box shadow and light outline on hovering and the "more actions" button showing on hover
* Added box shadow for dark themes (hooray!)
* Remove border from everything but the code cell unless a cell is selected or hovered over. This ensures this looks like a document
* Fix high contrast theming issues.
2019-02-05 11:28:07 -08:00
Yurong He
ef8afab7e8 Added error node to OE tree (#3889)
* Add error node to OE tree

* Add globalerror_red.svg for error node.

* Fixed wrong import resolved automatically

* Resolve PR comments
2019-02-04 19:18:58 -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
f1c8ec141a Make run cell button float so it's always visible (#3895)
- Make the toolbar sticky and remove overflow:hidden which blocked this working.
2019-02-04 09:32:38 -08:00
kisantia
a62393e0ed Add width and css options for TableColumn (#3893) 2019-02-02 19:27:35 -08:00
Yurong He
a6defd9b62 Fixed build issue: ERROR: D:/a/1/s/src/sql/workbench/services/notebook/common/sqlSessionManager.ts[21, 1]: Duplicate imports for 'sqlops'. (#3894) 2019-02-01 14:39:09 -08:00
Kevin Cunnane
374212beaa Fix bug where results were added to all cells, and support multiple resultsets (#3890)
- SQLKernel is the only place to listen for batch and query complete messages now
- It routes to the 1 and only future (since can only have 1 at a time
- It handles query cancelation and not-connected issues correctly
2019-02-01 13:53:10 -08:00
Kevin Cunnane
5132e62045 Fix #3734 Notebook cells are shown empty some times even when there is content (#3878)
- Editor layout gets called sometimes when other events happen (and Notebook isn't visible)
- Add in a layout call on re-setting input so the cell is updated. This fixes the problem by laying out once the UI is visible again.

Note: long term, should really be destroying the UI (while preserving the model), then restoring it including scroll selection etc. and hooking back up to the model. That is... much more work, but something we'll need long term to avoid issues where we have many Notebooks open at once. Not in scope for this PR
2019-02-01 10:11:45 -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
afb6e6b5ba Fix some cell UI issues (toolbar background color, unselected cells) (#3881)
- Toolbar background is now differentiated from the editor
- For unselected cells there's no longer a line selection in the cell. This makes it clearer what the active cell is (and cleans the UI up)
2019-02-01 08:03:23 -08:00
Aditya Bist
6113311fda preserve whitespace in messages (#3821) 2019-01-31 15:23:10 -08:00