Rule creation and editing forms implementation contain multiple suboptimal logic which might be improved. It became prominent while working on UI for Prebuilt Rule Customization workflow in https://github.com/elastic/kibana/issues/171520. These share the same rule fields editing components. Due to time constraints managed technical debt was introduced and additionally it wasn't possible to address existing technical debt. This ticket contains rule creation and editing forms related technical debt.
Tasks
[ ] Reintegrate DataSourceEdit component to creation/editing forms
[ ] Refactor EQL query bar to get rid of unnecessary data view creation
[ ] Address complexity of getFlattenedArrayFieldNames() in Required fields. Ideally we should have self describing code explaining why we need flattened array fields. Refactoring for better readability would be great. Additionally we should have unit tests to cover this functionality, see https://github.com/elastic/kibana/pull/196642#discussion_r1836559759.
Summary
Rule creation and editing forms implementation contain multiple suboptimal logic which might be improved. It became prominent while working on UI for Prebuilt Rule Customization workflow in https://github.com/elastic/kibana/issues/171520. These share the same rule fields editing components. Due to time constraints managed technical debt was introduced and additionally it wasn't possible to address existing technical debt. This ticket contains rule creation and editing forms related technical debt.
Tasks
DataSourceEdit
component to creation/editing formsgetFlattenedArrayFieldNames()
in Required fields. Ideally we should have self describing code explaining why we need flattened array fields. Refactoring for better readability would be great. Additionally we should have unit tests to cover this functionality, see https://github.com/elastic/kibana/pull/196642#discussion_r1836559759....
TBD