Commit 71dffde
feat: Add commands to create Deepnote block cells (#75)
* feat: Set up a custom renderer for data frames.
* wip
* feat: Implement deepnote big number chart support and renderer
* refactor: Clean up debug logs and improve big number block conversion handling
* feat: Pass block metadata to cell outputs for renderer to access
* feat: Set up a custom renderer for data frames.
* wip
* add the table state.
* page size handling
* add page navigation
* Generate Python code before executing the cell.
* clean up
* pr feedback.
* Update build/esbuild/build.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* feat: Support Deepnote input blocks
* feat: Move DEEPNOTE_VSCODE_RAW_CONTENT_KEY into constants file
* feedback
* feat: Add Deepnote input blocks converters
* refactor: Remove debug logs and refine metadata parsing in Deepnote converters
* feat: Add chart big number converter tests
* Reformat test code
* Refactor ChartBigNumberBlockConverter tests to use deepStrictEqual for assertions
* Remove debug console.log
* docs and metadata changes.
* fix: Spread operator object fallback
* Merge remote-tracking branch 'origin/chris/display-data-frames' into tomaskislan/grn-4762-support-big-number-blocks
* use the latest blocks package.
* add the packages permission
* simplify execution flow.
* remove copyright header
* clean up the code
* revert controller changes
* pr feedback
* pr feedback
* fix the tests
* guard metadata spread against undefined.
* fix: Merge cleanup
* More merge cleanup
* Fix test
* feat: Add big number chart json config execution support
* feat: Add commands to add Deepnote SQL block and big number chart
* fix: Enhance error handling for big number metadata parsing and improve chart big number renderer logic
* refactor: Simplify chart big number renderer by directly rendering to the element and improve cleanup logic for unmounting components
* Fix import
* fix: Change deepnote_big_number_comparison_type to string type for better flexibility
* fix: Remove constants, accidentaly added to wrong branch
* Update package.json
* feat: Add new commands for SQL and Big Number Chart blocks
* feat: Update command titles and add SQL block functionality
* Fix imports
* fix: Fix imports
* fix: Remove unused code
* feat: Add support for new input blocks in Deepnote, including text, textarea, select, slider, checkbox, date, date range, file, and button blocks
* feat(big-number): Integrate react-error-boundary for error handling and enhance big number output rendering
* Update test snapshots
* feat: Update input create default values to match those in deepnote app
Signed-off-by: Tomas Kislan <tomas@kislan.sk>
* feat: Display input block type in notebook cell status bar
Signed-off-by: Tomas Kislan <tomas@kislan.sk>
* fix: Fix spell check in test
Signed-off-by: Tomas Kislan <tomas@kislan.sk>
* chore: Add error logger
Signed-off-by: Tomas Kislan <tomas@kislan.sk>
* refactor: Improve error handling in Deepnote notebook command listener
- Removed unused imports and copyright headers.
- Enhanced error handling for cell insertion operations by logging errors instead of using a no-operation function.
- Updated regex for variable name matching to ensure proper prefix handling.
Signed-off-by: Tomas Kislan <tomas@kislan.sk>
* feat: Add new input block types to command mapping
- Introduced new command mappings for various input blocks including text, textarea, select, slider, checkbox, date, date range, file, and button blocks.
Signed-off-by: Tomas Kislan <tomas@kislan.sk>
* fix: Enhance variable name parsing in Deepnote notebook command listener
- Updated the variable name extraction logic to use zod for safer parsing, ensuring that only valid strings are returned.
- Improved error handling during JSON parsing to log errors effectively.
Signed-off-by: Tomas Kislan <tomas@kislan.sk>
* feat: Enhance Deepnote notebook functionality with SQL metadata support
- Added a new schema for Deepnote SQL metadata to facilitate better handling of SQL-related input blocks.
- Updated the Deepnote notebook command listener to utilize the new SQL metadata, improving variable name management and default metadata setup for new cells.
- Enhanced the cell insertion logic to ensure proper selection and editing of newly created cells.
Signed-off-by: Tomas Kislan <tomas@kislan.sk>
* fix: Fix test
Signed-off-by: Tomas Kislan <tomas@kislan.sk>
* fix: Update default SQL integration ID in Deepnote notebook command listener
- Changed the default value of `sql_integration_id` to 'deepnote-dataframe-sql' to ensure proper integration with SQL functionalities.
Signed-off-by: Tomas Kislan <tomas@kislan.sk>
* refactor: Update src/notebooks/deepnote/deepnoteNotebookCommandListener.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* feat: Refactor Deepnote notebook command listener to support async operations and improve error handling
- Changed private methods to public async methods for adding SQL, big number chart, and input blocks, enhancing the ability to handle asynchronous operations.
- Improved error handling by throwing errors when no active notebook editor is found or when cell insertion fails.
- Updated the logic for cell insertion to ensure proper selection and editing of newly created cells.
- Enhanced unit tests to cover new async behavior and error scenarios.
Signed-off-by: Tomas Kislan <tomas@kislan.sk>
* Update spell check config
Signed-off-by: Tomas Kislan <tomas@kislan.sk>
* fix: Fix tests mocks
Signed-off-by: Tomas Kislan <tomas@kislan.sk>
* fix: Improve error messages in Deepnote notebook command listener
- Updated error handling in the DeepnoteNotebookCommandListener to use localized messages for better user experience.
- Adjusted logic for variable name suffix checks to ensure correct prefix usage.
Signed-off-by: Tomas Kislan <tomas@kislan.sk>
---------
Signed-off-by: Tomas Kislan <tomas@kislan.sk>
Co-authored-by: Christoffer Artmann <artgaard@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: James Hobbs <15235276+jamesbhobbs@users.noreply.github.com>1 parent 08a3719 commit 71dffde
File tree
13 files changed
+1442
-1
lines changed- src
- notebooks
- deepnote
- platform/common
- test
- mocks/vsc
- webviews/webview-side/chart-big-number-renderer
13 files changed
+1442
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
112 | 178 | | |
113 | 179 | | |
114 | 180 | | |
| |||
736 | 802 | | |
737 | 803 | | |
738 | 804 | | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
739 | 810 | | |
740 | 811 | | |
741 | 812 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
256 | 267 | | |
257 | 268 | | |
258 | 269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
188 | 199 | | |
0 commit comments