Skip to content

Commit ef9e923

Browse files
authored
Hide auto-generated cell in ipynb workflows (#1574)
## Changes Using the same metadata that web UI sets when you click on "hide code" option for a cell. It looks like this, and the cell can be expanded by clicking on the eye button (after which you can't hide it anymore) <img width="991" alt="Screenshot 2025-02-25 at 15 31 09" src="https://github.com/user-attachments/assets/15029782-f4ee-4405-a3ba-e3cc322a8bad" /> Dbnb notebooks will still have the generated cells visible. ## Tests Manually + existing integ tests
1 parent 2fb7336 commit ef9e923

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/databricks-vscode/scripts/writeIpynbWrapper.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ interface INbCell {
1414
const nbCell: INbCell = {
1515
cell_type: "code",
1616
source: [],
17-
metadata: {},
17+
metadata: {
18+
jupyter: {
19+
source_hidden: true,
20+
},
21+
},
1822
outputs: [],
1923
execution_count: null,
2024
};

0 commit comments

Comments
 (0)