-
Notifications
You must be signed in to change notification settings - Fork 395
feat(ComboWidget): add ability to have mapped inputs #6585
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
base: main
Are you sure you want to change the base?
Conversation
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 11/05/2025, 04:02:01 AM UTC 🔗 Links🎉 Your Storybook is ready for review! |
🎭 Playwright Test Results⏰ Completed at: 11/05/2025, 04:19:16 AM UTC 📈 Summary
📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 3.24 MB (baseline 3.31 MB) • 🟢 -63.1 kBMain entry bundles and manifests
Status: 3 added / 3 removed Graph Workspace — 791 kB (baseline 729 kB) • 🔴 +62.4 kBGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 8.18 kB (baseline 8.18 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 1 added / 1 removed Panels & Settings — 293 kB (baseline 293 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 6 added / 6 removed UI Components — 12.6 kB (baseline 12.6 kB) • ⚪ 0 BReusable component library chunks
Status: 1 added / 1 removed Data & Services — 10.4 kB (baseline 10.4 kB) • 🟢 -1 BStores, services, APIs, and repositories
Status: 2 added / 2 removed Utilities & Hooks — 1.07 kB (baseline 1.07 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Vendor & Third-Party — 5.32 MB (baseline 5.32 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Status: 3 added / 3 removed Other — 2.55 MB (baseline 2.55 MB) • ⚪ 0 BBundles that do not match a named category
|
8c04ed9 to
c440f6e
Compare
c440f6e to
714e3e9
Compare
| for (const value of values_list) { | ||
| try { | ||
| const label = this.options.getOptionLabel(String(value)) | ||
| menu.addItem(label, value, menuOptions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: one of the downsides of this approach is we don't get the fuzzy search filter because that requires setting the array directly.
Talked it over with @AustinMroz and we do think this is the easiest way to map duplicate labels to the correct value
714e3e9 to
305b8f8
Compare
| { | ||
| limit = DEFAULT_LIMIT, | ||
| offset = 0 | ||
| }: { limit?: number; offset?: number } = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're not using pagination yet but, at least we're setup to start doing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hrmmmm...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i know yagni... but i think sooner is sooner than we think 😂
if you really want it removed, i can remove it.
| async function fetchInputFilesFromCloud(): Promise<AssetItem[]> { | ||
| return await assetService.getAssetsByTag('input', false) | ||
| return await assetService.getAssetsByTag('input', false, { | ||
| limit: INPUT_LIMIT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@viva-jinyi I don't think reducing the limit from 500 to 100 should impact your Assets work, but let me know if it does and we can adjust.
| const NODE_MEDIA_TYPE_MAP: Record<string, 'image' | 'video' | 'audio'> = { | ||
| LoadImage: 'image', | ||
| LoadVideo: 'video', | ||
| LoadAudio: 'audio' | ||
| } | ||
|
|
||
| // Map node types to placeholder i18n keys | ||
| const NODE_PLACEHOLDER_MAP: Record<string, string> = { | ||
| LoadImage: 'widgets.uploadSelect.placeholderImage', | ||
| LoadVideo: 'widgets.uploadSelect.placeholderVideo', | ||
| LoadAudio: 'widgets.uploadSelect.placeholderAudio' | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Option:
| const NODE_MEDIA_TYPE_MAP: Record<string, 'image' | 'video' | 'audio'> = { | |
| LoadImage: 'image', | |
| LoadVideo: 'video', | |
| LoadAudio: 'audio' | |
| } | |
| // Map node types to placeholder i18n keys | |
| const NODE_PLACEHOLDER_MAP: Record<string, string> = { | |
| LoadImage: 'widgets.uploadSelect.placeholderImage', | |
| LoadVideo: 'widgets.uploadSelect.placeholderVideo', | |
| LoadAudio: 'widgets.uploadSelect.placeholderAudio' | |
| } | |
| const NODE_MEDIA_TYPE_MAP = { | |
| LoadImage: 'image', | |
| LoadVideo: 'video', | |
| LoadAudio: 'audio' | |
| } as const | |
| // Map node types to placeholder i18n keys | |
| const NODE_PLACEHOLDER_MAP = { | |
| LoadImage: 'widgets.uploadSelect.placeholderImage', | |
| LoadVideo: 'widgets.uploadSelect.placeholderVideo', | |
| LoadAudio: 'widgets.uploadSelect.placeholderAudio' | |
| } as const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will try this again but it cause some typecheck failure fun for me when i did it locally
| ] | ||
|
|
||
| const unknownHash = | ||
| 'fffffffffffffffffffffffffffuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.png' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve
Summary
getOptionLabeloption toComboWidgetso users of it can map of custom labels to widget values. (e.g.,"My Photo" -> "my_photo_1235.png").Review Focus
Widget code: please double check the work there.
Screenshots (if applicable)
mapped-inputs-2025-11-04.mov
┆Issue is synchronized with this Notion page by Unito