From 005be9ab1dee08f5de6e40db281377b7eb3c3050 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Thu, 30 May 2024 11:49:13 -0500 Subject: [PATCH] CLDR-17462 main CSS should be loaded in the bundle, not by Java. - move redesign.css and surveytool.css out of java printfs and into index.js - this gives us the capability for minimization and reduces network loads --- tools/cldr-apps/js/src/index.js | 2 ++ .../src/main/java/org/unicode/cldr/web/SurveyTool.java | 9 --------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/tools/cldr-apps/js/src/index.js b/tools/cldr-apps/js/src/index.js index c94442877f2..d3767cad281 100644 --- a/tools/cldr-apps/js/src/index.js +++ b/tools/cldr-apps/js/src/index.js @@ -4,6 +4,8 @@ // global stylesheets import "./css/cldrForum.css"; import "../../../cldr-code/src/main/resources/org/unicode/cldr/tool/reports.css"; +import "../../../cldr-apps/src/main/webapp/surveytool.css"; +import "../../../cldr-apps/src/main/webapp/css/redesign.css"; // module stylesheets need to go here. See cldrVue.mjs // example: import 'someModule/dist/someModule.css' diff --git a/tools/cldr-apps/src/main/java/org/unicode/cldr/web/SurveyTool.java b/tools/cldr-apps/src/main/java/org/unicode/cldr/web/SurveyTool.java index ffe052fa03d..ddde577fe54 100644 --- a/tools/cldr-apps/src/main/java/org/unicode/cldr/web/SurveyTool.java +++ b/tools/cldr-apps/src/main/java/org/unicode/cldr/web/SurveyTool.java @@ -209,21 +209,12 @@ private void serveRunnningNormallyPage( private void includeCss(HttpServletRequest request, PrintWriter out) { final String contextPath = request.getContextPath(); - final String cb = getCacheBustingExtension(request); - out.write( - "\n"); /* * Note: cldrForum.css is loaded through webpack */ // bootstrap.min.css -- cf. bootstrap.min.js elsewhere in this file out.write( "\n"); - out.write( - "\n"); } private static final String DD_CLIENT_TOKEN = System.getenv("DD_CLIENT_TOKEN");