Skip to content

Conversation

@jtpio
Copy link
Member

@jtpio jtpio commented Feb 20, 2023

References

Fixes #14042

Code changes

Follow the same logic as for the last modified column.

A follow-up would be to make the handling of hidden columns more generic but that might require extra refactoring work and delay delivering this feature before 4.0.

  • Make the "File Size" column hidden by default
  • Make it possible to show the "File Size" column via the settings and the context menu
  • Use B instead of Bytes for consistency
  • Allow sorting on the file size

User-facing changes

Users will be able to show the file size column (opt-in):

file-size-column.mp4

Downstream applications like Notebook 7 can then enable the column by default: jupyter/notebook#6397

Backwards-incompatible changes

None

@jupyterlab-probot
Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

@github-actions github-actions bot added Design System CSS pkg:filebrowser tag:CSS For general CSS related issues and pecadilloes tag:Testing labels Feb 20, 2023
@jtpio jtpio added this to the 4.0.0 milestone Feb 20, 2023
@jtpio
Copy link
Member Author

jtpio commented Feb 20, 2023

Need to look into some visual regressions:

image

node.appendChild(name);
node.appendChild(narrow);
node.appendChild(modified);
node.appendChild(fileSize);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 performance-wise the approach taken by checkboxes seems better, maintenance-wise the simpler the better. Any benefit of not rendering these will only slightly increase the maximal bearable size of the directory before it starts lagging and we could save much more by lazy-rendering and using content-visibility CSS - so I think it is fine to proceed as is.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, while working on this it looked like the file browser could benefit from some refactoring especially in how the hidden columns are handled.

Since I'm not sure we will want to add more columns in the near future I would also say it's fine to leave it as is for now to not delay the merge before the 4.0 feature freeze.

We can open an issue to track further improvements, which could happen during the beta and rc cycles if time permits.

@jtpio jtpio marked this pull request as ready for review February 21, 2023 08:11
@jtpio
Copy link
Member Author

jtpio commented Feb 21, 2023

CI is now passing, marking as ready for review.

@jtpio jtpio requested a review from krassowski February 21, 2023 08:12
@jtpio jtpio force-pushed the filebrowser-file-size branch from a313bf9 to 3603574 Compare February 21, 2023 08:43
@jtpio
Copy link
Member Author

jtpio commented Feb 21, 2023

Rebasing so it can be tested in Binder now that #14038 is merged.

Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@github-actions
Copy link
Contributor

github-actions bot commented Feb 21, 2023

Benchmark report

The execution time (in milliseconds) are grouped by test file, test type and browser.
For each case, the following values are computed: min <- [1st quartile - median - 3rd quartile] -> max.

The mean relative comparison is computed with 95% confidence.

Results table
Test file large_code_notebook large_md_notebook
open
chromium
actual 511 <- [536 - 548 - 565] -> 619 990 <- [1086 - 1110 - 1146] -> 1285
expected 500 <- [534 - 545 - 563] -> 675 994 <- [1069 - 1095 - 1115] -> 1225
Mean relative change ⚠️ 0.4% ± 1.2% 2.4% ± 1.3%
switch-from
chromium
actual 636 <- [710 - 733 - 752] -> 822 275 <- [361 - 395 - 419] -> 507
expected 643 <- [718 - 736 - 749] -> 960 279 <- [374 - 400 - 422] -> 507
Mean relative change ⚠️ -1.0% ± 1.5% -2.3% ± 3.0%
switch-to
chromium
actual 1177 <- [1289 - 1345 - 1387] -> 1478 848 <- [946 - 986 - 1013] -> 1089
expected 1186 <- [1311 - 1347 - 1382] -> 1593 899 <- [950 - 979 - 1002] -> 1073
Mean relative change ⚠️ -0.8% ± 1.3% 0.2% ± 1.2%
close
chromium
actual 135 <- [145 - 150 - 154] -> 210 189 <- [208 - 219 - 229] -> 284
expected 131 <- [145 - 149 - 153] -> 192 181 <- [210 - 220 - 232] -> 330
Mean relative change ⚠️ 0.8% ± 1.8% -1.7% ± 2.5%

Changes are computed with expected as reference.

@jupyterlab/benchmarks@1.0.0 test:mocha
mocha ./tests/

Waiting for localhost:8888
localhost:8888 is up

Cell memory leaks

Create a code cell Memory change: +145 kB Leak detected: Yes

Leaking objects:

Object # added Retained size increase
ArraySearchMarker 1 +5 B
ContentString 1 +76 B
Detached Text 1 +61 B
ResizeHandle 1 +47 B
Set 1 +133 B
Signal 1 +38 B
UndoManager 1 +1.38 kB
YArray 1 +164 B
YText 1 +314 B
Detached DOMStringMap 2 +96 B
Detached V8EventHandlerNonNull 2 +80 B
StackItem 2 +952 B
YMap 2 +464 B
ContentType 4 +273 B
DeleteItem 4 +80 B
DeleteSet 4 +720 B
StyleModule 4 +128 B
ContentAny 5 +288 B
Detached HTMLCollection 6 +564 B
EventHandler 8 +256 B
ID 10 +320 B
Item 10 +1.45 kB
Map 11 +1.74 kB
Detached Attr 13 +936 B
Detached DOMTokenList 13 +832 B
Detached HTMLDivElement 13 +45 kB
Detached V8EventListener 262 +21.9 kB
(closure) 264 +24.9 kB
Detached EventListener 264 +41 kB
Detached InternalNode 318 +43.5 kB

Leaking collections:

Type Change Preview Size increased at
Array +2 [StackItem, ...]
UndoManager.afterTransactionHandler  http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:5030:15
webpack://jupyterlab/node_modules/lib0/observable.js:73:62
Array.forEach <anonymous>
webpack://jupyterlab/node_modules/lib0/observable.js:73:62
Array.<anonymous> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4693:27
webpack://jupyterlab/node_modules/lib0/function.js:19:0
cleanupTransactions http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4695:62
transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4810:9
Doc.transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:2023:5
Array +4 [StyleModule, ...]
  webpack://jupyterlab/node_modules/style-mod/src/style-mod.js:115:0     
webpack://jupyterlab/node_modules/style-mod/src/style-mod.js:79:0
webpack://jupyterlab/node_modules/@codemirror/view/dist/index.js:6649:8
webpack://jupyterlab/node_modules/@codemirror/view/dist/index.js:6300:0
webpack://jupyterlab/packages/codemirror/src/editor.ts:954:17
webpack://jupyterlab/packages/codemirror/src/editor.ts:163:27
webpack://jupyterlab/packages/codemirror/src/factory.ts:61:11
webpack://jupyterlab/packages/codeeditor/src/jsoneditor.ts:83:26
webpack://jupyterlab/packages/notebook/src/notebooktools.ts:676:21
Array +10 [Item, ...]
addStruct                    http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4268:11
Item.integrate http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:11054:7
<unknown> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6617:22
Array.forEach <anonymous>
typeListInsertGenericsAfter http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6590:11
typeListInsertGenerics http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6677:10
<unknown> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6996:9
transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4796:5
YArray.insert http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6995:7
Set +1 Set((anonymous function), ...)
                 webpack://jupyterlab/node_modules/lib0/observable.js:30:56                                            
Doc.on http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:2182:11
new UndoManager http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:5049:14
webpack://jupyterlab/node_modules/y-codemirror.next/src/y-sync.js:11:0
webpack://jupyterlab/node_modules/y-codemirror.next/src/index.js:20:0
webpack://jupyterlab/packages/codemirror/src/editor.ts:947:16
webpack://jupyterlab/packages/codemirror/src/editor.ts:163:27
webpack://jupyterlab/packages/codemirror/src/factory.ts:61:11
webpack://jupyterlab/packages/codeeditor/src/widget.ts:40:42
Set +1 Set((anonymous function), ...)
                 webpack://jupyterlab/node_modules/lib0/observable.js:30:56                                            
Doc.on http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:2182:11
new UndoManager http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:5050:14
webpack://jupyterlab/node_modules/y-codemirror.next/src/y-sync.js:11:0
webpack://jupyterlab/node_modules/y-codemirror.next/src/index.js:20:0
webpack://jupyterlab/packages/codemirror/src/editor.ts:947:16
webpack://jupyterlab/packages/codemirror/src/editor.ts:163:27
webpack://jupyterlab/packages/codemirror/src/factory.ts:61:11
webpack://jupyterlab/packages/codeeditor/src/widget.ts:40:42
Create a markdown cell Memory change: +179 kB Leak detected: Yes

Leaking objects:

Object # added Retained size increase
ActivityMonitor 1 +450 B
ArraySearchMarker 1 +5 B
AttachmentsModel 1 +199 B
AttachmentsResolver 1 +14 B
ContentString 1 +76 B
Debouncer 1 +3.47 kB
Detached HTMLAnchorElement 1 +288 B
Detached HTMLButtonElement 1 +5.45 kB
Detached HTMLHeadingElement 1 +920 B
Error 1 +3.03 kB
MarkdownCell 1 +4.89 kB
MarkdownCellModel 1 +381 B
Poll 1 +3.45 kB
RenderMimeRegistry 1 +227 B
RenderedMarkdown 1 +66 B
Transaction 1 +876 B
YArray 1 +164 B
YArrayEvent 1 +357 B
YMarkdownCell 1 +137 B
Detached CSSStyleDeclaration 2 +116 B
Detached HTMLElement 2 +288 B
Detached V8EventHandlerNonNull 2 +5.19 kB
ObservableMap 2 +272 B
Promise 2 +3.08 kB
PromiseDelegate 2 +3.29 kB
StackItem 2 +932 B
UndoManager 2 +1.76 kB
YText 2 +534 B
DeleteItem 3 +60 B
Detached DOMStringMap 3 +120 B
DeleteSet 4 +700 B
YMap 4 +872 B
ContentAny 5 +490 B
ContentType 7 +718 B
Detached Text 7 +448 B
Set 8 +729 B
StyleModule 8 +256 B
Detached HTMLDivElement 10 +26.2 kB
Detached DOMTokenList 13 +756 B
ID 13 +416 B
Item 13 +2.37 kB
EventHandler 14 +448 B
Detached HTMLCollection 17 +1.69 kB
Signal 20 +342 B
Map 23 +3.38 kB
Detached V8EventListener 130 +10.9 kB
Detached EventListener 132 +25.6 kB
(closure) 151 +39.4 kB
Detached InternalNode 162 +28.2 kB

Leaking collections:

Type Change Preview Size increased at
Array +1 [12224b66-b61f-43e8-be87-f6ee37cfb667, ...]
                                     webpack://jupyterlab/packages/notebook/src/actions.tsx:2425:37            
Array.forEach <anonymous>
webpack://jupyterlab/packages/notebook/src/actions.tsx:2420:21
webpack://jupyterlab/packages/notebook/src/actions.tsx:350:12
webpack://jupyterlab/packages/notebook-extension/src/index.ts:2289:15
CommandRegistry.execute http://localhost:8888/static/lab/jlab_core.96413890f399fcab10e0.js:5748:33
CommandRegistry._executeKeyBinding http://localhost:8888/static/lab/jlab_core.96413890f399fcab10e0.js:5906:14
CommandRegistry.processKeydownEvent http://localhost:8888/static/lab/jlab_core.96413890f399fcab10e0.js:5846:18
JupyterLab.evtKeydown http://localhost:8888/static/lab/jlab_core.96413890f399fcab10e0.js:4660:23
Array +2 [StackItem, ...]
UndoManager.afterTransactionHandler  http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:5030:15
webpack://jupyterlab/node_modules/lib0/observable.js:73:62
Array.forEach <anonymous>
webpack://jupyterlab/node_modules/lib0/observable.js:73:62
Array.<anonymous> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4693:27
webpack://jupyterlab/node_modules/lib0/function.js:19:0
cleanupTransactions http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4695:62
transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4810:9
Doc.transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:2023:5
Array +8 [StyleModule, ...]
  webpack://jupyterlab/node_modules/style-mod/src/style-mod.js:115:0     
webpack://jupyterlab/node_modules/style-mod/src/style-mod.js:79:0
webpack://jupyterlab/node_modules/@codemirror/view/dist/index.js:6649:8
webpack://jupyterlab/node_modules/@codemirror/view/dist/index.js:6300:0
webpack://jupyterlab/packages/codemirror/src/editor.ts:954:17
webpack://jupyterlab/packages/codemirror/src/editor.ts:163:27
webpack://jupyterlab/packages/codemirror/src/factory.ts:61:11
webpack://jupyterlab/packages/codeeditor/src/jsoneditor.ts:83:26
webpack://jupyterlab/packages/notebook/src/notebooktools.ts:676:21
Array +13 [Item, ...]
addStruct                    http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4268:11
Item.integrate http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:11054:7
<unknown> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6617:22
Array.forEach <anonymous>
typeListInsertGenericsAfter http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6590:11
typeListInsertGenerics http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6677:10
<unknown> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6996:9
transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4796:5
YArray.insert http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6995:7
Set +2 Set((anonymous function), ...)
                 webpack://jupyterlab/node_modules/lib0/observable.js:30:56                                            
Doc.on http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:2182:11
new UndoManager http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:5049:14
webpack://jupyterlab/node_modules/y-codemirror.next/src/y-sync.js:11:0
webpack://jupyterlab/node_modules/y-codemirror.next/src/index.js:20:0
webpack://jupyterlab/packages/codemirror/src/editor.ts:947:16
webpack://jupyterlab/packages/codemirror/src/editor.ts:163:27
webpack://jupyterlab/packages/codemirror/src/factory.ts:61:11
webpack://jupyterlab/packages/codeeditor/src/widget.ts:40:42
Set +2 Set((anonymous function), ...)
                 webpack://jupyterlab/node_modules/lib0/observable.js:30:56                                            
Doc.on http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:2182:11
new UndoManager http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:5050:14
webpack://jupyterlab/node_modules/y-codemirror.next/src/y-sync.js:11:0
webpack://jupyterlab/node_modules/y-codemirror.next/src/index.js:20:0
webpack://jupyterlab/packages/codemirror/src/editor.ts:947:16
webpack://jupyterlab/packages/codemirror/src/editor.ts:163:27
webpack://jupyterlab/packages/codemirror/src/factory.ts:61:11
webpack://jupyterlab/packages/codeeditor/src/widget.ts:40:42
Create a raw cell Memory change: +141 kB Leak detected: Yes

Leaking objects:

Object # added Retained size increase
ArraySearchMarker 1 +5 B
ContentString 1 +76 B
Detached CSSStyleDeclaration 1 +56 B
Detached V8EventHandlerNonNull 1 +40 B
YArray 1 +164 B
Detached DOMStringMap 2 +84 B
Set 2 +281 B
StackItem 2 +932 B
UndoManager 2 +1.77 kB
YText 2 +749 B
DeleteItem 3 +60 B
DeleteSet 4 +700 B
YMap 4 +872 B
ContentAny 5 +524 B
Detached HTMLCollection 5 +452 B
ContentType 7 +718 B
StyleModule 7 +224 B
Detached DOMTokenList 9 +520 B
Detached HTMLDivElement 9 +22.5 kB
ID 13 +416 B
Item 13 +2.4 kB
EventHandler 14 +448 B
Map 15 +2.61 kB
Object 33 +6.82 kB
Detached V8EventListener 130 +10.9 kB
Detached EventListener 131 +20.4 kB
(closure) 138 +22.8 kB
Detached InternalNode 151 +21.5 kB

Leaking collections:

Type Change Preview Size increased at
Array +1 [75bfe8b3-da56-41a6-881b-c33ba7f56ea7, ...]
                                     webpack://jupyterlab/packages/notebook/src/actions.tsx:2425:37            
Array.forEach <anonymous>
webpack://jupyterlab/packages/notebook/src/actions.tsx:2420:21
webpack://jupyterlab/packages/notebook/src/actions.tsx:350:12
webpack://jupyterlab/packages/notebook-extension/src/index.ts:2289:15
CommandRegistry.execute http://localhost:8888/static/lab/jlab_core.96413890f399fcab10e0.js:5748:33
CommandRegistry._executeKeyBinding http://localhost:8888/static/lab/jlab_core.96413890f399fcab10e0.js:5906:14
CommandRegistry.processKeydownEvent http://localhost:8888/static/lab/jlab_core.96413890f399fcab10e0.js:5846:18
JupyterLab.evtKeydown http://localhost:8888/static/lab/jlab_core.96413890f399fcab10e0.js:4660:23
Array +2 [StackItem, ...]
UndoManager.afterTransactionHandler  http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:5030:15
webpack://jupyterlab/node_modules/lib0/observable.js:73:62
Array.forEach <anonymous>
webpack://jupyterlab/node_modules/lib0/observable.js:73:62
Array.<anonymous> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4693:27
webpack://jupyterlab/node_modules/lib0/function.js:19:0
cleanupTransactions http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4695:62
transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4810:9
Doc.transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:2023:5
Array +7 [StyleModule, ...]
  webpack://jupyterlab/node_modules/style-mod/src/style-mod.js:115:0     
webpack://jupyterlab/node_modules/style-mod/src/style-mod.js:79:0
webpack://jupyterlab/node_modules/@codemirror/view/dist/index.js:6649:8
webpack://jupyterlab/node_modules/@codemirror/view/dist/index.js:6300:0
webpack://jupyterlab/packages/codemirror/src/editor.ts:954:17
webpack://jupyterlab/packages/codemirror/src/editor.ts:163:27
webpack://jupyterlab/packages/codemirror/src/factory.ts:61:11
webpack://jupyterlab/packages/codeeditor/src/jsoneditor.ts:83:26
webpack://jupyterlab/packages/notebook/src/notebooktools.ts:676:21
Array +13 [Item, ...]
addStruct                    http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4268:11
Item.integrate http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:11054:7
<unknown> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6617:22
Array.forEach <anonymous>
typeListInsertGenericsAfter http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6590:11
typeListInsertGenerics http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6677:10
<unknown> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6996:9
transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4796:5
YArray.insert http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6995:7
Set +2 Set((anonymous function), ...)
                 webpack://jupyterlab/node_modules/lib0/observable.js:30:56                                            
Doc.on http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:2182:11
new UndoManager http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:5049:14
webpack://jupyterlab/node_modules/y-codemirror.next/src/y-sync.js:11:0
webpack://jupyterlab/node_modules/y-codemirror.next/src/index.js:20:0
webpack://jupyterlab/packages/codemirror/src/editor.ts:947:16
webpack://jupyterlab/packages/codemirror/src/editor.ts:163:27
webpack://jupyterlab/packages/codemirror/src/factory.ts:61:11
webpack://jupyterlab/packages/codeeditor/src/widget.ts:40:42
Set +2 Set((anonymous function), ...)
                 webpack://jupyterlab/node_modules/lib0/observable.js:30:56                                            
Doc.on http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:2182:11
new UndoManager http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:5050:14
webpack://jupyterlab/node_modules/y-codemirror.next/src/y-sync.js:11:0
webpack://jupyterlab/node_modules/y-codemirror.next/src/index.js:20:0
webpack://jupyterlab/packages/codemirror/src/editor.ts:947:16
webpack://jupyterlab/packages/codemirror/src/editor.ts:163:27
webpack://jupyterlab/packages/codemirror/src/factory.ts:61:11
webpack://jupyterlab/packages/codeeditor/src/widget.ts:40:42
✔ Adding a cell (238302ms) - Drag and drop a cell

File editor memory leaks

Create a file Memory change: -81.1 kB Leak detected: No

Leaking objects:

Object # added Retained size increase
Detached HTMLUListElement 1 +2.31 kB
Detached V8EventHandlerNonNull 1 +40 B
VirtualElementPass 1 +46 B
Detached HTMLButtonElement 2 +23.7 kB
Detached SVGCircleElement 2 +1.1 kB
HTMLDivElement 2 +252 B
LabIcon 2 +1.08 kB
Detached CSSStyleDeclaration 3 +232 B
Detached HTMLLIElement 3 +5.23 kB
Detached NodeList 3 +192 B
NavigationHistoryEntry 3 +720 B
VirtualText 3 +109 B
Detached SVGGElement 4 +2.94 kB
StyleModule 4 +661 B
VirtualElement 4 +3.48 kB
Detached SVGAnimatedPreserveAspectRatio 5 +320 B
Detached SVGAnimatedRect 5 +320 B
Detached SVGPathElement 5 +1.77 kB
Detached SVGSVGElement 5 +7.93 kB
Detached HTMLSpanElement 6 +2.3 kB
Detached DOMStringMap 7 +392 B
Detached SVGAnimatedNumber 7 +448 B
Detached Attr 10 +720 B
Detached Text 10 +720 B
Detached HTMLCollection 13 +1.42 kB
Detached DOMTokenList 14 +944 B
Detached HTMLDivElement 15 +32.7 kB
DOMRectReadOnly 16 +896 B
Detached SVGAnimatedString 16 +896 B
Detached SVGAnimatedTransformList 16 +1.02 kB
Detached SVGAnimatedLength 26 +1.66 kB
Detached V8EventListener 130 +10.9 kB
Detached EventListener 131 +20.4 kB
(closure) 138 +-8.96 kB

Leaking collections:

Type Change Preview Size increased at
Array +4 [StyleModule, ...]
  webpack://jupyterlab/node_modules/style-mod/src/style-mod.js:115:0     
webpack://jupyterlab/node_modules/style-mod/src/style-mod.js:79:0
webpack://jupyterlab/node_modules/@codemirror/view/dist/index.js:6649:8
webpack://jupyterlab/node_modules/@codemirror/view/dist/index.js:6300:0
webpack://jupyterlab/packages/codemirror/src/editor.ts:954:17
webpack://jupyterlab/packages/codemirror/src/editor.ts:163:27
webpack://jupyterlab/packages/codemirror/src/factory.ts:73:11
webpack://jupyterlab/packages/fileeditor/src/widget.ts:219:13
webpack://jupyterlab/packages/codeeditor/src/widget.ts:40:42
✔ Opening a text file (73094ms)

Notebook memory leaks

Create a notebook Memory change: +25.7 kB Leak detected: Yes

Leaking objects:

Object # added Retained size increase
Detached HTMLUListElement 1 +3.19 kB
Detached V8EventHandlerNonNull 1 +40 B
VirtualElementPass 1 +61 B
Detached HTMLButtonElement 2 +23.7 kB
Detached SVGCircleElement 2 +1.1 kB
LabIcon 2 +67 B
Detached CSSStyleDeclaration 3 +252 B
Detached HTMLLIElement 3 +6.9 kB
Detached NodeList 3 +208 B
NavigationHistoryEntry 3 +720 B
VirtualText 3 +109 B
VirtualElement 4 +1.15 kB
Detached SVGAnimatedPreserveAspectRatio 5 +320 B
Detached SVGAnimatedRect 5 +320 B
Detached SVGSVGElement 5 +9.41 kB
Detached HTMLSpanElement 6 +3.16 kB
Detached SVGGElement 6 +4.9 kB
Detached SVGPathElement 7 +2.47 kB
StyleModule 8 +789 B
Detached SVGAnimatedNumber 9 +576 B
Detached Attr 10 +720 B
Detached Text 10 +956 B
Detached HTMLCollection 13 +1.44 kB
Detached DOMTokenList 15 +1.09 kB
Detached HTMLDivElement 15 +34.4 kB
Detached SVGAnimatedString 20 +1.12 kB
Detached SVGAnimatedTransformList 20 +1.28 kB
Detached SVGAnimatedLength 26 +1.66 kB
Detached V8EventListener 130 +10.9 kB
Detached EventListener 131 +20.4 kB
(closure) 138 +27.7 kB

Leaking collections:

Type Change Preview Size increased at
Array +8 [StyleModule, ...]
  webpack://jupyterlab/node_modules/style-mod/src/style-mod.js:115:0     
webpack://jupyterlab/node_modules/style-mod/src/style-mod.js:79:0
webpack://jupyterlab/node_modules/@codemirror/view/dist/index.js:6649:8
webpack://jupyterlab/node_modules/@codemirror/view/dist/index.js:6300:0
webpack://jupyterlab/packages/codemirror/src/editor.ts:954:17
webpack://jupyterlab/packages/codemirror/src/editor.ts:163:27
webpack://jupyterlab/packages/codemirror/src/factory.ts:61:11
webpack://jupyterlab/packages/codeeditor/src/jsoneditor.ts:83:26
webpack://jupyterlab/packages/notebook/src/notebooktools.ts:676:21
✔ Opening a notebook (77765ms)

3 passing (6m)
1 pending

Copy link
Member

@krassowski krassowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor small style suggestion.

Is it worth adding a galata test with chekboxes and file sizes shown? I am not 100% sure but I think we do not have it under test. It could reuse this snippet

jtpio and others added 2 commits February 22, 2023 08:00
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
@jtpio
Copy link
Member Author

jtpio commented Feb 22, 2023

I am not 100% sure but I think we do not have it under test

I am also not sure, because this PR adds a couple of styling rules for the file size column.

It could reuse this snippet

Maybe we can try adding a click on "Show File Size Column" in the same test.

@jtpio
Copy link
Member Author

jtpio commented Feb 23, 2023

Maybe we can try adding a click on "Show File Size Column" in the same test.

Pushed 49d2257, maybe it's enough for now if the UI tests pass. We could also track adding a visual regression test (but that could be done separately).

@jtpio
Copy link
Member Author

jtpio commented Feb 23, 2023

OK CI is now passing.

Copy link
Member

@krassowski krassowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@krassowski krassowski merged commit dd38238 into jupyterlab:master Feb 23, 2023
@jtpio jtpio deleted the filebrowser-file-size branch February 23, 2023 19:42
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show file size in the file browser

3 participants