From a93b2e59bc34478ff07746293da8dd9ceab684e9 Mon Sep 17 00:00:00 2001
From: btangmu
Date: Wed, 5 Jun 2024 10:25:34 -0400
Subject: [PATCH] CLDR-17658 Experiment with virtual scroller, not working yet
---
tools/cldr-apps/js/src/esm/cldrComponents.mjs | 5 +
tools/cldr-apps/js/src/index.js | 1 +
.../js/src/views/DashboardWidget.vue | 201 ++++++++----------
3 files changed, 97 insertions(+), 110 deletions(-)
diff --git a/tools/cldr-apps/js/src/esm/cldrComponents.mjs b/tools/cldr-apps/js/src/esm/cldrComponents.mjs
index 80dcb462ec2..fae3bef30f9 100644
--- a/tools/cldr-apps/js/src/esm/cldrComponents.mjs
+++ b/tools/cldr-apps/js/src/esm/cldrComponents.mjs
@@ -40,6 +40,8 @@ import {
Tooltip,
UploadDragger,
} from "ant-design-vue";
+
+import VueVirtualScroller from "vue-virtual-scroller";
// Note: 'notification' is a function and is imported as a function in cldrVue.mjs,
// or within a specific app.
@@ -90,4 +92,7 @@ function setup(app) {
app.component("cldr-value", CldrValue);
}
+// some plugins we can pull in wholesale
+app.use(VueVirtualScroller);
+
export { setup };
diff --git a/tools/cldr-apps/js/src/index.js b/tools/cldr-apps/js/src/index.js
index cbfde3f5e79..68e7781b1ed 100644
--- a/tools/cldr-apps/js/src/index.js
+++ b/tools/cldr-apps/js/src/index.js
@@ -4,6 +4,7 @@
// module stylesheets need to go here. See cldrVue.mjs
// example: import 'someModule/dist/someModule.css'
import "ant-design-vue/dist/antd.min.css";
+import "vue-virtual-scroller/dist/vue-virtual-scroller.css";
// global stylesheets
import "./css/cldrForum.css";
diff --git a/tools/cldr-apps/js/src/views/DashboardWidget.vue b/tools/cldr-apps/js/src/views/DashboardWidget.vue
index 0e0aa8282c1..d905b7d794a 100644
--- a/tools/cldr-apps/js/src/views/DashboardWidget.vue
+++ b/tools/cldr-apps/js/src/views/DashboardWidget.vue
@@ -79,113 +79,98 @@
-
-
-
-
-
-
- {{ item.message }}
-
-
-
-
-
- -->
+
+
+
+ setLastClicked(item.xpstrid)"
+ >
+
- |
- {{ entry.code }}
- |
- {{ entry.previousEnglish }} →
- {{ entry.english }}{{ abbreviate(cat) }}
+
+ {{
+ humanize(item.section + "—" + item.page)
+ }}
+ |
+
+ |
+ {{ item.code }}
+ |
+ {{ item.previousEnglish }} →
+ {{ item.english }}
+ |
+ {{ item.winning }}
+
|
- {{ entry.winning }}
-
- |
-
-
- {{ humanizeReport(entry.code) }} Report
-
-
- {
- entryCheckmarkChanged(event, entry);
- }
- "
- />
-
-
-
+
+
+ {{ humanizeReport(item.code) }} Report
+
+
+ {
+ entryCheckmarkChanged(event, entry);
+ }
+ "
+ />
+
+
+
...
@@ -194,6 +179,7 @@