Skip to content

Commit 37ea5f7

Browse files
committed
WIP
Signed-off-by: Andrew Stein <steinlink@gmail.com>
1 parent f70d1be commit 37ea5f7

6 files changed

Lines changed: 39 additions & 28 deletions

File tree

.github/workflows/build.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@ jobs:
649649
path: .
650650

651651
- name: Run Tests
652+
id: run_tests
652653
run: pnpm run test -- --fetch-snapshots
653654
env:
654655
PACKAGE: "server,client,viewer,viewer-datagrid,viewer-charts,viewer-openlayers,workspace,react"
@@ -657,6 +658,15 @@ jobs:
657658
PSP_SNAPSHOT_REF: ${{ github.head_ref || github.ref_name }}
658659
# PSP_USE_CCACHE: 1
659660

661+
- name: Upload Test Failures
662+
if: ${{ failure() && steps.run_tests.outcome == 'failure' }}
663+
uses: actions/upload-artifact@v4
664+
with:
665+
name: perspective-js-test-results
666+
path: tools/test/dist/results
667+
if-no-files-found: ignore
668+
overwrite: true
669+
660670
# ,--,--' . .-,--. . .
661671
# `- | ,-. ,-. |- '|__/ . . |- |-. ,-. ,-.
662672
# , | |-' `-. | ,| | | | | | | | | |

packages/viewer-charts/src/css/perspective-viewer-charts.css

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,10 @@
44
width: 100%;
55
height: 100%;
66
overflow: hidden;
7-
font-family: var(
8-
--psp-interface-monospace--font-family,
9-
"ui-monospace",
10-
"SFMono-Regular",
11-
"SF Mono",
12-
"Menlo",
13-
"Consolas",
14-
"Liberation Mono",
15-
monospace
16-
);
7+
font-family: inherit;
8+
/* font-family: var(--psp-interface-monospace--font-family, inherit); */
179

18-
--psp-webgl--font-family: var(
19-
--psp-interface-monospace--font-family,
20-
"ui-monospace",
21-
"SFMono-Regular",
22-
"SF Mono",
23-
"Menlo",
24-
"Consolas",
25-
"Liberation Mono",
26-
monospace
27-
);
10+
/* --psp-webgl--font-family: var(font-family, inherit); */
2811
--psp-webgl--tooltip--color: var(--psp--color);
2912
--psp-webgl--tooltip--background: var(--psp--background-color);
3013
--psp-webgl--tooltip--border-color: var(--psp-inactive--border-color);

packages/viewer-charts/src/ts/theme/theme.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ export function resolveTheme(el: Element): Theme {
9292
const gradientStops = parseCssGradient(gradientSrc);
9393

9494
return {
95-
fontFamily: get("--psp-webgl--font-family", "monospace"),
95+
fontFamily: get(
96+
"--psp-webgl--font-family",
97+
get("font-family", "monospace"),
98+
),
9699
tickColor: get(
97100
"--psp-webgl--axis-ticks--color",
98101
"rgba(160, 0, 0, 0.8)",

packages/viewer-charts/test/js/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import type { ViewerConfigUpdate } from "@perspective-dev/viewer";
1919
* deterministic on a given machine, but a handful of sub-pixel AA
2020
* decisions still wiggle across Chromium versions.
2121
*/
22-
const DEFAULT_MAX_DIFF_PIXEL_RATIO = 0.02;
22+
const DEFAULT_MAX_DIFF_PIXEL_RATIO = 0.0;
2323
const DEFAULT_THRESHOLD = 0;
2424

2525
/**

tools/scripts/lint.mjs

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,23 @@ import "zx/globals";
1818

1919
export async function lint_js(is_fix = false) {
2020
const prettier_flags = is_fix ? "--write" : "--check";
21-
await $`prettier ${prettier_flags} "examples/**/*.js" "examples/**/*.tsx" "tools/scripts/*.mjs" "rust/**/*.ts" "rust/**/*.js" "packages/**/*.js" "packages/**/*.ts"`.verbose();
21+
await $`prettier ${prettier_flags} \
22+
"examples/**/*.js" \
23+
"examples/**/*.tsx" \
24+
"tools/scripts/*.mjs" \
25+
"rust/**/*.ts" \
26+
"rust/**/*.js" \
27+
"packages/**/*.js" \
28+
"packages/**/*.ts" \
29+
"**/css/**/*.css" \
30+
"**/themes/**/*.css" \
31+
"**/html/*.html" \
32+
"packages/**/package.json" \
33+
"rust/**/package.json" \
34+
"examples/**/package.json" \
35+
"docs/package.json" \
36+
`.verbose();
2237
await $`prettier --prose-wrap=always ${prettier_flags} "rust/*/docs/**/*.md"`.verbose();
23-
// cmd.sh`prettier ${prettier_flags} "**/*.yaml"`;
24-
await $`prettier ${prettier_flags} "**/css/**/*.css"`.verbose();
25-
await $`prettier ${prettier_flags} "**/themes/**/*.css"`.verbose();
26-
await $`prettier ${prettier_flags} "**/html/*.html"`.verbose();
27-
await $`prettier ${prettier_flags} "packages/**/package.json" "rust/**/package.json" "examples/**/package.json" "docs/package.json"`.verbose();
2838

2939
const check = is_fix ? [] : ["--check"];
3040
const dirty = is_fix ? ["--allow-dirty"] : [];

tools/test/src/js/snapshot-sync.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ function mirrorSnapshots(srcRoot: string, dest: string) {
6060
fs.rmSync(dest, { recursive: true, force: true });
6161
fs.mkdirSync(path.dirname(dest), { recursive: true });
6262
fs.cpSync(srcSnapshots, dest, { recursive: true });
63+
fs.rmSync(path.join(dest, ".git"), { recursive: true, force: true });
6364
}
6465

6566
export async function fetchSnapshots(): Promise<void> {
@@ -83,6 +84,7 @@ export async function fetchSnapshots(): Promise<void> {
8384
console.log(
8485
`Snapshot branch '${requestedRef}' not found on ${repo}; falling back to '${DEFAULT_REF}'.`,
8586
);
87+
8688
ref = DEFAULT_REF;
8789
}
8890

@@ -126,11 +128,14 @@ export async function writebackSnapshots(): Promise<void> {
126128
console.log(
127129
`No snapshot clone at ${CACHE_DIR}; skipping writeback. Run with --fetch-snapshots first to populate the cache.`,
128130
);
131+
129132
return;
130133
}
134+
131135
if (!fs.existsSync(DEST_DIR)) {
132136
return;
133137
}
138+
134139
fs.cpSync(DEST_DIR, CACHE_DIR, { recursive: true, force: true });
135140
console.log(`Copied updated snapshots into ${CACHE_DIR}`);
136141
}

0 commit comments

Comments
 (0)