Repository navigation
perf(dashboard): only load the On This Day widget when it is displayed - #3913
Conversation
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
d0bce31 to
0a8b1cd
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The dashboard calls load() for every registered widget, so the photos-dashboard entry point is fetched on every dashboard visit. It statically imported the widget and its dependencies, pulling in ~1.7 MiB of JavaScript even when the widget is not on the user's dashboard. The entry point now only registers the widget and loads the Vue app through a dynamic import once the dashboard renders it. The initial download drops to ~5 KiB (3 files instead of 27). Closes nextcloud#2674 Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Tim <tmmmemcee@gmail.com>
The widget moved to its own module while the app still ran on Vue 2. It now mounts the way master does since the switch to Vue 3: an app of its own with the photos-dashboard id prefix and a Pinia store. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
b6b1e91 to
8602803
Compare
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
The dashboard calls load() for every registered widget, so the
photos-dashboard entry point is fetched on every dashboard visit. It
statically imported the widget and its dependencies, pulling in ~1.7 MiB
of JavaScript even when the widget is not on the user's dashboard.
The entry point now only registers the widget and loads the Vue app
through a dynamic import once the dashboard renders it. The initial
download drops to ~5 KiB (3 files instead of 27).
Closes #2674
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Tim tmmmemcee@gmail.com