Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canvas chart layouts (broken/incomplete) #3310

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Canvas chart layouts (broken/incomplete) #3310

wants to merge 8 commits into from

Conversation

berekuk
Copy link
Collaborator

@berekuk berekuk commented Jun 6, 2024

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.

Copy link

vercel bot commented Jun 6, 2024

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

Copy link

changeset-bot bot commented Jun 6, 2024

⚠️ No Changeset found

Latest commit: 93743a6

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 To prioritize
Development

Successfully merging this pull request may close these issues.

1 participant