-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add suggested values for variable dropdown #9437
base: main
Are you sure you want to change the base?
Conversation
@@ -13,8 +13,7 @@ export type ServerlessFunctionTestData = { | |||
height: number; | |||
}; | |||
|
|||
export const DEFAULT_OUTPUT_VALUE = | |||
'Enter an input above then press "run Function"'; | |||
export const DEFAULT_OUTPUT_VALUE = 'Enter an input above then press "Test"'; |
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.
updated since button is named Test
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.
PR Summary
This PR adds suggested values for workflow variable dropdowns, displaying contextual preview values for simple fields while maintaining a clean hierarchical structure for composite fields.
- Added contextual preview values in
WorkflowVariablesDropdownFieldItems.tsx
usingsubStep?.value?.toString()
for leaf nodes - Modified
generate-fake-value.ts
to provide realistic example values like "Tim Cook" for FULL_NAME and "123 Main St" for ADDRESS fields - Updated
MenuItemSelect
andMenuItemLeftContent
components to support contextual text display with proper text overflow handling - Changed default output message in
serverlessFunctionTestDataFamilyState.ts
to "Enter an input above then press 'Test'" - Fixed non-breaking space character issue in
MenuItemLeftContent.tsx
template literal
6 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile
return objData; | ||
} else if (valueType === FieldMetadataType.TEXT) { | ||
return 'My text'; | ||
return objData.toString(); |
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 don't get the toString either...
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.
Maybe can we use JSON.stringify()
instead of toString()
?
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.
nope this is a mistake. At some point I was trying to convert on backend side
|
||
export const generateFakeValue = (valueType: string): FakeValueTypes => { | ||
type TypeClassification = 'primitive' | 'FieldMetadataType'; |
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.
type TypeClassification = 'primitive' | 'FieldMetadataType'; | |
type TypeClassification = 'primitive' | 'fieldMetadataType'; |
|
||
export const generateFakeValue = (valueType: string): FakeValueTypes => { | ||
type TypeClassification = 'primitive' | 'FieldMetadataType'; |
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.
or
type TypeClassification = 'primitive' | 'FieldMetadataType'; | |
type TypeClassification = 'Primitive' | 'FieldMetadataType'; |
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.
Interesting implementation! I add some comments on top of @martmull's review.
return objData; | ||
} else if (valueType === FieldMetadataType.TEXT) { | ||
return 'My text'; | ||
return objData.toString(); |
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.
Maybe can we use JSON.stringify()
instead of toString()
?
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.
lgtm
Here is a first version: