-
Notifications
You must be signed in to change notification settings - Fork 62
fix(exporters): added save output button on rendered output #1664
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Kishan Patel <kpatel7927@gmail.com>
DCO Remediation Commit for Kishan Patel <kpatel7927@gmail.com> I, Kishan Patel <kpatel7927@gmail.com>, hereby add my Signed-off-by to this commit: 9e382a1 Signed-off-by: Kishan Patel <kpatel7927@gmail.com>
|
I can see that the button is easier for an end user to find and simply click than a context menu. |
…on hover Signed-off-by: Kishan Patel <kpatel7927@gmail.com>
|
I have gone in and added the suggestion with the on hover toolbar similar to the code cells. I believe this may be the most intuitive because it shares similar functionality as the other cells in the notebook. Let me know what you think! |
Signed-off-by: Kishan Patel <kpatel7927@gmail.com>
Signed-off-by: Kishan Patel <kpatel7927@gmail.com>
|
Gotcha, I have gone and fixed the log output negative top as well. |
| if (!cell) { | ||
| return; | ||
| } | ||
| let timesOutputSaved = 0; |
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.
it looks like this one is global. So if I just save another notebook, the notebook name is different but the count simply added which may look weird.
In my opinion it's not necessary to manage a count. If a name duplicated, system will prompt the user to change a name, right?
| // SPDX-License-Identifier: Apache-2.0 | ||
| import type { ActivationFunction } from "vscode-notebook-renderer"; | ||
|
|
||
| let outputIndex = 0; |
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.
looks like this one is global. So if I switch between multiple notebooks the output index will be wrong?
| `; | ||
|
|
||
| const saveButton = document.createElement("button"); | ||
| saveButton.title = "Save Output"; |
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.
i18n?
| container.style.position = "relative"; | ||
|
|
||
| if (context.postMessage) { | ||
| const toolbar = document.createElement("div"); |
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.
are you able to re-use some code with HTMLRenderer?
|
For keyboard accessibility, when I keyboard focus on the button, the button should be visible. |






Summary:
added a confirmation dialog that shows which cell's output will be saved and instructs users to click on the desired cell first before using "Save Output"
Testing:
Created new Sasnb file and tried to save output from two different cells.
TODOs:
Fixes #1648