mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-12-03 09:33:47 +01:00
feat(viewers): sort, filter, summarize, group and chart tables
The CSV/TSV viewer (explorer, gists, the author's preview) becomes an analysis view that runs on the anonymized text already in the page: click-to-sort headers (numbers, dates, natural text; stable, empty cells last), a search box and per-column range or value filters, a summary row (Average by default; Sum, Median, Min, Max, Count, Std dev) over the filtered rows, group by with an aggregate, column stats with a histogram, copy as CSV or Markdown and download of the current view, and a Chart view (bar, line, scatter) drawn in inline SVG. The view lives in the URL fragment (#table:group=model, #table-2:... for a gist file) so a link can carry it; links without it open as before. Markdown and notebook tables (pandas DataFrames) get sortable headers, an optional summary row and "Open as table" for the full view. Redaction slots keep rendering; sorting uses the XXXX-n text. The 1 MB limit holds: rows render 200 at a time as one escaped HTML string while aggregates, filters and charts use every row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
98bf382fa8
commit
43e92bef53
19 files changed
+2094
-98
No files matched your search
@@ -15,6 +15,7 @@ import translations from "../i18n/locale-en.json";
|
||||
import { components, codeEditor, paperScrollspy } from "./components.js";
|
||||
import Tree from "./tree.js";
|
||||
import { fieldDirective, formDirective, submitForm } from "./forms.js";
|
||||
import { dataTablesDirective } from "./table-enhance.js";
|
||||
|
||||
const sessionKey = Symbol("session");
|
||||
export const serverPaths = /^\/(w|api|github)(\/|$)/;
|
||||
@@ -133,6 +134,7 @@ export function mountApplication(target = "#app", options = {}) {
|
||||
app.directive("form", formDirective);
|
||||
app.directive("code-editor", codeEditor);
|
||||
app.directive("paper-scrollspy", paperScrollspy);
|
||||
app.directive("data-tables", dataTablesDirective);
|
||||
app.use(router);
|
||||
router.beforeEach(async to => {
|
||||
if ((to.path === "/review-link" && !isolatedConsent) || (isolatedConsent && to.path !== "/review-link")) {
|
||||
|
||||
Reference in new issue
Block a user