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

feat(ui): better missing fields ux in workflows & builder #7816

Merged
merged 8 commits into from
Mar 21, 2025

Conversation

psychedelicious
Copy link
Collaborator

Summary

If a there was a problem with a node field that was added to the builder (e.g. it was renamed, removed from its node, or the node was removed altogether), you couldn't delete it from the builder. There was no delete button. You had to go and delete the node. Here's what it looked like:
image

This PR restructures the components so that we can render the error message within a form element container, with the delete button:
image

It also makes some improvements to the error messages for missing/unexpected fields, as seen in the above screenshot. Missing means the template has a field but the node instance does not. Unexpected means the node instance has a field that is not in the template. Hard to clearly convey these different states but this is better than before ("Unknown field: ").

In the Builder's View mode, the error looks like this:
image

Related Issues / Discussions

https://discord.com/channels/1020123559063990373/1149506274971631688/1352339053382598666

QA Instructions

n/a

Merge Plan

n/a

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

@github-actions github-actions bot added the frontend PRs that change frontend files label Mar 21, 2025
@psychedelicious psychedelicious force-pushed the psyche/feat/ui/missing-fields-handling branch from 24d30e3 to 946a622 Compare March 21, 2025 00:30
@hipsterusername
Copy link
Member

I think we have enough space to be a bit more verbose/grammatically correct etc.

Workflow contains an unknown field "imag2e". Edit the workflow to fix the issue.

@psychedelicious
Copy link
Collaborator Author

This PR also makes some minor DX changes to some of hte workflow editor hooks. Some of the hooks throw if a node isn't found, other don't - this caught me off guard while making the changes in this PR. I renamed a couple of them, adding OrThrow or Safe accordingly. So a lot of the changes are for that.

@psychedelicious
Copy link
Collaborator Author

Updated error in builder view mode:
image

@psychedelicious psychedelicious enabled auto-merge (rebase) March 21, 2025 01:08
@psychedelicious psychedelicious merged commit 8a70976 into main Mar 21, 2025
15 checks passed
@psychedelicious psychedelicious deleted the psyche/feat/ui/missing-fields-handling branch March 21, 2025 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend PRs that change frontend files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants