-
Notifications
You must be signed in to change notification settings - Fork 506
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
Switch to a lab-based app for the Voila frontend #846
Conversation
shared: { | ||
...data.dependencies | ||
} |
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.
This might be revisited at some point, based on the discussions in jupyterlab/jupyterlab#9829
e96e5be
to
65b7185
Compare
It's looking really promising 🎉 ! Some thoughts on things in the description:
It seems like the localization, themes, and the (hopefully) upcoming licenses, would be worth the cost of the dependency. I also imagine workspaces being a fairly killer feature at some point, perhaps with a locked down DockPanel (e.g. hidden tabs if there aren't any, fixed aspect ratios). Settings would be... complicated.
Whatever happens, a public CDN requirement (or having to run one's own, unless shipped as part of this tool, or otherwise easily installed and served from the same host) is going to be a hard pass for a lot of deployment scenarios... |
Thanks!
Probably it would make sense to depend on it, since it would make the Voila frontend a lot more like JupyterLab and easier to reuse extensions too. We just need to make sure it doesn't open the door to some misuses (by adding more endpoints). For the settings the lab It might be possible to make it optional, so the |
Re: endpoints: the addition of the handler (and adding the info to PageConfig, etc) is gated by whether the URL is set: This could probably be made even more explicit and regular... it would likely be an even better approach to break up that function into something with many smaller methods that can be overridden by the implementation. Made an issue! |
Also, I generally try to respect the draft status, and really appreciate you sharing... but if there's anything I can do to help, please let me know! |
Thanks for opening this!
Yes the idea of opening the PR early is to get a clearer idea of potential issues, and also send upstream fixes early if needed. For now it would be great to try to go through the list of todo items in the top post, and reach parity with the existing frontend (with |
Another thing we might want to revive soon is the switch to an Which might help streamline the setup and reuse bits of other ExtensionApps. Although in that case the Voila ExtensionApp would be configured with |
voila/handler.py
Outdated
} | ||
|
||
mathjax_config = self.settings.get("mathjax_config", "TeX-AMS_HTML-full,Safe") | ||
# TODO Remove CDN usage. |
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.
You should be able to depend on this: https://github.com/jupyter-server/jupyter_server_mathjax
We need to cast "as any" until this is merged and released: jupyter-widgets/ipywidgets#3625
update galata references |
Benchmark reportThe execution time (in milliseconds) are grouped by test file, test type and browser. Results table
❗ Test metadata have changed--- /dev/fd/63 2022-10-27 10:12:24.936589904 +0000
+++ /dev/fd/62 2022-10-27 10:12:24.940589906 +0000
@@ -4,37 +4,37 @@
"BENCHMARK_REFERENCE": "actual"
},
"browsers": {
- "chromium": "97.0.4666.0"
+ "chromium": "94.0.4595.0"
},
"systemInformation": {
"cpu": {
- "brand": "Xeon® Platinum 8370C",
+ "brand": "Xeon® E5-2673 v3",
"cache": {
- "l1d": 98304,
+ "l1d": 65536,
"l1i": 65536,
- "l2": 2097152,
- "l3": 50331648
+ "l2": 524288,
+ "l3": 31457280
},
"cores": 2,
"family": "6",
- "flags": "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm avx512f avx512dq rdseed adx smap clflushopt avx512cd avx512bw avx512vl xsaveopt xsavec xsaves md_clear",
+ "flags": "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm invpcid_single pti fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt md_clear",
"governor": "",
"manufacturer": "Intel®",
- "model": "106",
+ "model": "63",
"physicalCores": 2,
"processors": 1,
"revision": "",
"socket": "",
- "speed": 2.8,
+ "speed": 2.4,
"speedMax": null,
"speedMin": null,
- "stepping": "6",
+ "stepping": "2",
"vendor": "GenuineIntel",
"virtualization": false,
"voltage": ""
},
"mem": {
- "total": 7281311744
+ "total": 7291699200
},
"osInfo": {
"arch": "x64",
@@ -42,11 +42,11 @@
"codename": "Focal Fossa",
"codepage": "UTF-8",
"distro": "Ubuntu",
- "kernel": "5.15.0-1022-azure",
+ "kernel": "5.8.0-1040-azure",
"logofile": "ubuntu",
"platform": "linux",
- "release": "20.04.5 LTS",
- "serial": "9720c16c9bca4d94b48929079ff4f0c7",
+ "release": "20.04.3 LTS",
+ "serial": "cfc067bfcb844f35865e279a1b0e66c5",
"servicepack": "",
"uefi": false
} |
Benchmark reportThe execution time (in milliseconds) are grouped by test file, test type and browser. Results table
❗ Test metadata have changed--- /dev/fd/63 2022-10-27 10:19:51.538672454 +0000
+++ /dev/fd/62 2022-10-27 10:19:51.538672454 +0000
@@ -4,37 +4,37 @@
"BENCHMARK_REFERENCE": "actual"
},
"browsers": {
- "chromium": "97.0.4666.0"
+ "chromium": "94.0.4595.0"
},
"systemInformation": {
"cpu": {
- "brand": "Xeon® Platinum 8272CL",
+ "brand": "Xeon® E5-2673 v3",
"cache": {
"l1d": 65536,
"l1i": 65536,
- "l2": 2097152,
- "l3": 36700160
+ "l2": 524288,
+ "l3": 31457280
},
"cores": 2,
"family": "6",
- "flags": "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm avx512f avx512dq rdseed adx smap clflushopt avx512cd avx512bw avx512vl xsaveopt xsavec xsaves md_clear",
+ "flags": "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm invpcid_single pti fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt md_clear",
"governor": "",
"manufacturer": "Intel®",
- "model": "85",
+ "model": "63",
"physicalCores": 2,
"processors": 1,
"revision": "",
"socket": "",
- "speed": 2.6,
+ "speed": 2.4,
"speedMax": null,
"speedMin": null,
- "stepping": "7",
+ "stepping": "2",
"vendor": "GenuineIntel",
"virtualization": false,
"voltage": ""
},
"mem": {
- "total": 7281307648
+ "total": 7291699200
},
"osInfo": {
"arch": "x64",
@@ -42,11 +42,11 @@
"codename": "Focal Fossa",
"codepage": "UTF-8",
"distro": "Ubuntu",
- "kernel": "5.15.0-1022-azure",
+ "kernel": "5.8.0-1040-azure",
"logofile": "ubuntu",
"platform": "linux",
- "release": "20.04.5 LTS",
- "serial": "9720c16c9bca4d94b48929079ff4f0c7",
+ "release": "20.04.3 LTS",
+ "serial": "cfc067bfcb844f35865e279a1b0e66c5",
"servicepack": "",
"uefi": false
} |
7cdbd6c
to
037d313
Compare
I removed the ui-test with ipyvolume. We could probably reduce the number of ui-tests to the bare minimum. Checking that one custom widget extension works is already enough to check that Voila works properly with custom widgets, testing more can only lead to unreliable tests. |
Benchmark reportThe execution time (in milliseconds) are grouped by test file, test type and browser. Results table
❗ Test metadata have changed--- /dev/fd/63 2022-10-27 13:44:55.095045738 +0000
+++ /dev/fd/62 2022-10-27 13:44:55.095045738 +0000
@@ -4,37 +4,37 @@
"BENCHMARK_REFERENCE": "actual"
},
"browsers": {
- "chromium": "97.0.4666.0"
+ "chromium": "94.0.4595.0"
},
"systemInformation": {
"cpu": {
- "brand": "Xeon® Platinum 8272CL",
+ "brand": "Xeon® E5-2673 v3",
"cache": {
"l1d": 65536,
"l1i": 65536,
- "l2": 2097152,
- "l3": 36700160
+ "l2": 524288,
+ "l3": 31457280
},
"cores": 2,
"family": "6",
- "flags": "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm avx512f avx512dq rdseed adx smap clflushopt avx512cd avx512bw avx512vl xsaveopt xsavec xsaves md_clear",
+ "flags": "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm invpcid_single pti fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt md_clear",
"governor": "",
"manufacturer": "Intel®",
- "model": "85",
+ "model": "63",
"physicalCores": 2,
"processors": 1,
"revision": "",
"socket": "",
- "speed": 2.6,
+ "speed": 2.4,
"speedMax": null,
"speedMin": null,
- "stepping": "7",
+ "stepping": "2",
"vendor": "GenuineIntel",
"virtualization": false,
"voltage": ""
},
"mem": {
- "total": 7281307648
+ "total": 7291699200
},
"osInfo": {
"arch": "x64",
@@ -42,11 +42,11 @@
"codename": "Focal Fossa",
"codepage": "UTF-8",
"distro": "Ubuntu",
- "kernel": "5.15.0-1022-azure",
+ "kernel": "5.8.0-1040-azure",
"logofile": "ubuntu",
"platform": "linux",
- "release": "20.04.5 LTS",
- "serial": "9720c16c9bca4d94b48929079ff4f0c7",
+ "release": "20.04.3 LTS",
+ "serial": "cfc067bfcb844f35865e279a1b0e66c5",
"servicepack": "",
"uefi": false
} |
That one has indeed been very unstable on that branch so fine to remove it 👍 Otherwise we could remove the reference snapshot and do a DOM test instead. |
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.
Thanks to all for working on this awesome PR! |
Switch to a lab-based app for the Voila frontend.
Closes #4.
Closes #238
Might fix #904
This replaces the current
requirejs
+nbextensions
approach by a JupyterLab plugin based application.Current Status
Basic rendering of widgets, still a couple of issues to fix:
TODO
requirejs
-> keeprequire.min.js
forreveal
compatibilitymain.js
file in the template/share/jupyter/labextensions
for now)beforeunload
logic in a pluginpage_config
voila.js
and the the other chunks like in jupyterlab for nowRemove dependency on-> for nowjupyterlab_server
if it is not strictly neededjupyterlab_server
is only used for building the list of federated extensions withget_page_config()
@jupyter-widgets/[email protected]
packages, to switch to aKernelWidgetManager
: https://github.com/jupyter-widgets/ipywidgets/blob/1a121620aea08b2df4bcf92e851bd961317dc1db/jupyterlab_widgets/src/manager.ts#L409[SKIP] Check how to keep the rate limiting logic-> will not do in this PR as this might not be needed based on the comment in Switch to a lab-based app for the Voila frontend #846 (comment)Next steps
Load JupyterLab extensions from the CDN? Requires upstream feature for dynamic extensions?
Support JupyterLab themes, as an alternative or in addition to the theme and light themes from
nbconvert
: https://github.com/jupyter/nbconvert/blob/957c2e2476e1106fd4976af7d104c01cd5bb7562/setup.py#L52-L56