-
-
Notifications
You must be signed in to change notification settings - Fork 0
Add support for undo/redo on datalayer notebooks #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for vscode-datalayer ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
22c606a to
6916e04
Compare
📦 Extension Build Ready!Download the extension (works on all platforms): The artifact contains the 📖 Installation InstructionsMethod 1: VS Code UI
Method 2: Command Linecode --install-extension datalayer-jupyter-vscode.vsixMethod 3: Drag & Drop
|
6916e04 to
4e2e9e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds undo/redo functionality to datalayer notebooks by implementing keyboard shortcuts (Cmd/Ctrl+Z for undo, Cmd/Ctrl+Shift+Z or Ctrl+Y for redo) and refactoring cell insertion operations to use the centralized notebookStore2 state management.
Key changes:
- Keyboard event handlers for undo/redo operations in NotebookEditor
- Refactored cell insertion to use
notebookStore2instead of directNotebookActionscalls - Webpack configuration updates to ensure single React instance across the application
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| webview/notebook/NotebookToolbar.tsx | Refactored code/markdown cell insertion to use notebookStore2.insertBelow() instead of NotebookActions |
| webview/notebook/NotebookEditor.tsx | Added keyboard event listener for undo/redo shortcuts with platform-specific handling |
| webpack.config.js | Added React deduplication via aliases and splitChunks optimization to prevent multiple React instances |
| patches/@datalayer+jupyter-react+1.1.7.patch | Patch file adding undo/redo methods to Notebook2Adapter and Notebook2State, plus React component updates |
| package.json | Added explicit dependency on @datalayer/jupyter-react version 1.1.7 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thx @goanpeca
Fixes #9
Depends on: