-
Notifications
You must be signed in to change notification settings - Fork 123
feat: Search attribute component #1045
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: master
Are you sure you want to change the base?
feat: Search attribute component #1045
Conversation
Signed-off-by: Assem Hafez <[email protected]>
Signed-off-by: Assem Hafez <[email protected]>
Signed-off-by: Assem Hafez <[email protected]>
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.
Pull Request Overview
This PR introduces a new search attributes component that allows users to manage custom search attributes when starting workflows. The component provides dynamic input types based on attribute value types (string, number, boolean, datetime) and includes validation for complete entries.
Key Changes:
- Implemented a new
WorkflowActionsSearchAttributescomponent with dynamic input type rendering based on attribute value types - Added comprehensive test coverage with 20+ test cases covering various user interactions and edge cases
- Created reusable type definitions and constants for search attribute management
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| workflow-actions-search-attributes.types.ts | Defines TypeScript types for search attributes, including option types, item structure, and component props |
| workflow-actions-search-attributes.tsx | Main component implementation with dynamic input rendering, validation logic, and attribute management |
| workflow-actions-search-attributes.styles.ts | Styling configuration using Styletron with flex-based layout for attribute rows |
| workflow-actions-search-attributes.constants.ts | Constants for boolean options and input placeholders mapped to attribute value types |
| workflow-actions-search-attributes.test.tsx | Comprehensive test suite covering component rendering, user interactions, and validation scenarios |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...s/workflow-actions/workflow-actions-search-attributes/workflow-actions-search-attributes.tsx
Outdated
Show resolved
Hide resolved
...s/workflow-actions/workflow-actions-search-attributes/workflow-actions-search-attributes.tsx
Outdated
Show resolved
Hide resolved
...ons/workflow-actions-search-attributes/__tests__/workflow-actions-search-attributes.test.tsx
Show resolved
Hide resolved
...ons/workflow-actions-search-attributes/__tests__/workflow-actions-search-attributes.test.tsx
Outdated
Show resolved
Hide resolved
...s/workflow-actions/workflow-actions-search-attributes/workflow-actions-search-attributes.tsx
Outdated
Show resolved
Hide resolved
...s/workflow-actions/workflow-actions-search-attributes/workflow-actions-search-attributes.tsx
Outdated
Show resolved
Hide resolved
...s/workflow-actions/workflow-actions-search-attributes/workflow-actions-search-attributes.tsx
Outdated
Show resolved
Hide resolved
...s/workflow-actions/workflow-actions-search-attributes/workflow-actions-search-attributes.tsx
Outdated
Show resolved
Hide resolved
...s/workflow-actions/workflow-actions-search-attributes/workflow-actions-search-attributes.tsx
Outdated
Show resolved
Hide resolved
...s/workflow-actions/workflow-actions-search-attributes/workflow-actions-search-attributes.tsx
Outdated
Show resolved
Hide resolved
...s/workflow-actions/workflow-actions-search-attributes/workflow-actions-search-attributes.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: Assem Hafez <[email protected]>

Summary
We want to allow users to add search attributes while starting workflow. Component will allow users to get existing custom search attributes and give them value based on the attribute index type (number,date, string etc).
Screenshots


