-
Notifications
You must be signed in to change notification settings - Fork 29
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
fix(1055): Added TypeaheadEditor and reusing it with DataFormatEditor #1118
Conversation
@lordrip , Please have a look at 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.
The extraction part seems good. I tried the live instance and was also good, we need to change a bit the approach in terms of what do we pass in the TypeaheadEditor
.
I think in this case, TypeaheadEditor
shouldn't have any knowledge about the input, at most, it should receive a list of name and description, then the consumer of this new component, should match the selected name with the input list.
As an example, for the DataformatEditor
, it should pass:
{
name: string
description: string
}[]
Then, it should also pass a onSelect callback, so when the user picks something from the dropdown, the DataformatEditor
will match it with the available list
Hi @lordrip , Thanks for the review! |
Added a commit which reuse the TypeaheadEditor with LoadBalancerEditor. Changes are deployed here: https://shivamg640.github.io/kaoto/ |
Yes, but notice how we're passing the underlying typings to The goal is to be able to reuse this component as much as possible, but in our current proposal, we need to add additional typings every time we need to use the TypeaheadEditor component somewhere else. My proposal would be to have a standard model, like the one I mentioned before, and let the consumers of this component to adjust their values to the standard one. Please let me know if you want to go a bit deeper on this topic. |
@lordrip, |
This is because of the
After doing this, we need to add a class to .typeahead-list {
max-height: 400px;
overflow-y: scroll;
} This should be enough. |
packages/ui/src/components/Form/dataFormat/DataFormatEditor.tsx
Outdated
Show resolved
Hide resolved
packages/ui/src/components/Form/expression/ExpressionEditor.scss
Outdated
Show resolved
Hide resolved
packages/ui/src/components/Form/loadBalancer/LoadBalancerEditor.tsx
Outdated
Show resolved
Hide resolved
…, ExpressionEditor, and LoadBalancerEditor
Fixes #1055,
Creating this PR for initial review on the TypeaheadEditor reusable component, currently used with DataFormatEditor. Once reviewed, we can reuse the new componet with loadbalancer and ExpressionEditor as well.
This set of new changes can be tested here: https://shivamg640.github.io/kaoto/