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

SquiggleOutputViewer refactorings and empty results #2984

Merged
merged 7 commits into from
Jan 19, 2024

Conversation

berekuk
Copy link
Collaborator

@berekuk berekuk commented Jan 19, 2024

This PR is mostly refactorings (it splits out ViewerBody and ViewerMenu from SquiggleOutputViewer).

I wanted to add some debugging views to the viewer, but got distracted by cleanups.

It includes two small user-facing changes:

  1. Empty Squiggle programs are now valid; previously, we checked for code === "" on the components side, but an empty program with a comment still failed; now empty programs are allowed in Peggy grammar
  2. VoidWidget; now empty result page doesn't look broken:
Screenshot 2024-01-18 at 19 49 38

Another internal change is that SqDict now exposes isEmpty() and size(). I couldn't resist removing getResultVariables and so on, they looked too trivial and copy-pasted to me; so I replaced them with direct lookups on SqOutput.

@berekuk berekuk requested a review from OAGr as a code owner January 19, 2024 01:53
Copy link

changeset-bot bot commented Jan 19, 2024

⚠️ No Changeset found

Latest commit: bf69e56

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

Copy link

vercel bot commented Jan 19, 2024

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

Name Status Preview Updated (UTC)
quri-hub ✅ Ready (Inspect) Visit Preview Jan 19, 2024 7:49pm
squiggle-components ✅ Ready (Inspect) Visit Preview Jan 19, 2024 7:49pm
squiggle-website ✅ Ready (Inspect) Visit Preview Jan 19, 2024 7:49pm
1 Ignored Deployment
Name Status Preview Updated (UTC)
quri-ui ⬜️ Ignored (Inspect) Visit Preview Jan 19, 2024 7:49pm

@berekuk berekuk changed the title Refactorings and empty results SquiggleOutputViewer refactorings and empty results Jan 19, 2024
Copy link
Contributor

@OAGr OAGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good, will have a better idea when I start using it. Want to merge soon to minimize conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants