-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Vis: Default editor] EUIficate Sub agg control #37979
[Vis: Default editor] EUIficate Sub agg control #37979
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Oh yes, I updated the PR. Thank you for noticing.
I moved this message into agg selector's error section. |
This comment has been minimized.
This comment has been minimized.
Pinging @elastic/kibana-app |
@@ -79,9 +70,6 @@ const parentPipelineAggController = function ($scope) { | |||
|
|||
// we aren't creating a custom aggConfig | |||
if (metricAgg !== 'custom') { | |||
if (!$scope.state.aggs.find(agg => agg.id === metricAgg)) { |
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.
This logic was moved to MetricAggParamEditor
component: https://github.com/elastic/kibana/pull/37979/files?file-filters%5B%5D=.tsx&owned-by%5B%5D=#diff-d09c7d350e3017c52e2e151fba97ef27R54
@@ -13,12 +13,6 @@ | |||
style="display: none;"> | |||
</div> | |||
|
|||
<div ng-if="agg.error" class="form-group"> | |||
<p class="visEditorAggParam__error ng-binding"> | |||
{{agg.error}} |
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.
Now this error message is displayed in aggregation selector control: https://github.com/elastic/kibana/pull/37979/files?file-filters%5B%5D=.tsx&owned-by%5B%5D=#diff-9c2f5870ef0ffd3edbde4d2072e86430R98
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.
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.
Done.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
Code and functionality LGTM! Tested locally.
@wylieconlon I tested on 6.7, the issue is reproduced. So for me it seems like a bug. I create an issue: |
I believe that #38537 doesn't block migration. @wylieconlon could please continue with review? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
💚 Build Succeeded |
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, thx!
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
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 to functional tests LGTM. Tested in both Chrome and Firefox
* EUIficate metric agg control * Fix translation errors * Display agg error underneath the last bucket agg form control * Update functional test * Update error message * Update parent_pipeline_agg_controller.js * Fix validation when metricAgg is invalid * Show error message when a filed is selected * Delete _terms_helper.tsx * Remove extra empty line * Update parent_pipeline_agg_helper.js * Update selector for test
* [Vis: Default editor] EUIficate Sub agg control (#37979) * EUIficate metric agg control * Fix translation errors * Display agg error underneath the last bucket agg form control * Update functional test * Update error message * Update parent_pipeline_agg_controller.js * Fix validation when metricAgg is invalid * Show error message when a filed is selected * Delete _terms_helper.tsx * Remove extra empty line * Update parent_pipeline_agg_helper.js * Update selector for test * Remove unused translation
Summary
EUIfication of Sub agg control for aggregation parameter in Default Editor, Data tab.
Part of #30922.
Steps to reproduce: create a visualization, choose an aggregation from
Parent Pipeline Aggregations
group (e.g.Derivative
).Details
validate-agg
directive was removedagg_select.js
was updated. Now it has the same validation flow asagg_param.js
hasisCompatibleAgg
andsafeMakeLabel
were moved to a separate utils file (agg_utils.ts
)Screenshot:
Please pay your attention that validation a bit changed:
before: when a user chooses incompatible bucket aggregation, metrics aggregation input was in red
after: when a user chooses incompatible bucket aggregation, bucket aggregation input is in red
I changed this validation because it's a bit difficult to implement before case until
agg_params.js
will be migrated. Also I find it logical to make bucket aggregation input in red as that agg is incompatible. Reviewers, please, let me know if it's applicable.Also now the error message is displayed underneath the agg form control:
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.[ ] This was checked for cross-browser compatibility, including a check against IE11[ ] Documentation was added for features that require explanation or tutorialsFor maintainers
[ ] This was checked for breaking API changes and was labeled appropriately[ ] This includes a feature addition or change that requires a release note and was labeled appropriately