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

[breadboard-ui] Visualize when a wire's input/output schemas are incompatible #2298

Open
Tracked by #1818
aomarks opened this issue Jun 25, 2024 · 0 comments
Open
Tracked by #1818
Assignees

Comments

@aomarks
Copy link
Member

aomarks commented Jun 25, 2024

A precursor to #1729, since it will take some time to make sure all nodes and boards have fully correct types. We'll just show a wire as red (or some similar treatment) when the input and output schemas are not compatible.

@aomarks aomarks self-assigned this Jun 25, 2024
aomarks added a commit that referenced this issue Jun 28, 2024
aomarks added a commit that referenced this issue Jun 28, 2024
Adds a `validate` method to `InspectableEdge`. It grabs the schema for
the from/to sides of the edge and calls `canConnect` to determine
whether they are compatible. Includes a new Validation type so that we
can add more structured data, detailed error messages, etc.

Part of #2298
aomarks added a commit that referenced this issue Jul 2, 2024
Uses the new `analyzeIsJsonSubSchema` function from
#2394

Part of #2298
aomarks added a commit that referenced this issue Jul 3, 2024
…2413)

Add `kind` property to InspectablePort to tell you whether it's an input
or output port.

Part of #2298
aomarks added a commit that referenced this issue Jul 3, 2024
Add fancy-json component for rendering JSON with configurable
annotations.

You give it a JSON value, and a list of annotations. The annotations are
JSON paths (e.g. `["schema", "properties", 2, "type"]`) and some CSS
part name. As we render values, we wrap them in `<span part="<PART>">`
so that the parent component can then choose how to style those
sub-trees.

Part of #2298
aomarks added a commit that referenced this issue Jul 3, 2024
Add analyzeCanConnect method to InspectablePort which is like canConnect
but with detailed error messages.

Part of #2298
aomarks added a commit that referenced this issue Jul 3, 2024
… schema constraints (#2416)

If a wire is invalid, and the "Show Port Tooltips" setting is enabled,
then the port tooltip will now show which specific part of the schema is
mismatched with the other port by rendering a red squiggly line under
it.

<img width="670" alt="image"
src="https://github.com/breadboard-ai/breadboard/assets/48894/92c9440f-c729-4759-aec4-8f000097c137">

Part of #2298
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant