Skip to content

bring tooling into 2026-era + visual improvements#3

Merged
mathematicalmichael merged 62 commits intomainfrom
feat/modernize
Feb 10, 2026
Merged

bring tooling into 2026-era + visual improvements#3
mathematicalmichael merged 62 commits intomainfrom
feat/modernize

Conversation

@mathematicalmichael
Copy link

@mathematicalmichael mathematicalmichael commented Feb 3, 2026

  • upgrade as many deps as possible safely (leaving just jquery behind latest out of an abundance of caution)
  • drop sass/scss. just using css now.
  • modernize tooling
  • adds tests
  • dark mode: auto (default) | true | false
  • pyproject.toml + uv + bun + vite
  • datatables upgrade + restyling
  • BIG FIX: categorical distributions are now equal-width bars and properly reflect distributions (black lines vs purple bars)

  1. Vite CJS Node API deprecated
      - Root cause: Vite was loading the config as CJS.
      - Fix: switched configs to ESM by renaming:
          - vite.web.config.ts → vite.web.config.mts
          - vite.lib.config.ts → vite.lib.config.mts
      - Updated package.json scripts to use the new filenames.
  2. postcss-rem-to-pixel deprecation
      - Root cause: the plugin is PostCSS 5 era and uses deprecated API.
      - Fix: removed postcss-rem-to-pixel from package.json and replaced it with a small inline PostCSS 8 plugin in both Vite configs.
  3. eval warnings
      - Root cause: JSON parsing used eval to handle NaNs.
      - Fix: replaced eval with JSON5.parse:
          - src/dataproviders/webserver.tsx
          - src/hiplot_streamlit.tsx
  4. Large chunk warnings
      - Not an actual issue for us (we want a single bundle).
      - Silenced by setting chunkSizeWarningLimit: 2000 in both configs.
@mathematicalmichael mathematicalmichael force-pushed the feat/modernize branch 3 times, most recently from 3e6e341 to 79de6f7 Compare February 3, 2026 22:07
@mathematicalmichael
Copy link
Author

mathematicalmichael commented Feb 7, 2026

another round of fixes, courtesy of codex:

Commit a50ebc8 - fix release-gate regressions and typing issues

  • Fixed TypeScript release-check failures in prepublish-ts by setting tsc --module es2020 in package.json.
  • Fixed Dropzone accept typing in src/dataproviders/upload.tsx.
  • Updated React test harness root usage in src/hiplot_test.tsx to use createRoot.
  • Added missing children typing in src/lib/resizable.tsx.
  • Fixed invalid setState updater return in drag path ({} -> null) in src/parallel/parallel.tsx.

Commit 442e7ca - restore hiplot.render compatibility and dark mode defaults

  • Restored window.hiplot.render(...) compatibility semantics in src/hiplot_web.tsx:
    • maintains a root per element
    • returns a HiPlot instance-compatible object when available (fallback to root)
  • Restored default dark mode behavior to "auto" in build_props (src/hiplot_web.tsx).
  • Added Playwright regression tests in tests/hiplot.spec.ts:
    • default auto dark mode when no query parameter
    • window.hiplot.render return object exposes getPlugin

Commit d2c4f49 - fix documentation warnings and include distribution plot guide

  • Fixed docs title formatting in docs/contributing.rst.
  • Added docs build instructions using uv in docs/contributing.rst.
  • Added distribution_plot page to docs toctree in docs/index.rst.
  • Added docs/_static/.gitkeep to satisfy Sphinx static path.
  • Included docs/distribution_plot.md in published docs.

Commit c32a391 - fix distribution bin ordering to prevent mismatched rendering

  • Fixed horizontal categorical distribution rendering order bug in src/distribution/plot.tsx.
    • Before: geometry could use reordered bins while density/length still came from original-index bins.
    • After: both geometry and density are computed from the same reordered list (binsInDisplayOrder), preventing visual mismatch.
  • Initialized distribution state with current selected rows in src/distribution/plugin.tsx:
    • histData.selected now starts from props.rows_selected (instead of empty) to avoid first-render mismatch/flicker.

Commit 2ddb01b - improve docs reliability layout and fork messaging

  • Added explicit community-maintained fork messaging in docs homepage (docs/index.rst), referencing archived upstream.
  • Made docs demo iframes responsive (removed fixed-width and negative-margin styles) in:
    • docs/index.rst
    • docs/experiment_settings.rst
  • Fixed broken/fragile docs links and wording:
    • Streamlit docs link updates (docs/getting_started.rst, docs/tuto_streamlit.rst)
    • issue tracker link and package naming in JS tutorial (docs/tuto_javascript.rst)
    • colormap doc link anchor in hiplot/experiment.py
  • Added linkcheck_ignore for npm URL anti-bot false positives in docs/conf.py.
  • Removed final docs warning by switching problematic literalinclude highlighting to plain text in docs/tuto_javascript.rst.

Commit 08a9add - fix categorical distribution mapping and seed demo data

  • Fixed categorical horizontal distribution rendering alignment in src/distribution/plot.tsx.
    • Corrected mapping between category display slot and bin density source so bars/lines stay aligned with category labels after brush/keep filtering.
  • Made demo fetches deterministic in hiplot/fetchers.py.
    • load_demo() now seeds RNG per demo URI and restores previous RNG state afterward.
  • Added deterministic distribution demo in hiplot/fetchers_demo.py:
    • demo_distribution_colors_deterministic with fixed category counts.
  • Added determinism unit test in hiplot/test_fetchers.py:
    • repeated load_demo("demo") returns identical color counts.
  • Added Playwright regression in tests/hiplot.spec.ts:
    • brushing/filtering to keep only green on categorical c axis keeps distribution bars aligned and associated with green.

Validation runs

The following checks were run and passed after fixes:

  • bun run prepublish-ts
  • bun run build
  • uv run pytest (25 passed)
  • uv run --extra docs sphinx-build -b html docs docs/_build/html (no warnings)
  • uv run --extra docs sphinx-build -b linkcheck docs docs/_build/linkcheck (passed)
  • uv run pytest (26 passed, after adding deterministic demo test)
  • bunx playwright test (20 passed, after adding categorical distribution regression test)

@mathematicalmichael mathematicalmichael merged commit e6c673e into main Feb 10, 2026
14 checks passed
@mathematicalmichael mathematicalmichael deleted the feat/modernize branch February 10, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant