-
Notifications
You must be signed in to change notification settings - Fork 18
Add category field to edit model configuration page #310
Conversation
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.
Looks good to me. Feel free to merge it after addressing my comment.
interface CategoryFieldProps { | ||
isHCDetector: boolean; | ||
categoryFieldOptions: string[]; | ||
setIsHCDetector(isHCDetector: boolean): void; |
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.
you may delete this method, I think original CategoryFieldProps
is already good for integration
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 added this to update the isHCDetector
flag in editFeatures
. This was needed to properly validate the form in the case of the box being checked, but no value being set.
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.
Basically, since we don't perform validation immediately after enabling the checkbox now, this became an issue that had to be fixed by updating isHCDetector
in editFeatures
, so we can properly validate/invalidate the category field in handleSaveChanges()
.
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.
Got it. I thought you may delete it since I already modified code to support validation only when checkbox is enabled. But I think your new implementation is better. Approved.
When I open Edit feature page for non-HC detector in my local workspace, the |
I see, yes it does flash that as it loads in the index details. Let me look into improving the loading state. |
I will see it as non-blocking issue. If it takes too long to fix it, let's create issue for it and improve it later. |
really quick fix. added test case as well. thanks for finding that issue |
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.
Changes look good to me.
Issue #, if available:
Description of changes:
This PR adds the category field component on the edit model configuration page. This is an optional field that, when selected, will create and run a high cardinality / multi-entity detector.
Changes include:
categoryField
field to the detector interfacecategoryField
field to the Additional settings component on detector configuration pageAll wording has been approved by UX and tech writer.
Screenshots:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.