Skip to content

update ui manifest for all blocks#949

Merged
hansent merged 5 commits into
mainfrom
ui-manifest-updates
Jan 16, 2025
Merged

update ui manifest for all blocks#949
hansent merged 5 commits into
mainfrom
ui-manifest-updates

Conversation

@hansent
Copy link
Copy Markdown
Collaborator

@hansent hansent commented Jan 15, 2025

Description

update all blocks to set ui manifest in json_schema_extra.

The workflow editor react app currently takes these values to determine how ot render blocks (icons / sections / etc) but overwrites / hard codes them for many of the blocks because we did not always have the ability to specify it diretly in the inference / block code.

I;ve gone through and added / updated the ui manifest for all blocks with the data currently used in the wroboflwo workflows editor so that going forward inference can be the source of truth (and we can use this data elsewhere like e.g. in auto generated docs)

Type of change

maintenance

How has this change been tested, please provide a testcase or example of how you tested the change?

not yet, functionality should remain unchanged. I painstakingly searched, copied and pasted for each of them...would probably be a good idea to at least spot check / sample for correctness against the constants file

Any specific deployment considerations

n/a

Docs

not yet. hoping to use this data to render nice sections and block representation in auto generated documentation pages

…itor so that inference is the source of truth
"icon": "fal fa-database",
"blockPriority": 4,
"popular": True,
},
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It would be good to note the obvious - UI will depend on this manifest making both more tightly coupled. Maybe it would be good idea consider other options, like storing this in Firebase?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This repo should be the single source of truth for block metadata. We want to be able to keep all of the downstream consumers in sync (eg the app UI, the docs, the marketing site)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Side effect is that the /workflows/blocks/describe endpoint returns a super big object, takes several seconds to load sometimes and in that time all the blocks will not have icons, colors, or human readable names. Might be a good idea to have a smaller version of the endpoint that just returns the block metadata for rendering the UI and block list
CleanShot 2025-01-16 at 09 08 10@2x

@hansent hansent merged commit 5e85ed2 into main Jan 16, 2025
@hansent hansent deleted the ui-manifest-updates branch January 16, 2025 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants