squiggle icon indicating copy to clipboard operation
squiggle copied to clipboard

Canvas chart layouts (broken/incomplete)

Open berekuk opened this issue 1 year ago • 2 comments

This PR is in bad shape, and doesn't even pass typescript checks right now, but I want to preserve it, just in case.

It includes:

  1. an attempt to layout charts with https://www.yogalayout.dev/ and a new function-based API on top of that, inspired by React
  2. mostly complete rewrite of DistributionsChart with that API
  3. incomplete/broken attempt to integrate yoga layout with React more deeply (see ReactCanvas)

(1) is tolerable, but turned out to be too clunky in some places.

(3) is promising, but polishing it would take too much time: it's not obvious where to use useEffect and where to useLayoutEffect, and the separation between layout stage where we calculate positions and sizes, and drawing stage, is a hard problem.

berekuk avatar Jun 06 '24 17:06 berekuk

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
quri-hub ❌ Failed (Inspect) Jun 6, 2024 5:25pm
quri-ui ✅ Ready (Inspect) Visit Preview Jun 6, 2024 5:25pm
squiggle-components ❌ Failed (Inspect) Jun 6, 2024 5:25pm
squiggle-website ❌ Failed (Inspect) Jun 6, 2024 5:25pm

vercel[bot] avatar Jun 06 '24 17:06 vercel[bot]

⚠️ No Changeset found

Latest commit: 93743a6323ff49dd71ef276cb6d96765a7d2313e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Jun 06 '24 17:06 changeset-bot[bot]