Skip to content

Commit

Permalink
CLDR-17248 Measure vote timing; remove obsolete debugging code (#3407)
Browse files Browse the repository at this point in the history
-Delete CLDR_TABLE_DEBUG_ZOOM and the block of code that depended on it

-Do not duplicate display of xpath in info panel that depended on CLDR_TABLE_DEBUG
  • Loading branch information
btangmu authored Dec 5, 2023
1 parent 0338b1a commit 5c91532
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 31 deletions.
2 changes: 1 addition & 1 deletion tools/cldr-apps/js/src/esm/cldrInfo.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function updateOpenPanelButtons() {
// Currently this method is called as follows:
// cldrTable.mjs: cldrInfo.listen("", tr, cell, null);
// cldrTable.mjs: cldrInfo.listen(JSON.stringify(theRow), tr, js, null);
// cldrTable.mjs: cldrInfo.listen(xpathStr, tr, cell, null);
// cldrTable.mjs: cldrInfo.listen("", tr, cell, null);
// cldrTable.mjs: cldrInfo.listen(null, tr, cell, null);
// cldrTable.mjs: cldrInfo.listen(null, tr, cell, cell.showFn);
// cldrTable.mjs: cldrInfo.listen(null, tr, cell);
Expand Down
31 changes: 1 addition & 30 deletions tools/cldr-apps/js/src/esm/cldrTable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const HEADER_ID_PREFIX = "header_";
const ROW_ID_PREFIX = "row_"; // formerly "r@"

const CLDR_TABLE_DEBUG = true;
const CLDR_TABLE_DEBUG_ZOOM = false; // First column gets "zoom{JSON}" links -- what are they for??

/*
* NO_WINNING_VALUE indicates the server delivered path data without a valid winning value.
Expand Down Expand Up @@ -735,36 +734,8 @@ function updateRowCodeCell(tr, theRow, cell) {
) {
cldrSurvey.appendExtraAttributes(cell, theRow);
}
if (CLDR_TABLE_DEBUG_ZOOM) {
const anch = document.createElement("i");
anch.className = "anch";
anch.id = theRow.xpathId;
cell.appendChild(anch);
anch.appendChild(document.createTextNode("#"));
const go = document.createElement("a");
go.className = "anch-go";
go.appendChild(document.createTextNode("zoom"));
go.href =
window.location.pathname +
"?_=" +
cldrStatus.getCurrentLocale() +
"&x=r_rxt&xp=" +
theRow.xpathId;
cell.appendChild(go);
const js = document.createElement("a");
js.className = "anch-go";
js.appendChild(document.createTextNode("{JSON}"));
js.popParent = tr;
cldrInfo.listen(JSON.stringify(theRow), tr, js, null);
cell.appendChild(js);
cell.appendChild(cldrDom.createChunk(" c=" + theRow.coverageValue));
}
if (!cell.isSetup) {
let xpathStr = "";
if (CLDR_TABLE_DEBUG) {
xpathStr = "XPath: " + theRow.xpath;
}
cldrInfo.listen(xpathStr, tr, cell, null);
cldrInfo.listen("", tr, cell, null);
cell.isSetup = true;
}
}
Expand Down

0 comments on commit 5c91532

Please sign in to comment.