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

Viewer improvements #2909

Merged
merged 16 commits into from Jan 3, 2024
Merged

Viewer improvements #2909

merged 16 commits into from Jan 3, 2024

Conversation

berekuk
Copy link
Collaborator

@berekuk berekuk commented Jan 2, 2024

  • Change SquiggleViewer props; only SquiggleChart supports rootPathOverride now, while SquiggleViewer takes the plain SqValue
  • Renamed DynamicSquiggleViewer to SquiggleOutputViewer and change the top level navigation to a dropdown
  • export SquiggleErrorAlert (no one needs it now but since we expose SquiggleViewer, we should expose it too)
    • also fix a small bug in it where it had links to the editor even if the editor was missing
  • reorganize some stories

There might be other minor changes here and bugfixes that I've forgot about.

Copy link

vercel bot commented Jan 2, 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 3, 2024 8:13pm
squiggle-components ✅ Ready (Inspect) Visit Preview Jan 3, 2024 8:13pm
squiggle-website ✅ Ready (Inspect) Visit Preview Jan 3, 2024 8:13pm
1 Ignored Deployment
Name Status Preview Updated (UTC)
quri-ui ⬜️ Ignored (Inspect) Visit Preview Jan 3, 2024 8:13pm

Copy link

changeset-bot bot commented Jan 2, 2024

⚠️ No Changeset found

Latest commit: df9b901

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
Contributor

sweep-ai bot commented Jan 2, 2024

Apply Sweep Rules to your PR?

  • Apply: All docstrings and comments should be up to date.
  • Apply: Ensure that all variables and functions have descriptive names.
  • Apply: Avoid using magic numbers or hard-coded values in the code.

Copy link
Contributor

sweep-ai bot commented Jan 2, 2024

Sweeping

Resolving merge conflicts: track the progress here.

I'm currently resolving the merge conflicts in this PR. I will stack a new PR once I'm done.

An error has occurred: 403 {"message": "API rate limit exceeded for 24.144.92.8. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)", "documentation_url": "https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"} (tracking ID: f795f5328f)

@OAGr
Copy link
Contributor

OAGr commented Jan 3, 2024

image

Can you add a small down-arrow on the right of this button, to make it more obvious that it's a dropdown?

return <MessageAlert heading="Value is not defined" />;
}
if (!rootValue.ok) {
return <SquiggleErrorAlert error={rootValue.value} />;
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this SquiggleErrorAlert, but the others MessageAlert?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The name is the same as it was before, but I think it's good:

  • this component takes SqError, so it's squiggle-specific
  • unlike <MessageAlert>, this component is public, and other components have Squiggle prefix


import { SquiggleOutput } from "../../lib/hooks/useSquiggle.js";

export const Indicator: FC<{ output: SquiggleOutput; isRunning: boolean }> = ({
Copy link
Contributor

Choose a reason for hiding this comment

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

Indicator isn't very descriptive. Maybe, RenderingIndicator?

)}
>
<Button size="small">
{mode === "variables" ? "Variables" : "Result"}
Copy link
Contributor

Choose a reason for hiding this comment

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

Add down-triangle too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No problem, but note that it won't look identically to Save (no vertical bar). Save button acts differently based on where you click.

@OAGr
Copy link
Contributor

OAGr commented Jan 3, 2024

Runtime errors seem to have lost their blue Stack Traces, from the Storybook:

image image

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.

Mostly seems good, I left some minor comments.

@berekuk
Copy link
Collaborator Author

berekuk commented Jan 3, 2024

Runtime errors seem to have lost their blue Stack Traces, from the Storybook:

This is intentional; stack trace lines shouldn't be clickable when there's no editor.

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.

None yet

2 participants